TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
jaffersaleem
NA
55
0
How to do Multiple view using MapViewOFFile API .
Mar 9 2005 2:27 AM
Hi I want to do multiple view to a binary file using MapViewOFFile API . Requirement: I have to process 3 GB file very sequentially .Each time I want to map a view of 100MB data.The first view starts from begin of the file and from second to last view go very sequentially. [From 0 to 100MB(first view) ,101 to 200(second view),201 to 300 (third view).... end of file] After doing the multiple view I am not able to move the pointers.If I move the pointer ,it is referring bad pointer. I have put my code here Loop { SYSTEM_INFO si; GetSystemInfo(&si); DWORD chunkStart =(DWORD) StartingPosition - (StartingPosition % si.dwAllocationGranularity); DWORD dsNumberOfBytes =NumberOfBytes+ StartingPosition - chunkStart; //map the view from mapped file. SequenceOFByte = (unsigned char *) MapViewOfFile ( hMapFile, FILE_MAP_READ, 0,chunkStart,dsNumberOfBytes); if (SequenceOFByte == NULL) { CloseHandle(hMapFile); CloseHandle(hFile); printf("Couldn't map view of file with MapViewOfFile()\n"); return; } DataProcessing(SequenceOFByte ); } Please give the solution. Regards Jaffer
Reply
Answers (
0
)
ApplicationContext Class to Fully Encapsulate Splash Screen
GDI+ and drawing on a Transparent PNG