title: User process can't see global shared memory created by service
body: <p>I have a Windows service (running in the system process) and a desktop application that need to share a configuration structure. The data originates in the app, but the user process doesn't have permission to create a global memory object so I create it when the service starts using CreateFileMapping() and a DACL based on <a href="https://stackoverflow.com/a/898863/1544">this answer</a>. This appears to work fine: I get a non-null handle back from CreateFileMapping() and GetLastError() is 0. The problem is that the app can't see the object -- OpenFileMapping() returns a NULL handle and ERROR_FILE_NOT_FOUND -- and I also can't see it if I manually browse the global objects with WinObj. What's keeping my object from being visible?</p>
  
  <pre><code>SECURITY_ATTRIBUTES security;
  ZeroMemory(&amp;security, sizeof(security));
  security.nLength = sizeof(security);
  ConvertStringSecurityDescriptorToSecurityDescriptor(
      "D:P(A;OICI;GA;;;SY)(A;OICI;GA;;;BA)(A;OICI;GWGR;;;IU)",
      SDDL_REVISION_1,
      &amp;security.lpSecurityDescriptor,
      NULL);
  HANDLE  hFile = CreateFileMapping(INVALID_HANDLE_VALUE, &amp;security, PAGE_READWRITE, 0, 1024*4, "Global\\gCONFIGXFILE");
  DWORD   fileMappingResult = GetLastError();
  if (hFile)
  {
      CloseHandle(hFile);
  }
  LocalFree(security.lpSecurityDescriptor);
  </code></pre>