title: GetFileSizeEx fails for file mapping
body: <p>Im having trouble creating a named shared memory and inspecting its size. The function GetFileSizeEx fails when I call it in a function like this. Any ideas on how to debug this?</p>
  
  <pre><code>void test_getsize(const char* lpName, int size){
  
      HANDLE handle = CreateFileMapping(
                       INVALID_HANDLE_VALUE,    // use paging file
                       NULL,                    // default security
                       PAGE_READWRITE,          // read/write access
                       0,                       // maximum object size (high-order DWORD)
                       size,                // maximum object size (low-order DWORD)
                       lpName);                 // name of mapping object
  
      if (handle== NULL || handle== INVALID_HANDLE_VALUE){
          last_error = get_error_from_errorno();
          *error_return =1;
      }
  
  
      LARGE_INTEGER new_size;
  
      err = GetFileSizeEx(handle, &amp;new_size);
  
      if (err==0){ printf("err ");} else {printf("pass ");}
      printf("size=%lu\n", (unsigned long)new_size.QuadPart);
  }
  </code></pre>