Click here to Skip to main content
16,014,734 members

Comments by Eizenhaier (Top 1 by date)

Eizenhaier 20-Nov-11 11:30am View    
Deleted
Sorry for my English.

I want to create map file. I found an example at the code project. But in use that example show me some fails:
<pre>
IntPtr m_pMapFile;
IntPtr m_pBuff;

string data = "TestTest";

// create map file
m_pMapFile = WinCE.CreateFileMapping(WinCEConst.INVALID_HANDLE_VALUE, null, WinCEConst.PAGE_READWRITE, 0, MapSize, MapName);
</pre>
After compiling, variable m_pMapFile takes the value 0.
<pre>
// get map file
m_pBuff = WinCE.MapViewOfFile(m_pMapFile, WinCEConst.FILE_MAP_ALL_ACCESS, 0, 0, MapSize);
</pre>
Then variable m_pBuff takes the value 0.

What's the problem?