Click or drag to resize

SetInstrumentBigEndian

Specifies whether the device returns binary data in big endian or little endian format.

virtual void SetInstrumentBigEndian(bool bBigEndian) abstract;
Parameters
bBigEndian

[in] If true, the instrument returns binary data in big endian format. If false, the instrument returns binary data in little endian format.

Remarks

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.

Example

The following example demonstrates use of the SetInstrumentBigEndian function.

C++
// CoAcme4321.cpp
HRESULT Acme4321::OnFinalInitialize()
{
  HRESULT hr = S_OK;

  // Little endian byte ordering
  io.SetInstrumentBigEndian(false);

  return hr;
}
See Also

Other Resources

Download a complete CHM version of this documentation here.