41 lines
559 B
C++
41 lines
559 B
C++
#pragma once
|
|
#ifndef MAPPING
|
|
#define MAPPING
|
|
#include "Base.h"
|
|
|
|
#define SHARED_NAME "ServerMappingMmeory"
|
|
|
|
typedef struct _MAPPING_USER_MEMORY
|
|
{
|
|
char str[256];
|
|
|
|
//驱动执行
|
|
DWORD load_driver_code;
|
|
//轮巡
|
|
DWORD add_index_code;
|
|
|
|
DWORD server_pid;
|
|
DWORD client_pid;
|
|
|
|
//轮巡返回数
|
|
DWORD Index;
|
|
|
|
|
|
//返回状态
|
|
BOOL bIsSuc;
|
|
|
|
}MAPPING_USER_MEMORY,*PMAPPING_USER_MEMORY;
|
|
|
|
namespace Mapping
|
|
{
|
|
//创建共享内存
|
|
auto create_memory_mapping()->HANDLE;
|
|
|
|
//映射共享内存
|
|
auto mapping_shared_memory(HANDLE hMapHandle) ->PMAPPING_USER_MEMORY;
|
|
|
|
}
|
|
|
|
|
|
#endif // !MAPPING
|