![]() | SetInstrumentBigEndian |
Specifies whether the device returns binary data in big endian or little endian format.
virtual void SetInstrumentBigEndian(bool bBigEndian) abstract;
[in] If true, the instrument returns binary data in big endian format. If false, the instrument returns binary data in little endian format.
This function is used to indicate the byte ordering used by the connected device. The ReadBinaryBlock and WriteBinaryBlock functions use the byte order specified here to know when to perform byte swapping. Note that the printf-style functions, such as Printf and Scanf do not use the byte order specified with the SetInstrumentBigEndian function.
The default byte order is big endian.
The following example demonstrates use of the SetInstrumentBigEndian function.
// CoAcme4321.cpp HRESULT Acme4321::OnFinalInitialize() { HRESULT hr = S_OK; // Little endian byte ordering io.SetInstrumentBigEndian(false); return hr; }