请教一个内存映射的问题 本帖最后由 newdat 于 2010-05-14 12:45:42 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://www.52delphi.com/list.asp?ID=633 内存映射了解得不是很清楚,但是根据C语言的Demo和Windows.pas中提高的信息,我帮你改写一下: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 ); 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 ); delphi调用ocx中方法传值的问题 请问怎么得到一种商品的五笔码和拼音码 indy client控件中关于EidProtocolReplyError的问题? 涨了5分性欲分,再散200分,全部明天早上结贴! 我要用DELPHI坐接口,请问有没有这方面的资料 谁知道IE浏览器的前进后退按钮的纪录变化在那里写代码呀,谁有能答出100分。 关于ToolBar的自定义问题 我想动态显示数据(高分请教!) 我今天做的程序失败了,请大家帮帮我吧!!!谢谢了!!! 请大家 看看下面的问题该怎么解决吧,都困扰我一个月了! 跪求如何快速学习delphi 线程问题第三问
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
);
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
);