Handy with tooltips for debugging.
VarSetCapacity(btn, 32, 0) DllCall("ReadProcessMemory", "int64", hProc, "int64", pRB, "int64", &btn, "int64", 32, "int64", &bread, "int64") ; example only, don't try this dwData := Numget(btn,16,"int64") b2:=Bin2Hex(btn,32,32) ToolTip, b2: %b2%
Enjoy
Bin2Hex(ByRef Bin,Len,Chunks=32, Div="|") { ; Bin2Hex - Convert Binary data in a variable to hex, good for displaying data from a DLL call ; Bin = The data, ; Len = The size in bytes ; Chunks= How many bits to insert a divider, set to zero for no divider ; Div = Character/String to divide chunks ; Returns - String with Hex characters and chunks dividers ; e.g. - "EC010100|00000000|0404000|60EB6D04" bytes:=Chunks/8 strint:=A_FormatInteger SetFormat, IntegerFast, H line:="" Loop, %Len% { chunk:=NumGet(Bin,A_Index-1, "UChar") chunk:=SubStr("00" . SubStr(chunk,3), -1) if (!Mod(A_Index-1,bytes) && Chunks!=0) line.=Div line.=chunk } SetFormat, IntegerFast, %strint% Return line }