共用方式為


CWinAppEx::GetBinary

Reads binary data from a specified registry key.

BOOL GetBinary(
   LPCTSTR lpszEntry,
   LPBYTE* ppData,
   UINT* pBytes 
);

Parameters

  • [in] lpszEntry
    A string that contains the name of a registry key.

  • [out] ppData
    A pointer to the buffer that the method fills with the binary data.

  • [out] pBytes
    A pointer to an unsigned integer that the method uses to write the number of bytes read.

Return Value

True if successful; false otherwise.

Remarks

This method reads binary data written to the registry. To write data to the registry, use the methods CWinAppEx::WriteBinary and CWinAppEx::WriteSectionBinary.

The lpszEntry parameter is the name of a registry entry located under the default registry key for your application. To get or set the default registry key, use the methods CWinAppEx::GetRegistryBase and CWinAppEx::SetRegistryBase respectively.

Requirements

Header: afxwinappex.h

See Also

Reference

CWinAppEx Class

Hierarchy Chart

CWinAppEx::WriteBinary

CWinAppEx::WriteSectionBinary