title: CreateFileMapping() name
body: <p>Im creating a DLL that shares memory between different applications.</p>
  
  <p>The code that creates the shared memory looks like this:</p>
  
  <pre><code>#define NAME_SIZE 4
  HANDLE hSharedFile;
  
  create(char[NAME_SIZE] name)
  {
      hSharedFile = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 1024, (LPCSTR)name);
      (...) //Other stuff that maps the view of the file etc.
  }
  </code></pre>
  
  <p>It does not work. However if I replace <code>name</code> with a string it works:</p>
  
  <pre><code>SharedFile = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 1024, (LPCSTR)"MY_TEST_NAME");
  </code></pre>
  
  <p>How can I get this to work with the char array?</p>
  
  <p>I have a java background where you would just use string all the time, what is a LPCSTR? And does this relate to whether my MS VC++ project is using <code>Unicode</code> or <code>Multi-Byte</code> character set</p>