AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

RegGetKeySecurity

Ein Thema von CoRe.eXtreem · begonnen am 6. Nov 2008 · letzter Beitrag vom 11. Nov 2008
Antwort Antwort
Benutzerbild von CoRe.eXtreem
CoRe.eXtreem

Registriert seit: 30. Nov 2003
61 Beiträge
 
Delphi 2005 Personal
 
#1

Re: RegGetKeySecurity

  Alt 7. Nov 2008, 10:29
Delphi-Quellcode:
    .data
   lpSubKey         db   "SOFTWARE\Classes\.7z\2",0
   phkResult          dd   0

    .data?
   pSecurityDescriptor      SECURITY_DESCRIPTOR <>

    .code
    
start:
   xor   eax,eax

   push   offset phkResult
   push   KEY_ALL_ACCESS
   push   0
   push   offset lpSubKey
   push   HKEY_LOCAL_MACHINE
   call   RegOpenKeyEx

   push   sizeof SECURITY_DESCRIPTOR      ;<-- Ich vermute der Fehler liegt hier
   push   offset pSecurityDescriptor
   push   DACL_SECURITY_INFORMATION
   push   offset phkResult
   call   RegGetKeySecurity

   push   phkResult
   call   RegCloseKey

   @_ExitProcess:
   push   0
   call   ExitProcess

end start
Der "SECURITY_DESCRIPTOR" gehört in die nicht initialisierte section. Jetzt ist nur noch die Frage wie ich diesen initialisiere vor der verwendung.

In der MSDN (http://msdn.microsoft.com/en-us/libr...61(VS.85).aspx) steht dazu folgendes,...

The SECURITY_DESCRIPTOR structure contains the security information associated with an object. Applications use this structure to set and query an object's security status.

Because the internal format of a security descriptor can vary, we recommend that applications not modify the SECURITY_DESCRIPTOR structure directly. For creating and manipulating a security descriptor, use the functions listed in the See Also section.


Vielleicht kann mir bei der initialisierung des SECURITY_DESCRIPTOR helfen.

Viele Grüße
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:20 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz