Share via


ISdpStream::ByteSwap* (Compact 2013)

3/26/2014

This method converts data of a specified type (*) from system-specific byte ordering into SDP network byte order.

Syntax

HRESULT ByteSwap*
  Type inputElement,
  Type outputElement
);

Parameters

  • inputElement
    [in] Data to convert.
  • outputElement
    [out] Destination pointer for the converted data.

Return Value

Returns S_OK on success; otherwise returns standard HRESULT values as appropriate.

Remarks

The following table shows possible syntax for this method.

ByteSwap

method (*)

Type

Input element

Output element

Uuid128

GUID

*pInUuid128

*pOutUuid128

Uint128

PSDP_ULARGE_INTEGER_16

*pInUint128

*pOutUint128

Uint64

ULONGLONG

inUint64

*pOutUint64

Uint32

ULONG

uint32

*pUint32

Uint16

USHORT

uint16

*pUint16

Int128

PSDP_LARGE_INTEGER_16

*pInInt128

*pOutInt128

Int64

LONGLONG

inInt64

*pOutInt64

Int32

LONG

int32

*pInt32

Int16

SHORT

int16

*pInt16

For example, to swap Uint64, use the following syntax.

HRESULT ByteSwapUint64(
  ULONGLONG inUint64,
  ULONGLONG* pOutUint64
);

See Also

Reference

ISdpStream