MQPROPVARIANT
A version of this page is also available for
4/8/2010
This structure is a general structure used to store property values and value type. It is used for the elements of the aPropVar array and prval array.
Syntax
struct tagMQPROPVARIANT {
VARTYPE vt;
WORD wReserved1;
WORD wReserved2;
WORD wReserved3;
union{
UCHAR bVal;
short iVal;
USHORT uiVal;
VARIANT_BOOL bool;
long lVal;
ULONG ulVal;
SCODE scode;
DATE date;
CLSID _RPC_FAR* puuid;
BLOB blob;
LPOLESTR bstrVal;
LPSTR pszVal;
LPWSTR pwszVal;
CAUI1 caub;
CAI2 cai;
CAUI2 caus;
CABOOL cabool;
CAI4 cal;
CAUI4 caul;
CACLSID cauuid;
CABSTR cabstr;
CALPWSTR calpwstr;
CAPROPVARIANT capropvar;
};
};
typedef struct MQPROPVARIANT MQPROPVARIANT;
Members
vt
Type indicator of the property.Valid indicators for the VT field are a subset of the Automation VARENUM enumeration type, including the following:
- VT_NULL
- VT_I2
- VT_I4
- VT_LPWSTR
- VT_UI1
- VT_UI4
- VT_CLSID
- VT_VECTOR|VT_UI1
- VT_VECTOR|VT_LPWSTR
- wReserved1
Reserved by MSMQ.
- wReserved2
Reserved by MSMQ.
- wReserved3
Reserved by MSMQ.
union
Specifies the value of the property.Depending on the type identifier specified by VT, the corresponding member of the union holds the value of the property.
Remarks
Property values are tagged values, where the tag is the type indicator (an integer value) passed as an instance of VARTYPE.
To specify a property (except for some message properties passed to MQReceiveMessage and some queue properties passed to MQGetQueueProperties, you must know its type indicator and the member of the union associated with the type indicator. (Both are provided with each property description.)
For example, to specify the message body in PROPID_M_BODY, the application must set VT to VT_UI1| VT_VECTOR and assign the message body to the caub member of the union.
CA prefixed members of the union (caub through capropvar) are constructs used to pass buffers as counted arrays.
For example, CAUI1 is a counted array of bytes.
typedef struct tagCAUI1 {
ULONG cElems; /* Byte Counter */
unsigned char *pElems; /* Pointer to a buffer of bytes */
} CAUI1;
Note
OS Versions prior to 2.12 require the MSMQ add-on pack.
Requirements
Header | mq.h |
Windows Embedded CE | Windows CE 2.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |
Note | Versions prior to 2.12 require the MSMQ add-on pack |
See Also
Reference
aPropVar
MQGetQueueProperties
MQReceiveMessage
PROPID_M_BODY
MQMSGPROPS
MQQMPROPS
MQQUEUEPROPS