PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

VirtualAlloc() / VirtualCopy()

I found some documentation that explains how to access hardware directly in Windows CE 3.0. However, I know Microsoft was supposed to tighten security in future versions (that is Pocket PC 2002...). Is it still possible to use VirtualAlloc() and VirtualCopy() in order to access physical memory in PPC 2002?
As far as I know, this is still possible. After all, current PocketPC devices all use Windows CE 3.0 and that was written back in 1999.

There is an MSDN chat scheduled tomorrow hosted by the Windows CE.Net development team. You might drop in and ask them for a definitive answer and if VirtualCopy will still work the same on CE.Net as it does on the PocketPC (CE 3.0).

Info on that chat here: http://www.msdn.microsoft.com/chats.

A word of warning: a number of us PocketPC game developers have attended these CE chats trying to get info/help with PocketPC issues only to find out that the Windows CE people at MS are not the same bunch as the PocketPC group. They are happy to answer questions about the OS itself but don't know (or at least won't comment) on PocketPC specific things (hardware, GAPI, etc.).
Thanks for the info! I'll try not to forget :). I have another question though, on MSDN, I found this:

The following code example shows how VirtualCopy is called to map a 128-KB region at physical address 0x64000000.

VirtualCopy(
pvDest, (void *)(0x64000000/256), 128*1024,
PAGE_READWRITE | PAGE_PHYSICAL | PAGE_NOCACHE);

Why divide 0x64000000 by 256?
Because the PAGE_PHYSICAL option was used:

PAGE_PHYSICAL Used to map a physical memory region. When using this flag, divide the physical address — that is, lpvSrc — by 256.