Sorry JJ, just a bloody C/P error
anyway as you can see fro picture above second call remain empty
.code
start:
push offset buffer
call GetProcId
invoke crt_printf,chr$("Identifier is: %s",CR,LF),addr buffer
invoke RtlZeroMemory,addr buffer,256
push offset buffer
call GetProcName
invoke crt_printf,chr$("ProcessorNameString is: %s",CR,LF),addr buffer
;#########################################################################
invoke wait_key
invoke ExitProcess, 0
GetProcId proc _ProcBuffer:dword
LOCAL _hKey:dword
invoke RegOpenKeyEx,HKEY_LOCAL_MACHINE,addr subkey,0,KEY_READ,addr hKey
.if eax == ERROR_SUCCESS
invoke MessageBox,0,chr$("ERROR_SUCCESS call1"),chr$("INFO"),MB_OK
invoke RegQueryValueEx,hKey,addr ProcID,0,addr szREGSZ, _ProcBuffer,addr buffsize
.endif
invoke RegCloseKey,hKey
ret
GetProcId endp
GetProcName proc _ProcBuffer:dword
LOCAL _hKey:dword
invoke RegOpenKeyEx,HKEY_LOCAL_MACHINE,addr subkey,0,KEY_READ,addr hKey
.if eax == ERROR_SUCCESS
invoke MessageBox,0,chr$("ERROR_SUCCESS call2"),chr$("INFO"),MB_OK
invoke RegQueryValueEx,hKey,addr ProcName,0,addr szREGSZ, _ProcBuffer,addr buffsize
.endif
invoke RegCloseKey,hKey
ret
GetProcName endp
end start