folgender Code funtioniert
Delphi-Quellcode:
procedure InitializeSecurity(
var SA: TSecurityAttributes;
ACL:PACL=nil);
var sd: PSecurityDescriptor;
begin
// Allocate memory for the security descriptor
sd:=AllocMem(SECURITY_DESCRIPTOR_MIN_LENGTH);
// Initialise the new security descriptor
InitializeSecurityDescriptor(sd, SECURITY_DESCRIPTOR_REVISION);
// Add a NULL descriptor ACL to the security descriptor
SetSecurityDescriptorDacl(sd, True,
ACL, False);
// Set up the security attributes structure
with SA
do
begin
nLength:=SizeOf(TSecurityAttributes) ;
lpSecurityDescriptor:=sd;
bInheritHandle:=True;
end;
end;
ist eine aufgebohrte Version der freien Komponenten hinter diesem Link
http://cc.embarcadero.com/Item/21507