mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-07 17:26:48 +08:00
shm_win
This commit is contained in:
parent
d223e3abb8
commit
0c911fb0a4
@ -33,7 +33,7 @@ void * to_mem(id_t id) {
|
|||||||
HANDLE h = static_cast<HANDLE>(id);
|
HANDLE h = static_cast<HANDLE>(id);
|
||||||
LPVOID mem = ::MapViewOfFile(h, FILE_MAP_ALL_ACCESS, 0, 0, 0);
|
LPVOID mem = ::MapViewOfFile(h, FILE_MAP_ALL_ACCESS, 0, 0, 0);
|
||||||
if (mem == NULL) {
|
if (mem == NULL) {
|
||||||
ipc::error("fail MapViewOfFile[%d]: %s\n", static_cast<int>(::GetLastError()), name);
|
ipc::error("fail MapViewOfFile[%d]\n", static_cast<int>(::GetLastError()));
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
return static_cast<void *>(mem);
|
return static_cast<void *>(mem);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user