本帖最后由 newdat 于 2010-05-14 12:45:42 编辑

解决方案 »

  1.   

    http://www.52delphi.com/list.asp?ID=633
      

  2.   

    内存映射了解得不是很清楚,但是根据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
      );
      

  3.   


    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
      );