GetHexDump

 

Description

Convert the given memory into a hex string with every byte represented by two hexidecimal characters.

Syntax

string GetHexDump( const LPVOID lpcMemory, int nSize, BOOL bAddGap = TRUE )

Parameters

lpcMemory
[input] a memory pointer
nSize
[input] size of the memory in bytes to convert
bAddGap
[input] TRUE will add a space character between the hex characters

Return

the string for the hex dump.

Examples

EX1

void GetHexDump_ex1()
{
    char szTemp[10] = "A\t\r\n";
    string strDump = GetHexDump(szTemp, 4);
    out_str(strDump);
}

Remark

See Also

header to Include

origin.h

Reference