title: Error using Windows CreateFilemapping
body: <p>In my project I have implemented the <code>CreateFileMapping</code> concept to share memory between two processes. I have a server process in which I store the memory address of my session data, which contains details about a particular image. And I have a client process in which I read that address from the buffer. Now the problem is the address is shown in the client process but some details are missing.</p>
  
  <p>This is my server process code:</p>
  
  <pre><code>HANDLE hMem;
  LPCSTR  pBuf;
  #define BUF_SIZE 1024
  static const char MemoryName[]="Share Memory Name";
  
  hMem=CreateFileMapping(INVALID_HANDLE_VALUE,NULL, PAGE_READWRITE,0, BUF_SIZE, MemoryName);
  pBuf = (LPCSTR) MapViewOfFile(hMem, FILE_MAP_ALL_ACCESS, 0, 0, BUF_SIZE);
  CopyMemory((PVOID)pBuf, session, BUF_SIZE); 
  LtEntity test = LtEntity(pBuf);
  </code></pre>
  
  <p>This is my client process code:</p>
  
  <pre><code>HANDLE hMem;
  LPCSTR  pBuf;
  #define BUF_SIZE 1024
  static const char MemoryName[]="Share Memory Name";
  
  hMem = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, MemoryName);  
  pBuf = (LPCSTR) MapViewOfFile(hMem, FILE_MAP_ALL_ACCESS, 0, 0, BUF_SIZE);                   
  LtEntity test = LtEntity(pBuf);
  </code></pre>
  
  <p>In server process the variable "test" contains all the details but in the client "test" has some data missing.</p>
  
  <p>The server test variable below shows the attached image which shows the contents of the variable.</p>
  
  <p>The client test variable below shows the attached image which shows the contents of the variable.</p>
  
  <p>Please do check the difference i need the item data also visible in my client process..</p>