Click to See Complete Forum and Search --> : CreateFileMapping(0xFFFFFFFF... works with no swap??!!


MilesAhead
November 18th, 2007, 03:36 PM
I'm just curious if anyone knows why this works since I can't
find MS documentation. Basically I have a test app that creates a
named memory mapped file using the swapfile for shared memory. The
second instance of the app copies its command tail to the shared
memory and the first instance of the app can then get it after the second
instance has closed. It's part of an "Instance Component" that I wrote a
while ago.

In the app I attempt to open the file mapping and if it fails
I'm in the first instance of the app so I create the file mapping like so:

CreateFileMapping((HANDLE)0xFFFFFFFF, NULL, PAGE_READWRITE, 0,
PageSize, "guid_string");

What's interesting is, I'm running Vista with no swapfile, but
the tail transfer test works anyway. So I'm wondering if anyone
knows, does Vista create a temp file on disk or just allocate a page
of shared ram or what?

googler
November 18th, 2007, 04:52 PM
1) It creates shared memory.
2) This is not specific to Vista.