News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

read hexstring from the registry problem

Started by ragdog, December 11, 2006, 05:33:23 PM

Previous topic - Next topic

ragdog

I am it times again :bg


i have problem with read registry string in hex to dword
when i add these 02,00,00,00 hexstrings to the start,
canĀ“t i read my strings any more. -but why??

my source is posted

thanks in forward

ragdog


[attachment deleted by admin]

Darrel

If I understand correctly your registry has the value 02h stored as a DWORD therefore trying to display it as a string would give you the Start of Text charcter followed by 3 NULL characters, so your MessageBox will probably display nothing. You might consider converting the DWORD to ASCII.

HTH,

Darrel

ragdog

i have tested with

invoke GetRegValueInt,addr szKey,addr szRegBinary, addr hString
invoke dw2a,addr hString,addr lpBuffer
invoke MessageBox,hWnd,addr lpBuffer,0,MB_OK

result is 42006628

this works not sry :(

Darrel

As posted your Message Box should display:   (). Which is the Start of Text character followed by a terminating null character.

Try
          lea edx,hString
          add edx,4
          invoke MessageBox,hWnd,edx,0,MB_OK

or
          lea edx,hString
          add DWORD PTR[edx],030303030h
          invoke MessageBox,hWnd,addr hString,0,MB_OK

Regards,

Darrel