Skip to content

SetSourceBigEndian

Specifies the byte order to be used in high-level access operations, such as InXX and MoveInXX, when reading from the source.

virtual HRESULT SetSourceBigEndian(bool bBigEndian) abstract;

bBigEndian

[in] true indicates big endian byte ordering. false indicates little endian byte ordering.

Returns S_OK if successful, otherwise a failure HRESULT.

The following example demonstrates use of the SetSourceBigEndian function.

CoAcme4321.cpp
STDMETHODIMP Acme4321::IAcme4321_Read(SAFEARRAY** ppsaData)
{
// Source uses big endian byte ordering
hr = io.SetSourceBigEndian(true);
hr = io.Memory.MoveIn16(VisaA16Space, 0x10, ppsaData);
return hr;
}