BinToHex

Convert binary memory to hex string.

OutputVar := BinToHex(Address, Length)
Function Example: hex := BinToHex(&var, 10)

Parameters

OutputVar

The name of the variable in which to store the hex string.

Address

Address of variable or pointer to memory.

Length

Length of memory in bytes to convert.

Related

#DllImport, DynaCall, WinApi

Examples

MsgBox % BinToHex(&"123",6) ; unicode string to hex
VarSetCapacity(var,11)
StrPut("ABC",&var,"CP0")
MsgBox % BinToHex(&var,4) ; ansi string to hex
Loop 10
	NumPut(A_Index,&var,A_Index-1,"Char")
MsgBox % BinToHex(&var,10) ; memory to hex