Export (0) Print
Expand All

CDumpContext::HexDump

Dumps an array of bytes formatted as hexadecimal numbers.

void HexDump( 
   LPCTSTR lpszLine, 
   BYTE* pby, 
   int nBytes, 
   int nWidth  
);

lpszLine

A string to output at the start of a new line.

pby

A pointer to a buffer containing the bytes to dump.

nBytes

The number of bytes to dump.

nWidth

Maximum number of bytes dumped per line (not the width of the output line).

To dump a single, specific item type as a hexadecimal number, call CDumpContext::DumpAsHex.

#if _DEBUG
   TCHAR test[] = _T("This is a test of CDumpContext::HexDump\n");
   afxDump.HexDump(_T("."), (BYTE*)test, sizeof(test), 20);
#endif

Header: afx.h

Show:
© 2014 Microsoft