A stream message is a message whose body comprises a stream of values, where each value has an associated data type.
The contents of the body are written to and read sequentially.
When an application reads a value from the message stream, the value can be converted by XMS into another data type. For more information about this form of implicit conversion, see Stream messages.
Function | Description |
---|---|
xmsStreamMsgReadBoolean | Read a boolean value from the message stream. |
xmsStreamMsgReadByte | Read a signed 8-bit integer from the message stream. |
xmsStreamMsgReadBytes | Read an array of bytes from the message stream. |
xmsStreamMsgReadBytesByRef | Get a pointer to an array of bytes in the message stream, and get the length of the array. |
xmsStreamMsgReadChar | Read a 2-byte character from the message stream. |
xmsStreamMsgReadDouble | Read an 8-byte double precision floating point number from the message stream. |
xmsStreamMsgReadFloat | Read a 4-byte floating point number from the message stream. |
xmsStreamMsgReadInt | Read a signed 32-bit integer from the message stream. |
xmsStreamMsgReadLong | Read a signed 64-bit integer from the message stream. |
xmsStreamMsgReadObject | Read a value from the message stream, and return its data type. |
xmsStreamMsgReadShort | Read a signed 16-bit integer from the message stream. |
xmsStreamMsgReadString | Read a string from the message stream. |
xmsStreamMsgReset | Put the body of the message into read-only mode and reposition the cursor at the beginning of the message stream. |
xmsStreamMsgWriteBoolean | Write a boolean value to the message stream. |
xmsStreamMsgWriteByte | Write a byte to the message stream. |
xmsStreamMsgWriteBytes | Write an array of bytes to the message stream. |
xmsStreamMsgWriteChar | Write a character to the message stream as 2 bytes, high order byte first. |
xmsStreamMsgWriteDouble | Convert a double precision floating point number to a long integer and write the long integer to the message stream as 8 bytes, high order byte first. |
xmsStreamMsgWriteFloat | Convert a floating point number to an integer and write the integer to the message stream as 4 bytes, high order byte first. |
xmsStreamMsgWriteInt | Write an integer to the message stream as 4 bytes, high order byte first. |
xmsStreamMsgWriteLong | Write a long integer to the message stream as 8 bytes, high order byte first. |
xmsStreamMsgWriteObject | Write a value, with a specified data type, to the message stream. |
xmsStreamMsgWriteShort | Write a short integer to the message stream as 2 bytes, high order byte first. |
xmsStreamMsgWriteString | Write a string to the message stream. |
xmsRC xmsStreamMsgReadBoolean(xmsHMsg message, xmsBOOL *value, xmsHErrorBlock errorBlock);
Read a boolean value from the message stream.
xmsRC xmsStreamMsgReadByte(xmsHMsg message, xmsSBYTE *value, xmsHErrorBlock errorBlock);
Read a signed 8-bit integer from the message stream.
xmsRC xmsStreamMsgReadBytes(xmsHMsg message, xmsSBYTE *buffer, xmsINT bufferLength, xmsINT *returnedLength, xmsHErrorBlock errorBlock);
Read an array of bytes from the message stream.
If the number of bytes in the array is less than or equal to the length of the buffer, the whole array is read into the buffer. If the number of bytes in the array is greater than the length of the buffer, the buffer is filled with part of the array, and an internal cursor marks the position of the next byte to be read. A subsequent call to xmsStreamMsgReadBytes() reads bytes from the array starting from the current position of the cursor.
If you specify a null pointer on input, the call skips over the array of bytes without reading it.
If you specify a null pointer on input, the function returns no value.
xmsRC xmsStreamMsgReadBytesByRef(xmsHMsg message, xmsSBYTE **array, xmsINT *length, xmsHErrorBlock errorBlock);
Get a pointer to an array of bytes in the message stream, and get the length of the array.
For more information about how to use this function, see C functions that return a string or byte array by reference.
xmsRC xmsStreamMsgReadChar(xmsHMsg message, xmsCHAR16 *value, xmsHErrorBlock errorBlock);
Read a 2-byte character from the message stream.
xmsRC xmsStreamMsgReadDouble(xmsHMsg message, xmsDOUBLE *value, xmsHErrorBlock errorBlock);
Read an 8-byte double precision floating point number from the message stream.
xmsRC xmsStreamMsgReadFloat(xmsHMsg message, xmsFLOAT *value, xmsHErrorBlock errorBlock);
Read a 4-byte floating point number from the message stream.
xmsRC xmsStreamMsgReadInt(xmsHMsg message, xmsINT *value, xmsHErrorBlock errorBlock);
Read a signed 32-bit integer from the message stream.
xmsRC xmsStreamMsgReadLong(xmsHMsg message, xmsLONG *value, xmsHErrorBlock errorBlock);
Read a signed 64-bit integer from the message stream.
xmsRC xmsstreamMsgReadObject(xmsHMsg message, xmsSBYTE *buffer, xmsINT bufferLength, xmsINT *actualLength, xmsOBJECT_TYPE *objectType, xmsHErrorBlock errorBlock);
Read a value from the message stream, and return its data type.
For more information about how to use this function, see C functions that return a byte array by value.
If you specify a null pointer on input, the call skips over the value without reading it.
xmsRC xmsStreamMsgReadShort(xmsHMsg message, xmsSHORT *value, xmsHErrorBlock errorBlock);
Read a signed 16-bit integer from the message stream.
xmsRC xmsStreamMsgReadString(xmsHMsg message, xmsCHAR *buffer, xmsINT bufferLength, xmsINT *actualLength, xmsHErrorBlock errorBlock);
Read a string from the message stream. If required, XMS converts the characters in the string into the local code page.
For more information about how to use this function, see C functions that return a string by value.
If you specify XMSC_QUERY_SIZE, the string is not returned, but its length is returned in the actualLength parameter, and the cursor is not advanced.
If you specify XMSC_SKIP, the function skips over the string without reading it.
xmsRC xmsStreamMsgReset(xmsHMsg message, xmsHErrorBlock errorBlock);
Put the body of the message into read-only mode and reposition the cursor at the beginning of the message stream.
xmsRC xmsStreamMsgWriteBoolean(xmsHMsg message, xmsBOOL value, xmsHErrorBlock errorBlock);
Write a boolean value to the message stream.
xmsRC xmsStreamMsgWriteByte(xmsHMsg message, xmsSBYTE value, xmsHErrorBlock errorBlock);
Write a byte to the message stream.
xmsRC xmsStreamMsgWriteBytes(xmsHMsg message, xmsSBYTE *value, xmsINT length, xmsHErrorBlock errorBlock);
Write an array of bytes to the message stream.
xmsRC xmsStreamMsgWriteChar(xmsHMsg message, xmsCHAR16 value, xmsHErrorBlock errorBlock);
Write a character to the message stream as 2 bytes, high order byte first.
xmsRC xmsStreamMsgWriteDouble(xmsHMsg message, xmsDOUBLE value, xmsHErrorBlock errorBlock);
Convert a double precision floating point number to a long integer and write the long integer to the message stream as 8 bytes, high order byte first.
xmsRC xmsStreamMsgWriteFloat(xmsHMsg message, xmsFLOAT value, xmsHErrorBlock errorBlock);
Convert a floating point number to an integer and write the integer to the message stream as 4 bytes, high order byte first.
xmsRC xmsStreamMsgWriteInt(xmsHMsg message, xmsINT value, xmsHErrorBlock errorBlock);
Write an integer to the message stream as 4 bytes, high order byte first.
xmsRC xmsStreamMsgWriteLong(xmsHMsg message, xmsLONG value, xmsHErrorBlock errorBlock);
Write a long integer to the message stream as 8 bytes, high order byte first.
xmsRC xmsStreamMsgWriteObject(xmsHMsg message, xmsSBYTE *value, xmsINT length, xmsOBJECT_TYPE objectType, xmsHErrorBlock errorBlock);
Write a value, with a specified data type, to the message stream.
xmsRC xmsStreamMsgWriteShort(xmsHMsg message, xmsSHORT value, xmsHErrorBlock errorBlock);
Write a short integer to the message stream as 2 bytes, high order byte first.
xmsRC xmsStreamMsgWriteString(xmsHMsg message, xmsCHAR *value, xmsINT length, xmsHErrorBlock errorBlock);
Write a string to the message stream.