MQPROPVARIANT

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.

struct tagMQPROPVARIANT{
VARTYPE vt;
WORD wReserved1;
WORD wReserved2;
WORD wReserved3;
union{
UCHAR             bVal;      /* VT_UI1   */
short             iVal;      /* VT_I2    */
USHORT            uiVal;     /* VT_UI2   */
VARIANT_BOOL      bool;      /* VT_BOOL  */
long              lVal;      /* VT_I4    */
ULONG             ulVal;     /* VT_UI4   */
SCODE             scode;     /*          */
DATE              date;      /* VT_DATE  */
CLSID  _RPC_FAR  *puuid;     /* VT_CLSID */
BLOB              blob;      /* VT_BLOB  */
LPOLESTR          bstrVal;   /*          */
LPSTR             pszVal;    /* VT_LPSTR */
LPWSTR            pwszVal;   /* VT_LPWSTR */
CAUI1             caub;      /* VT_VECTOR | VT_UI1    */
CAI2              cai;       /* VT_VECTOR | VT_I2     */
CAUI2             caus;      /* VT_VECTOR | VT_UI2    */
CABOOL            cabool;    /* VT_VECTOR | VT_BOOL   */
CAI4              cal;       /* VT_VECTOR | VT_I4     */
CAUI4             caul;      /* VT_VECTOR | VT_UI4    */
CACLSID           cauuid;    /* VT_VECTOR | VT_CLSID  */
CABSTR            cabstr;    /* VT_VECTOR | VT_BSTR   */
CALPWSTR          calpwstr;  /* VT_VECTOR | VT_LPWSTR */
CAPROPVARIANT   capropvar;   /*                       */
}; 
};
typedef struct MQPROPVARIANT MQPROPVARIANT;

Members

  • vt
    Type indicator of the property. The valid indicators for the VT field are a subset of the Automation VARENUM enumeration type (including VT_NULL, VT_I2, VT_I4, VT_LPWSTR, VT_UI1, VT_UI4, VT_CLSID, VT_VECTOR|VT_UI1, and 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 (with the exception of some message properties passed to MQReceiveMessage) and 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;

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later. Versions prior to 2.12 require the MSMQ add-on pack. Mq.h Mq.h  

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

aPropVar, MQGetQueueProperties, MQReceiveMessage, PROPID_M_BODY, MQMSGPROPS, MQQMPROPS, MQQUEUEPROPS

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.