|
HANDLE hMap = CreateFileMapping (INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE | SEC_COMMIT, 0,256, "S_DATA");
Ranch
}
void CTest4Dlg :: OnButton2 ()
{
HANDLE m_hMap = OpenFileMapping (FILE_MAP_READ, FALSE, "S_DATA");
Ranch
}
I wrote an example, but when I use OpenFileMapping to open the mapping address, hMap is not equal to m_hMap, so when I call MapViewOfFile to read the data in button2, an error occurs.
Excuse me, why are hMap and m_hMap not equal? Where am I wrong? Thank you for your help. |
|