Danke, genau das habe ich auch gerade gefunden.
Das Problem ist nur ich bekomme im CPU Register EAX 00000001 raus.
EAX 00000001 <---
ECX 00403020 RegAth.00403020
EDX 00292CA0
EBX 7FFD9000
ESP 0012FF8C
EBP 0012FF94
ESI 00000000
EDI 00000000
EIP 00401029 RegAth.00401029
C 0 ES 0023 32bit 0(FFFFFFFF)
P 0 CS 001B 32bit 0(FFFFFFFF)
A 0 SS 0023 32bit 0(FFFFFFFF)
Z 0 DS 0023 32bit 0(FFFFFFFF)
S 0 FS 003B 32bit 7FFDF000(FFF)
T 0 GS 0000 NULL
D 0
O 0 LastErr ERROR_SUCCESS (00000000)
EFL 00000202 (NO,NB,NE,A,NS,PO,GE,G)
ST0 empty 0.0
ST1 empty 0.0
ST2 empty 0.0
ST3 empty 0.0
ST4 empty 0.0
ST5 empty 0.0
ST6 empty 0.0
ST7 empty 0.0
3 2 1 0 E S P U O Z D I
FST 0000 Cond 0 0 0 0 Err 0 0 0 0 0 0 0 0 (GT)
FCW 027F Prec NEAR,53 Mask 1 1 1 1 1 1
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 SECURITY_DESCRIPTOR_REVISION
push offset pSecurityDescriptor
call InitializeSecurityDescriptor
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