Assembly code snippets

Back to the snippets overview

Details

TitleRegRead
AuthorQvasiModo
Submitted by:QvasiModo
Date added:2003-06-26 02:37:28
Date modified:2003-06-26 02:37:28

Comments

Reads a DWORD from a value in a registry key

Snippet

; RegRead
;   by QvasiModo

; Reads a DWORD from a value in a registry key

; Lee un DWORD de un valor en una clave del registro

RegRead proto :dword,:dword,:dword

.code
RegRead proc hkey:dword,pszval:dword,dwdefval:dword
    local dwsize:dword
    mov dwsize,4
    invoke RegQueryValueEx,hkey,pszval,0,0,addr dwdefval,addr dwsize
    mov eax,dwdefval
    ret
RegRead endp