by Dan East » Aug 12, 2001 @ 11:45pm
VirtualCopy is defined as DoVirtualCopy in kernel.h:<br>[fixed]<br>#undef VirtualCopy<br>#define VirtualCopy DoVirtualCopy<br>[/fixed]<br>The definition of DoVirtualCopy is found in KWIN32.H and is:<br>[fixed]<br>BOOL DoVirtualCopy(LPVOID lpvDest, LPVOID lpvSrc, DWORD cbSize, DWORD fdwProtect);[/fixed]<br><br>An example usage out of the KMISC.C file:<br>[fixed]LPBYTE lpNLSView = VirtualAlloc(0, cbSize, MEM_RESERVE, PAGE_NOACCESS);<br>VirtualCopy(lpNLSView, pvPhysical, cbSize, PAGE_READONLY);<br>[/fixed]<br>Where pvPhysical is a pointer to the physical memory you want a copy of.<br><br>Also, you may want to see MS knowledge base article Q213359. It refers to problems when using VirtualCopy to copy physical memory. It says it applies to "Microsoft Windows CE for the Handheld PC", so I don't know if it is pertinent CE versions greater than 2.0 or not.<br>The body of the DoVirtualCopy function is 180 lines long, so I'm not going to include it here.<br><br>Dan East