1,594
社区成员
发帖
与我相关
我的任务
分享
var
Psd: PSecurityDescriptor;
Psa: PSecurityAttributes;
InitializeSecurityDescriptor(Psd, SECURITY_DESCRIPTOR_REVISION);
SetSecurityDescriptorDacl(Psd, True, nil, False);
Psa^.nLength := SizeOf(TSecurityAttributes);
Psa^.lpSecurityDescriptor := Psd;
Psa^.bInheritHandle := False;
FileMapHandle := CreateFileMapping($FFFFFFFF,//内存映射
Psa, //你需要的第二个参数
PAGE_READWRITE, //读写操作
0, //高32位 ,一般为0,除非要映射的文件大于4G
sizeof(TShareMem),
FILEMAPPINGNAME
);