i made a registry tool which can create and delete windows registry keys.
all working fine exept retrieving a dword value from a subkey.
this is the code where it goes about also i will upload the whole project
invoke RegCreateKeyEx, HKEY_CURRENT_USER, Addr NameOfKey, 0, 0, 0, KEY_WRITE, 0, Addr hKey, Addr lpdwDisp
.if eax == ERROR_SUCCESS
invoke MessageBox, hWnd, chr$("Key created!"), chr$("Succeeds"), MB_ICONINFORMATION
.else
invoke MessageBox, hWnd, chr$("Key not created!"), chr$("Error"), MB_IConerror
.endif
.endif
.elseif eax == GetDwordKey
mov lpcbData, 4
invoke RegQueryValueEx, hKey, chr$("This is a dword value"), 0, addr lpType, addr Buffer, addr lpcbData
.if eax == ERROR_SUCCESS
invoke SetDlgItemText, hWnd, 1013,ADDR Buffer
.else
invoke SetDlgItemText, hWnd, 1013, chr$("Dwordkey can't be retrieved!")
.endif
.endif
project
removed
This post has been edited by Latias: 29 November 2012 - 02:01 AM

New Topic/Question
Reply



MultiQuote







|