title: OpenFileMapping issues, can't find filemap
body: <p>I'm trying currently to test inter process communication by using filemaps. My first program, which i shall call the producer, doesn't error on the following code which createsa file map and writes to it, as follows:</p>
  <pre><code> hEvent = CreateFileMapping(
               INVALID_HANDLE_VALUE,    // use paging file
               NULL,                    // default security
               PAGE_READWRITE,          // read/write access
               0,                       // maximum object size (high-order DWORD)
               256,                // maximum object size (low-order DWORD)
               TEXT(&quot;hEvent&quot;)); 
          
  if (hEvent == NULL)
  {
      MessageBox(NULL, TEXT(&quot;error: cannot create file map&quot;), TEXT(&quot;gotit&quot;), MB_OK);
    _tprintf(TEXT(&quot;Could not create file mapping object (%d).\n&quot;),
           GetLastError());
    return 1;
  }
  
   mapBuffer = (LPTSTR) MapViewOfFile(hEvent, FILE_MAP_ALL_ACCESS, NULL, NULL, 256);
              if (mapBuffer == NULL)
  {
     MessageBox(NULL, TEXT(&quot;error: cannot view map&quot;), TEXT(&quot;gotit&quot;), MB_OK);
    _tprintf(TEXT(&quot;Could not map view of file (%d).\n&quot;),
           GetLastError());
  
     CloseHandle(hEvent);
  
    return 1;
  }
          
              CopyMemory((PVOID)mapBuffer, teststring, 256);
              _getch();
              
          
  
               UnmapViewOfFile(mapBuffer);
               CloseHandle(hEvent);
  </code></pre>
  <p>However, my second program, which is imitating the second process and i shall name the consumer, errors upon trying to re-open this filemap, using the following code:</p>
  <pre><code> hEvent = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, TEXT(&quot;hEvent&quot;));
               if (hEvent == NULL)
   {
    MessageBox(NULL, TEXT(&quot;error opening filemap&quot;), TEXT(&quot;gotit&quot;), MB_OK);
           GetLastError();
    return 1;
   }
  </code></pre>
  <p>Can anyone see anything obvious i'm missing?, as it's going straight over my head.</p>