You are trying to convert the return value of CreateFileMapping() to the wrong type. It already returns the correct type, so no typecasting is needed.
Ancient Dragon
Achieved Level 70
32,144 posts since Aug 2005
Reputation Points: 5,836
Solved Threads: 2,577
Skill Endorsements: 69
I just have to cast the void pointer every time I want to use it as a byte type?
hMapFile is NOT a byte ptr -- its HANDLE which is already the type returned by CreateFileMaping(). And where do you see a void pointer??? I don't see that sort of object in the code you posed.
Ancient Dragon
Achieved Level 70
32,144 posts since Aug 2005
Reputation Points: 5,836
Solved Threads: 2,577
Skill Endorsements: 69