|
-
May 19th, 1999, 09:32 AM
#1
problems with MapViewOfFile
the code :
short* sig = (short * ) MapViewOfFile (hCubeMapping,
FILE_MAP_COPY,
offset >> 32,
offset,
size);
works perfectly when offset = 0, but fails when offset is greater. I know that the offset must be a multiple of the allocation granularity (64K), but it returns NULL in any case. Please, help me to solve this problem
-
May 19th, 1999, 04:18 PM
#2
Re: problems with MapViewOfFile
Perhaps the problem is in your use of the Bitwise shift operator. I suspect that the dwFileOffsetHigh and dwFileOffsetLow aren't being set correctly. I think it works when offset is 0 because bit-shifting zero is still zero, however when you use a non-zero offset, the bitwise math is probably incorrect.
Good Luck.
John
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|