Click here to Skip to main content
15,916,846 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ editor Pin
Neville Franks12-Sep-03 0:26
Neville Franks12-Sep-03 0:26 
GeneralRe: C++ editor Pin
typist12-Sep-03 1:22
typist12-Sep-03 1:22 
GeneralRe: C++ editor Pin
Dangleberry12-Sep-03 1:46
sussDangleberry12-Sep-03 1:46 
GeneralPainting problem in CFormView with overlapping ActiveX Pin
sanskypotov11-Sep-03 21:47
sanskypotov11-Sep-03 21:47 
GeneralRead backwarts from file Pin
Eddie70011-Sep-03 20:29
Eddie70011-Sep-03 20:29 
GeneralRe: Read backwarts from file Pin
Neville Franks12-Sep-03 0:32
Neville Franks12-Sep-03 0:32 
GeneralRe: Read backwarts from file Pin
Dangleberry12-Sep-03 1:49
sussDangleberry12-Sep-03 1:49 
GeneralRe: Read backwarts from file Pin
Mike Dimmick12-Sep-03 2:56
Mike Dimmick12-Sep-03 2:56 
There are two basic 'hints' you can specify to CreateFile to tell Windows how you intend to manipulate the file.

Specifying no hint indicates to Windows that you mostly intend to read the file forwards. This is what you have at the moment. It will perform some asynchronous read-ahead from the file, and drop the cache mappings fairly quickly after each read. When it does drop them, it adds the physical memory pages to the tail of the list of free pages, so if it needs to reload them again, it doesn't need to reload from disk unless the pages have actually been reused.

Windows actually tries to interpret your read pattern and guess where the next read might occur.

If you use the FILE_FLAG_RANDOM_ACCESS flag, read-ahead is inhibited, and the cache manager is less aggressive about unmapping recently used sections.

Finally, I'll quickly mention FILE_FLAG_SEQUENTIAL_SCAN where the cache manager assumes that you're reading the file from end to end, never going back, and so adds unmapped cache data to the head, not the tail, of the free list so it gets reused quickly.

In order to be able to pass the FILE_FLAG_RANDOM_ACCESS flag, you'll need to subclass CFile.

More complete information in Inside Windows 2000 from MS Press (Solomon & Russinovich).
GeneralRe: Read backwarts from file Pin
Eddie70015-Sep-03 1:23
Eddie70015-Sep-03 1:23 
GeneralCListCtrl + InsertColumn Pin
KKR11-Sep-03 19:44
KKR11-Sep-03 19:44 
GeneralRe: CListCtrl + InsertColumn Pin
Jagadeesh VN11-Sep-03 20:21
Jagadeesh VN11-Sep-03 20:21 
GeneralRe: CListCtrl + InsertColumn Pin
KKR11-Sep-03 21:51
KKR11-Sep-03 21:51 
GeneralLayering bitmaps Pin
smjones11-Sep-03 18:38
smjones11-Sep-03 18:38 
GeneralRe: Layering bitmaps Pin
Jagadeesh VN11-Sep-03 20:28
Jagadeesh VN11-Sep-03 20:28 
GeneralRe: Layering bitmaps Pin
smjones14-Sep-03 15:03
smjones14-Sep-03 15:03 
GeneralChanging exe name. Pin
Matt Gates11-Sep-03 18:07
Matt Gates11-Sep-03 18:07 
GeneralRe: Changing exe name. Pin
Vadim Tabakman11-Sep-03 18:17
Vadim Tabakman11-Sep-03 18:17 
GeneralRe: Changing exe name. Pin
Matt Gates12-Sep-03 7:42
Matt Gates12-Sep-03 7:42 
QuestionHow to search a device,such as USB device? Pin
njbull11-Sep-03 17:58
njbull11-Sep-03 17:58 
QuestionIs there any method for drawing box without using MFC? Pin
nwillie11-Sep-03 17:46
nwillie11-Sep-03 17:46 
GeneralPrint Picture Pin
vancouver77711-Sep-03 16:36
vancouver77711-Sep-03 16:36 
GeneralRe: Print Picture Pin
cje12-Sep-03 4:42
cje12-Sep-03 4:42 
GeneralRe: Print Picture Pin
sdfdsfa12-Sep-03 5:15
sdfdsfa12-Sep-03 5:15 
GeneralRe: Print Picture Pin
vancouver77712-Sep-03 5:15
vancouver77712-Sep-03 5:15 
GeneralDocument Depends On View Size Pin
Shawn Carroll11-Sep-03 13:57
Shawn Carroll11-Sep-03 13:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.