Einzelnen Beitrag anzeigen

Benutzerbild von Bummi
Bummi

Registriert seit: 15. Jun 2010
Ort: Augsburg Bayern Süddeutschland
3.470 Beiträge
 
Delphi XE3 Enterprise
 
#5

AW: Senden an Named Pipe klappt nur zum Server! Warum?[erledigt]

  Alt 2. Mär 2011, 10:40
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
Thomas Wassermann H₂♂
Das Problem steckt meistens zwischen den Ohren
DRY DRY KISS
H₂ (wenn bei meinen Snipplets nichts anderes angegeben ist Lizenz: WTFPL)
  Mit Zitat antworten Zitat