This commit is contained in:
2026-07-28 15:11:47 +08:00
parent 9b00c5f6eb
commit e91e372b19
80 changed files with 246075 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
#include "Mapping.h"
namespace Mapping
{
auto create_memory_mapping() -> HANDLE
{
auto hMap = CreateFileMappingA(
INVALID_HANDLE_VALUE,
NULL,
PAGE_READWRITE,
0,
sizeof(_MAPPING_USER_MEMORY),
SHARED_NAME
);
return hMap;
}
auto mapping_shared_memory(HANDLE hMapHandle) -> PMAPPING_USER_MEMORY
{
auto pData = (_MAPPING_USER_MEMORY*)MapViewOfFile(
hMapHandle,
FILE_MAP_ALL_ACCESS,
0, 0,
0
);
return pData;
}
}