//=--------------------------------------------------------------------------=
// mqoa.ODL
//=--------------------------------------------------------------------------=
// Copyright  1995  Microsoft Corporation.  All Rights Reserved.
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//=--------------------------------------------------------------------------=
//
// ODL file for the automation object(s) in this inproc server
//
//
#include "dispids.h"

//
// resource ids
//
#include "resrc1.h"

// can't include oaidl.h, so this will have to do
//
#define DISPID_NEWENUM -4

// This is our implementation dll
#define MQOADLL "mqoa.dll"

//=--------------------------------------------------------------------------=
// the libid for this type libray
//
[
    uuid(D7D6E071-DCCD-11d0-AA4B-0060970DEBAE),
    helpstring("Microsoft Message Queue 2.0 Object Library"),
    helpstringdll(MQOADLL),
    lcid(0x0000),
    version(MSMQ20_LIB_VER)
]
library MSMQ {
    //
	// generated mqoai.h uses MIDL_INTERFACE which is not defined by VC5. However we need
	// to be able to compile on VC5 because VC5 is supported by the Platform SDK.
	// taken from rpcndr.h of VC 6
	//
    cpp_quote("#ifndef MIDL_INTERFACE")
    cpp_quote("#if _MSC_VER >= 1100")
    cpp_quote("#define MIDL_INTERFACE(x)   struct __declspec(uuid(x)) __declspec(novtable)")
    cpp_quote("#else")
    cpp_quote("#define MIDL_INTERFACE(x)   struct")
    cpp_quote("#endif //_MSC_VER")
    cpp_quote("#endif //MIDL_INTERFACE")
    cpp_quote("")
    
	typedef short Boolean;

    // standard imports
    //
    importlib("STDOLE32.TLB");

#if 0
    // assumes that typelib is on path
    importlib("mqadminx.TLB");
#endif // 0

    typedef unsigned char BYTE;
    typedef unsigned long ULONG;
    typedef unsigned long DWORD;
    typedef int BOOL;


    // forwards defs
    interface IMSMQQuery;
    interface IMSMQQueueInfo;
    interface IMSMQQueueInfo2;
    interface IMSMQQueue;
    interface IMSMQQueue2;
    interface IMSMQMessage;
    interface IMSMQQueueInfos;
    interface IMSMQQueueInfos2;
    interface IMSMQEvent;
    interface IMSMQEvent2;
    interface IMSMQTransaction;
    interface IMSMQCoordinatedTransactionDispenser;
    interface IMSMQTransactionDispenser;


    // enums
    //
    // crypto stuff stolen from wincrypt.h
    // UNDONE: note that due to midl bug can't use shift operators
    //  in constant initializers so we use manifest constants.
    //
// ALG_ID crackers
#define GET_ALG_CLASS(x)                (x & (7 << 13))
#define GET_ALG_TYPE(x)                 (x & (15 << 9))
#define GET_ALG_SID(x)                  (x & (511))

// Algorithm classes
#define ALG_CLASS_ANY                   (0)
#define ALG_CLASS_SIGNATURE             (0x2000) // (1 << 13)
#define ALG_CLASS_MSG_ENCRYPT           (0x4000) // (2 << 13)
#define ALG_CLASS_DATA_ENCRYPT          (0x6000) // (3 << 13)
#define ALG_CLASS_HASH                  (0x8000) // (4 << 13)
#define ALG_CLASS_KEY_EXCHANGE          (0xA000) // (5 << 13)

// Algorithm types
#define ALG_TYPE_ANY                    (0)
#define ALG_TYPE_DSS                    (0x200) // (1 << 9)
#define ALG_TYPE_RSA                    (0x400) // (2 << 9)
#define ALG_TYPE_BLOCK                  (0x600) // (3 << 9)
#define ALG_TYPE_STREAM                 (0x800) // (4 << 9)

// Generic sub-ids
#define ALG_SID_ANY                     (0)

// Some RSA sub-ids
#define ALG_SID_RSA_ANY                 0
#define ALG_SID_RSA_PKCS                1
#define ALG_SID_RSA_MSATWORK            2
#define ALG_SID_RSA_ENTRUST             3
#define ALG_SID_RSA_PGP                 4

// Some DSS sub-ids
//
#define ALG_SID_DSS_ANY                 0
#define ALG_SID_DSS_PKCS                1
#define ALG_SID_DSS_DMS                 2

// Block cipher sub ids
// DES sub_ids
#define ALG_SID_DES                     1
#define ALG_SID_3DES                    3
#define ALG_SID_DESX                    4
#define ALG_SID_IDEA                    5
#define ALG_SID_CAST                    6
#define ALG_SID_SAFERSK64               7
#define ALD_SID_SAFERSK128              8

// KP_MODE
#define CRYPT_MODE_CBCI                 6       // ANSI CBC Interleaved
#define CRYPT_MODE_CFBP                 7       // ANSI CFB Pipelined
#define CRYPT_MODE_OFBP                 8       // ANSI OFB Pipelined
#define CRYPT_MODE_CBCOFM               9       // ANSI CBC + OF Masking
#define CRYPT_MODE_CBCOFMI              10      // ANSI CBC + OFM Interleaved

// RC2 sub-ids
#define ALG_SID_RC2                     2

// Stream cipher sub-ids
#define ALG_SID_RC4                     1
#define ALG_SID_SEAL                    2

// Hash sub ids
#define ALG_SID_MD2                     1
#define ALG_SID_MD4                     2
#define ALG_SID_MD5                     3
#define ALG_SID_SHA                     4
#define ALG_SID_MAC                     5
#define ALG_SID_RIPEMD                  6
#define ALG_SID_RIPEMD160               7
#define ALG_SID_SSL3SHAMD5              8

    typedef
    [helpstringcontext(IDS_MQCALG)]
    enum _MQCALG {
      MQMSG_CALG_MD2        = (ALG_CLASS_HASH + ALG_TYPE_ANY + ALG_SID_MD2),
      MQMSG_CALG_MD4        = (ALG_CLASS_HASH + ALG_TYPE_ANY + ALG_SID_MD4),
      MQMSG_CALG_MD5        = (ALG_CLASS_HASH + ALG_TYPE_ANY + ALG_SID_MD5),
      MQMSG_CALG_SHA        = (ALG_CLASS_HASH + ALG_TYPE_ANY + ALG_SID_SHA),
      MQMSG_CALG_MAC        = (ALG_CLASS_HASH + ALG_TYPE_ANY + ALG_SID_MAC),
      MQMSG_CALG_RSA_SIGN   = (ALG_CLASS_SIGNATURE + ALG_TYPE_RSA + ALG_SID_RSA_ANY),
      MQMSG_CALG_DSS_SIGN   = (ALG_CLASS_SIGNATURE + ALG_TYPE_DSS + ALG_SID_DSS_ANY),
      MQMSG_CALG_RSA_KEYX   = (ALG_CLASS_KEY_EXCHANGE+ALG_TYPE_RSA+ALG_SID_RSA_ANY),
      MQMSG_CALG_DES        = (ALG_CLASS_DATA_ENCRYPT+ALG_TYPE_BLOCK+ALG_SID_DES),
      MQMSG_CALG_RC2        = (ALG_CLASS_DATA_ENCRYPT+ALG_TYPE_BLOCK+ALG_SID_RC2),
      MQMSG_CALG_RC4        = (ALG_CLASS_DATA_ENCRYPT+ALG_TYPE_STREAM+ALG_SID_RC4),
      MQMSG_CALG_SEAL       = (ALG_CLASS_DATA_ENCRYPT+ALG_TYPE_STREAM+ALG_SID_SEAL)
    } MQCALG;

    typedef
    [helpstringcontext(IDS_MQTRANSACTION)]
    enum _MQTRANSACTION {
      MQ_NO_TRANSACTION             = 0,
      MQ_MTS_TRANSACTION            = 1,
      MQ_XA_TRANSACTION             = 2,
      MQ_SINGLE_MESSAGE             = 3
    } MQTRANSACTION;

    typedef
    [helpstringcontext(IDS_RELOPS)]
    enum _RELOPS {
      REL_NOP = 0,
      REL_EQ,
      REL_NEQ,
      REL_LT,
      REL_GT,
      REL_LE,
      REL_GE,
    } RELOPS;

    //
    // application related enums
    //
    typedef
    [helpstringcontext(IDS_MQCERT_REGISTER)]
    enum _MQCERT_REGISTER {
        [helpstringcontext(IDS_MQCERT_REGISTER_ALWAYS)]
	MQCERT_REGISTER_ALWAYS = 1,

        [helpstringcontext(IDS_MQCERT_REGISTER_IF_NOT_EXIST)]
	MQCERT_REGISTER_IF_NOT_EXIST = 2,
    } MQCERT_REGISTER;

    //
    // event/cursor related enums
    //
    typedef
    [helpstringcontext(IDS_MQMSGCURSOR)]
    enum _MQMSGCURSOR {
	MQMSG_FIRST = 0,
	MQMSG_CURRENT = 1,
	MQMSG_NEXT = 2
    } MQMSGCURSOR;

    //
    // Message related enums
    //

    #define MQCLASS_CODE(s, r, code) ((s) + (r) + (code))
    typedef
    [helpstringcontext(IDS_MQMSGCLASS)]
    enum _MQMSGCLASS {
	MQMSG_CLASS_NORMAL                      = MQCLASS_CODE(0x0000, 0x0000, 0x00),
	MQMSG_CLASS_REPORT                      = MQCLASS_CODE(0x0000, 0x0000, 0x01),
	MQMSG_CLASS_ACK_REACH_QUEUE             = MQCLASS_CODE(0x0000, 0x0000, 0x02),

	MQMSG_CLASS_ACK_RECEIVE                 = MQCLASS_CODE(0x0000, 0x4000, 0x00),

	MQMSG_CLASS_NACK_BAD_DST_Q              = MQCLASS_CODE(0x8000, 0x0000, 0x00),
	MQMSG_CLASS_NACK_PURGED                 = MQCLASS_CODE(0x8000, 0x0000, 0x01),
	MQMSG_CLASS_NACK_REACH_QUEUE_TIMEOUT    = MQCLASS_CODE(0x8000, 0x0000, 0x02),
	MQMSG_CLASS_NACK_Q_EXCEED_QUOTA         = MQCLASS_CODE(0x8000, 0x0000, 0x03),
	MQMSG_CLASS_NACK_ACCESS_DENIED          = MQCLASS_CODE(0x8000, 0x0000, 0x04),
	MQMSG_CLASS_NACK_HOP_COUNT_EXCEEDED     = MQCLASS_CODE(0x8000, 0x0000, 0x05),
	MQMSG_CLASS_NACK_BAD_SIGNATURE          = MQCLASS_CODE(0x8000, 0x0000, 0x06),
	MQMSG_CLASS_NACK_BAD_ENCRYPTION         = MQCLASS_CODE(0x8000, 0x0000, 0x07),
	MQMSG_CLASS_NACK_COULD_NOT_ENCRYPT      = MQCLASS_CODE(0x8000, 0x0000, 0x08),
	MQMSG_CLASS_NACK_NOT_TRANSACTIONAL_Q    = MQCLASS_CODE(0x8000, 0x0000, 0x09),
	MQMSG_CLASS_NACK_NOT_TRANSACTIONAL_MSG  = MQCLASS_CODE(0x8000, 0x0000, 0x0A),
	MQMSG_CLASS_NACK_UNSUPPORTED_CRYPTO_PROVIDER = MQCLASS_CODE(0x8000, 0x0000, 0x0B),

	MQMSG_CLASS_NACK_Q_DELETED              = MQCLASS_CODE(0x8000, 0x4000, 0x00),
	MQMSG_CLASS_NACK_Q_PURGED               = MQCLASS_CODE(0x8000, 0x4000, 0x01),
	MQMSG_CLASS_NACK_RECEIVE_TIMEOUT        = MQCLASS_CODE(0x8000, 0x4000, 0x02),
	MQMSG_CLASS_NACK_RECEIVE_TIMEOUT_AT_SENDER = MQCLASS_CODE(0x8000, 0x4000, 0x03),

    } MQMSGCLASS;

#define DEF_MQMSG_DELIVERY_EXPRESS 0
#define DEF_MQMSG_DELIVERY_RECOVERABLE 1
    typedef
    [helpstringcontext(IDS_MQMSGDELIVERY)]
    enum _MQMSGDELIVERY {
	MQMSG_DELIVERY_EXPRESS              = DEF_MQMSG_DELIVERY_EXPRESS,
	MQMSG_DELIVERY_RECOVERABLE          = DEF_MQMSG_DELIVERY_RECOVERABLE
    } MQMSGDELIVERY;

#define DEF_MQMSG_ACKNOWLEDGMENT_NONE 0x00
    typedef [helpstringcontext(IDS_MQMSGACKNOWLEDGEMENT)]
    enum _MQMSGACKNOWLEDGEMENT {
	MQMSG_ACKNOWLEDGMENT_NONE           = DEF_MQMSG_ACKNOWLEDGMENT_NONE,
	MQMSG_ACKNOWLEDGMENT_POS_ARRIVAL    = 0x01,
	MQMSG_ACKNOWLEDGMENT_POS_RECEIVE    = 0x02,
	MQMSG_ACKNOWLEDGMENT_NEG_ARRIVAL    = 0x04,
	MQMSG_ACKNOWLEDGMENT_NEG_RECEIVE    = 0x08,

	MQMSG_ACKNOWLEDGMENT_NACK_REACH_QUEUE =
	    /* MQMSG_ACKNOWLEDGMENT_NEG_ARRIVAL */ 0x04,

	MQMSG_ACKNOWLEDGMENT_FULL_REACH_QUEUE =
	    /* MQMSG_ACKNOWLEDGMENT_NEG_ARRIVAL */ 0x04 +
	    /* MQMSG_ACKNOWLEDGMENT_POS_ARRIVAL */ 0x01,

	MQMSG_ACKNOWLEDGMENT_NACK_RECEIVE =
	    /* MQMSG_ACKNOWLEDGMENT_NEG_ARRIVAL */ 0x04 +
	    /* MQMSG_ACKNOWLEDGMENT_NEG_RECEIVE */ 0x08,

	MQMSG_ACKNOWLEDGMENT_FULL_RECEIVE =
	    /* MQMSG_ACKNOWLEDGMENT_NEG_ARRIVAL */ 0x04 +
	    /* MQMSG_ACKNOWLEDGMENT_NEG_RECEIVE */ 0x08 +
	    /* MQMSG_ACKNOWLEDGMENT_POS_RECEIVE */ 0x02
    } MQMSGACKNOWLEDGEMENT;

#define DEF_MQMSG_JOURNAL_NONE 0
    typedef [helpstringcontext(IDS_MQMSGJOURNAL)]
    enum _MQMSGJOURNAL {
      MQMSG_JOURNAL_NONE = DEF_MQMSG_JOURNAL_NONE,
      MQMSG_DEADLETTER = 1,
      MQMSG_JOURNAL = 2
    } MQMSGJOURNAL;

    typedef [helpstringcontext(IDS_MQMSGTRACE)] enum _MQMSGTRACE {
      MQMSG_TRACE_NONE = 0,
      MQMSG_SEND_ROUTE_TO_REPORT_QUEUE = 1
    } MQMSGTRACE;

#define DEF_MQMSG_SENDERID_TYPE_SID 1
    typedef [helpstringcontext(IDS_MQMSGSENDERIDTYPE)] enum _MQMSGSENDERIDTYPE {
      MQMSG_SENDERID_TYPE_NONE = 0,
      MQMSG_SENDERID_TYPE_SID = 1
    } MQMSGSENDERIDTYPE;

#define DEF_MQMSG_PRIV_LEVEL_NONE 0
    typedef [helpstringcontext(IDS_MQMSGPRIVLEVEL)] enum _MQMSGPRIVLEVEL {
      MQMSG_PRIV_LEVEL_NONE          = DEF_MQMSG_PRIV_LEVEL_NONE,
      MQMSG_PRIV_LEVEL_BODY          = 1,
      MQMSG_PRIV_LEVEL_BODY_BASE     = 1,
      MQMSG_PRIV_LEVEL_BODY_ENHANCED = 3
    } MQMSGPRIVLEVEL;

#define DEF_MQMSG_AUTH_LEVEL_NONE 0
    typedef [helpstringcontext(IDS_MQMSGAUTHLEVEL)] enum _MQMSGAUTHLEVEL {
      MQMSG_AUTH_LEVEL_NONE = DEF_MQMSG_AUTH_LEVEL_NONE,
      MQMSG_AUTH_LEVEL_ALWAYS = 1,
      MQMSG_AUTH_LEVEL_MSMQ10 = 2,
      MQMSG_AUTH_LEVEL_MSMQ20 = 4
    } MQMSGAUTHLEVEL;

    typedef [helpstringcontext(IDS_MQMSGIDSIZE)] enum _MQMSGIDSIZE {
      MQMSG_MSGID_SIZE         = 20,
      MQMSG_CORRELATIONID_SIZE = 20,
      MQMSG_XACTID_SIZE        = 20
    } MQMSGIDSIZE;

    typedef [helpstringcontext(IDS_MQMSGMAX)] enum _MQMSGMAX {
      MQ_MAX_MSG_LABEL_LEN   = 249,
    } MQMSGMAX;

    typedef [helpstringcontext(IDS_MQMSGAUTHENTICATION)] enum _MQMSGAUTHENTICATION {
      MQMSG_AUTHENTICATION_NOT_REQUESTED = 0,
      MQMSG_AUTHENTICATION_REQUESTED     = 1,
      MQMSG_AUTHENTICATION_REQUESTED_EX  = 3
    } MQMSGAUTHENTICATION;

    //
    // Queue related enums
    //
    typedef [helpstringcontext(IDS_MQSHARE)] enum _MQSHARE {
	    MQ_DENY_NONE = 0,
	    MQ_DENY_RECEIVE_SHARE = 1
    } MQSHARE;

    typedef [helpstringcontext(IDS_MQACCESS)] enum _MQACCESS {
      MQ_RECEIVE_ACCESS = 1,
      MQ_SEND_ACCESS = 2,
      MQ_PEEK_ACCESS = 0x20
    } MQACCESS;

#define DEF_MQ_JOURNAL_NONE 0
    typedef [helpstringcontext(IDS_MQJOURNAL)] enum _MQJOURNAL {
      MQ_JOURNAL_NONE = DEF_MQ_JOURNAL_NONE,
      MQ_JOURNAL = 1
    } MQJOURNAL;

#define DEF_MQ_TRANSACTIONAL_NONE 0
    typedef [helpstringcontext(IDS_MQTRANSACTIONAL)] enum _MQTRANSACTIONAL {
      MQ_TRANSACTIONAL_NONE = DEF_MQ_TRANSACTIONAL_NONE,
      MQ_TRANSACTIONAL = 1
    } MQTRANSACTIONAL;

#define DEF_MQ_AUTHENTICATE_NONE 0
    typedef [helpstringcontext(IDS_MQAUTHENTICATE)] enum _MQAUTHENTICATE {
      MQ_AUTHENTICATE_NONE = DEF_MQ_AUTHENTICATE_NONE,
      MQ_AUTHENTICATE = 1
    } MQAUTHENTICATE;

#define DEF_MQ_PRIV_LEVEL_OPTIONAL 1
    typedef [helpstringcontext(IDS_MQPRIVLEVEL)] enum _MQPRIVLEVEL {
      MQ_PRIV_LEVEL_NONE        = 0,
      MQ_PRIV_LEVEL_OPTIONAL    = DEF_MQ_PRIV_LEVEL_OPTIONAL,
      MQ_PRIV_LEVEL_BODY        = 2
    } MQPRIVLEVEL;

    typedef [helpstringcontext(IDS_MQPRIORITY)] enum _MQPRIORITY {
      MQ_MIN_PRIORITY = 0,
      MQ_MAX_PRIORITY = 7
    } MQPRIORITY;

    typedef [helpstringcontext(IDS_MQMAX)] enum _MQMAX {
      MQ_MAX_Q_NAME_LEN      = 124,
      MQ_MAX_Q_LABEL_LEN     = 124
    } MQMAX;


    //
    // default property values
    //
// ((MQ_MAX_PRIORITY + MQ_MIN_PRIORITY) >> 1)
#define DEF_DEFAULT_M_PRIORITY 3
    typedef
    [helpstringcontext(IDS_MQDEFAULT)]
    enum _MQDEFAULT {
      DEFAULT_M_PRIORITY      = DEF_DEFAULT_M_PRIORITY,
      DEFAULT_M_DELIVERY      = DEF_MQMSG_DELIVERY_EXPRESS,
      DEFAULT_M_ACKNOWLEDGE   = DEF_MQMSG_ACKNOWLEDGMENT_NONE,
      DEFAULT_M_JOURNAL       = DEF_MQMSG_JOURNAL_NONE,
      DEFAULT_M_APPSPECIFIC   = 0,
      DEFAULT_M_PRIV_LEVEL    = DEF_MQMSG_PRIV_LEVEL_NONE,
      DEFAULT_M_AUTH_LEVEL    = DEF_MQMSG_AUTH_LEVEL_NONE,
      DEFAULT_M_SENDERID_TYPE = DEF_MQMSG_SENDERID_TYPE_SID,
      DEFAULT_Q_JOURNAL       = DEF_MQ_JOURNAL_NONE,
      DEFAULT_Q_BASEPRIORITY  = 0,
      DEFAULT_Q_QUOTA         = 0xFFFFFFFF,
      DEFAULT_Q_JOURNAL_QUOTA = 0xFFFFFFFF,
      DEFAULT_Q_TRANSACTION   = DEF_MQ_TRANSACTIONAL_NONE,
      DEFAULT_Q_AUTHENTICATE  = DEF_MQ_AUTHENTICATE_NONE,
      DEFAULT_Q_PRIV_LEVEL    = DEF_MQ_PRIV_LEVEL_OPTIONAL
    } MQDEFAULT;

    //
    // Security related enums
    //

    //
    // some required NT stuff
    //
#define DELETE                           (0x00010000)
#define READ_CONTROL                     (0x00020000)
#define WRITE_DAC                        (0x00040000)
#define WRITE_OWNER                      (0x00080000)
#define SYNCHRONIZE                      (0x00100000)
//
// Queue security flags
//
#if 0
    typedef [helpstringcontext(1)] enum _MQSECFLAGS {
      MQSEC_DELETE_MESSAGE                = 0x1,
      MQSEC_PEEK_MESSAGE                  = 0x2,
      MQSEC_WRITE_MESSAGE                 = 0x4,
      MQSEC_DELETE_JOURNAL_MESSAGE        = 0x8,
      MQSEC_SET_QUEUE_PROPERTIES          = 0x10,
      MQSEC_GET_QUEUE_PROPERTIES          = 0x20,
      MQSEC_DELETE_QUEUE                  = DELETE,
      MQSEC_GET_QUEUE_PERMISSIONS         = READ_CONTROL,
      MQSEC_CHANGE_QUEUE_PERMISSIONS      = WRITE_DAC,
      MQSEC_TAKE_QUEUE_OWNERSHIP          = WRITE_OWNER,

      MQSEC_RECEIVE_MESSAGE               = (MQSEC_DELETE_MESSAGE +
					     MQSEC_PEEK_MESSAGE),

      MQSEC_RECEIVE_JOURNAL_MESSAGE       = (MQSEC_DELETE_JOURNAL_MESSAGE +
					     MQSEC_PEEK_MESSAGE),

      MQSEC_QUEUE_GENERIC_READ            = (MQSEC_GET_QUEUE_PROPERTIES +
					     MQSEC_GET_QUEUE_PERMISSIONS +
					     MQSEC_RECEIVE_MESSAGE +
					     MQSEC_RECEIVE_JOURNAL_MESSAGE),

      MQSEC_QUEUE_GENERIC_WRITE           = (MQSEC_GET_QUEUE_PROPERTIES +
					     MQSEC_GET_QUEUE_PERMISSIONS +
					     MQSEC_WRITE_MESSAGE),

      MQSEC_QUEUE_GENERIC_EXECUTE         = 0,

      MQSEC_QUEUE_GENERIC_ALL             = (MQSEC_RECEIVE_MESSAGE +
					     MQSEC_RECEIVE_JOURNAL_MESSAGE +
					     MQSEC_WRITE_MESSAGE +
					     MQSEC_SET_QUEUE_PROPERTIES +
					     MQSEC_GET_QUEUE_PROPERTIES +
					     MQSEC_DELETE_QUEUE +
					     MQSEC_GET_QUEUE_PERMISSIONS +
					     MQSEC_CHANGE_QUEUE_PERMISSIONS +
					     MQSEC_TAKE_QUEUE_OWNERSHIP)
    } MQSECFLAGS;
#endif // 0

    //
    // Return codes
    //
#define FACILITY_MQ                         0x0E

// #define MQ_E_BASE                          (0xC0000000 + (FACILITY_MQ << 16))
// #define MQ_I_BASE                          (0x40000000 + (FACILITY_MQ << 16))
#define MQ_E_BASE                          (0xC00E0000)
#define MQ_I_BASE                          (0x400E0000)


//********************************************************************
//                       E R R O R / S T A T U S   C O D E S
//********************************************************************

    typedef [helpstringcontext(IDS_MQERROR)] enum _MQERROR {
//
// MessageId: MQ_ERROR
//
// MessageText:
//
//  GenericError
//
 MQ_ERROR                         = 0xC00E0001,

//
// MessageId: MQ_ERROR_PROPERTY
//
// MessageText:
//
//  One or more of the passed properites are invalid.
//
 MQ_ERROR_PROPERTY                = 0xC00E0002,

//
// MessageId: MQ_ERROR_QUEUE_NOT_FOUND
//
// MessageText:
//
//  The queue is not registered in the DS
//
 MQ_ERROR_QUEUE_NOT_FOUND         = 0xC00E0003,

//
// MessageId: MQ_ERROR_QUEUE_EXISTS
//
// MessageText:
//
//  A queue with the same pathname is already registered
//
 MQ_ERROR_QUEUE_EXISTS            = 0xC00E0005,

//
// MessageId: MQ_ERROR_INVALID_PARAMETER
//
// MessageText:
//
//  An invalid parameter passed to a function.
//
 MQ_ERROR_INVALID_PARAMETER       = 0xC00E0006,

//
// MessageId: MQ_ERROR_INVALID_HANDLE
//
// MessageText:
//
//  An invalid handle passed to a function.
//
 MQ_ERROR_INVALID_HANDLE          = 0xC00E0007,

//
// MessageId: MQ_ERROR_OPERATION_CANCELLED
//
// MessageText:
//
//  The operation was cancelled before it could be completed.
//
 MQ_ERROR_OPERATION_CANCELLED     = 0xC00E0008,

//
// MessageId: MQ_ERROR_SHARING_VIOLATION
//
// MessageText:
//
//  Sharing violation. The queue is already opened for exclusive receive.
//
 MQ_ERROR_SHARING_VIOLATION       = 0xC00E0009,

//
// MessageId: MQ_ERROR_SERVICE_NOT_AVAILABLE
//
// MessageText:
//
//  The Message Queues service is not available
//
 MQ_ERROR_SERVICE_NOT_AVAILABLE   = 0xC00E000B,

//
// MessageId: MQ_ERROR_MACHINE_NOT_FOUND
//
// MessageText:
//
//  The specified machine could not be found.
//
 MQ_ERROR_MACHINE_NOT_FOUND       = 0xC00E000D,

//
// MessageId: MQ_ERROR_ILLEGAL_SORT
//
// MessageText:
//
//  Illegal sort specified in MQLocateBegin (e.g., duplicate columns).
//
 MQ_ERROR_ILLEGAL_SORT            = 0xC00E0010,

//
// MessageId: MQ_ERROR_ILLEGAL_USER
//
// MessageText:
//
//  The user is an illegal user.
//
 MQ_ERROR_ILLEGAL_USER            = 0xC00E0011,

//
// MessageId: MQ_ERROR_NO_DS
//
// MessageText:
//
//  No connection with this site's controller(s).
//
 MQ_ERROR_NO_DS                   = 0xC00E0013,

//
// MessageId: MQ_ERROR_ILLEGAL_QUEUE_PATHNAME
//
// MessageText:
//
//  Illegal queue path name.
//
 MQ_ERROR_ILLEGAL_QUEUE_PATHNAME  = 0xC00E0014,

//
// MessageId: MQ_ERROR_ILLEGAL_PROPERTY_VALUE
//
// MessageText:
//
//  Illegal property value.
//
 MQ_ERROR_ILLEGAL_PROPERTY_VALUE  = 0xC00E0018,

//
// MessageId: MQ_ERROR_ILLEGAL_PROPERTY_VT
//
// MessageText:
//
//  Invalid VARTYPE value.
//
 MQ_ERROR_ILLEGAL_PROPERTY_VT     = 0xC00E0019,

//
// MessageId: MQ_ERROR_BUFFER_OVERFLOW
//
// MessageText:
//
//  The buffer supplied to MQReceiveMessage for message body retrieval
//  was too small. The message is not removed from the queue and part
//  of the message body that fits in the buffer was copied.
//
 MQ_ERROR_BUFFER_OVERFLOW         = 0xC00E001A,

//
// MessageId: MQ_ERROR_IO_TIMEOUT
//
// MessageText:
//
//  The MQReceiveMessage IO timeout has expired
//
 MQ_ERROR_IO_TIMEOUT              = 0xC00E001B,

//
// MessageId: MQ_ERROR_ILLEGAL_CURSOR_ACTION
//
// MessageText:
//
//  MQ_ACTION_PEEK_NEXT specified to MQReceiveMessage can not be used with
//  the current cursor position.
//
 MQ_ERROR_ILLEGAL_CURSOR_ACTION   = 0xC00E001C,

//
// MessageId: MQ_ERROR_MESSAGE_ALREADY_RECEIVED
//
// MessageText:
//
//  A message that is currently pointed at by the cursor has been removed from
//  the queue by another process or by another call to MQReceiveMessage
//  without the use of this cursor.
//
 MQ_ERROR_MESSAGE_ALREADY_RECEIVED = 0xC00E001D,

//
// MessageId: MQ_ERROR_ILLEGAL_FORMATNAME
//
// MessageText:
//
//  The given format name is invalid.
//
 MQ_ERROR_ILLEGAL_FORMATNAME      = 0xC00E001E,

//
// MessageId: MQ_ERROR_FORMATNAME_BUFFER_TOO_SMALL
//
// MessageText:
//
//  The format name buffer supplied to the api was too small
//  to fit the format name
//
 MQ_ERROR_FORMATNAME_BUFFER_TOO_SMALL = 0xC00E001F,

//
// MessageId: MQ_ERROR_UNSUPPORTED_FORMATNAME_OPERATION
//
// MessageText:
//
//  The requested operation for the specified format name is not
//  supported (e.g., delete a direct queue format name).
//
 MQ_ERROR_UNSUPPORTED_FORMATNAME_OPERATION = 0xC00E0020,

//
// MessageId: MQ_ERROR_ILLEGAL_SECURITY_DESCRIPTOR
//
// MessageText:
//
//  The specified security descriptor is not a valid security descriptor.
//
 MQ_ERROR_ILLEGAL_SECURITY_DESCRIPTOR = 0xC00E0021,

//
// MessageId: MQ_ERROR_SENDERID_BUFFER_TOO_SMALL
//
// MessageText:
//
//  The passed buffer for the user ID property is too small.
//
 MQ_ERROR_SENDERID_BUFFER_TOO_SMALL = 0xC00E0022,

//
// MessageId: MQ_ERROR_SECURITY_DESCRIPTOR_TOO_SMALL
//
// MessageText:
//
//  The size of the buffer passed to MQGetQueueSecurity is too small.
//
 MQ_ERROR_SECURITY_DESCRIPTOR_TOO_SMALL = 0xC00E0023,

//
// MessageId: MQ_ERROR_CANNOT_IMPERSONATE_CLIENT
//
// MessageText:
//
//  The RPC server can not impersonate the client application, hence security
//  credentials could not be verified.
//
 MQ_ERROR_CANNOT_IMPERSONATE_CLIENT = 0xC00E0024,

//
// MessageId: MQ_ERROR_ACCESS_DENIED
//
// MessageText:
//
//  Access is denied.
//
 MQ_ERROR_ACCESS_DENIED           = 0xC00E0025,

//
// MessageId: MQ_ERROR_PRIVILEGE_NOT_HELD
//
// MessageText:
//
//  Client does not have the required privileges to perform the operation.
//
 MQ_ERROR_PRIVILEGE_NOT_HELD      = 0xC00E0026,

//
// MessageId: MQ_ERROR_INSUFFICIENT_RESOURCES
//
// MessageText:
//
//  Insufficient resources to perform operation.
//
 MQ_ERROR_INSUFFICIENT_RESOURCES  = 0xC00E0027,

//
// MessageId: MQ_ERROR_USER_BUFFER_TOO_SMALL
//
// MessageText:
//
//  Request failed because user buffer is too small to hold the returned information
//
 MQ_ERROR_USER_BUFFER_TOO_SMALL   = 0xC00E0028,

//
// MessageId: MQ_ERROR_MESSAGE_STORAGE_FAILED
//
// MessageText:
//
//  Could not store a recoverable or journal message. Message was not sent
//
 MQ_ERROR_MESSAGE_STORAGE_FAILED  = 0xC00E002A,

//
// MessageId: MQ_ERROR_SENDER_CERT_BUFFER_TOO_SMALL
//
// MessageText:
//
//  The passed buffer for the user certificate property is too small.
//
 MQ_ERROR_SENDER_CERT_BUFFER_TOO_SMALL = 0xC00E002B,

//
// MessageId: MQ_ERROR_INVALID_CERTIFICATE
//
// MessageText:
//
//  The passed buffer for the user certificate property is too small.
//
 MQ_ERROR_INVALID_CERTIFICATE     = 0xC00E002C,

//
// MessageId: MQ_ERROR_CORRUPTED_INTERNAL_CERTIFICATE
//
// MessageText:
//
//  The internal MSMQ certificate is corrupted.
//
 MQ_ERROR_CORRUPTED_INTERNAL_CERTIFICATE = 0xC00E002D,

//
// MessageId: MQ_ERROR_INTERNAL_USER_CERT_EXIST
//
// MessageText:
//
//  The internal MSMQ certificate already exist for this user.
//
 MQ_ERROR_INTERNAL_USER_CERT_EXIST = 0xC00E002E,

//
// MessageId: MQ_ERROR_NO_INTERNAL_USER_CERT
//
// MessageText:
//
//  The internal MSMQ certificate for the user does not exist.
//
 MQ_ERROR_NO_INTERNAL_USER_CERT   = 0xC00E002F,

//
// MessageId: MQ_ERROR_CORRUPTED_SECURITY_DATA
//
// MessageText:
//
//  A cryptogrphic function has failed.
//
 MQ_ERROR_CORRUPTED_SECURITY_DATA = 0xC00E0030,

//
// MessageId: MQ_ERROR_CORRUPTED_PERSONAL_CERT_STORE
//
// MessageText:
//
//  The personal certificate store is corrupted.
//
 MQ_ERROR_CORRUPTED_PERSONAL_CERT_STORE = 0xC00E0031,

//
// MessageId: MQ_ERROR_COMPUTER_DOES_NOT_SUPPORT_ENCRYPTION
//
// MessageText:
//
//  The computer does not support encryption operations.
//
 MQ_ERROR_COMPUTER_DOES_NOT_SUPPORT_ENCRYPTION = 0xC00E0033,

//
// MessageId: MQ_ERROR_BAD_SECURITY_CONTEXT
//
// MessageText:
//
//  Bad security context.
//
 MQ_ERROR_BAD_SECURITY_CONTEXT    = 0xC00E0035,

//
// MessageId: MQ_ERROR_COULD_NOT_GET_USER_SID
//
// MessageText:
//
//  Could not get the SID information out of the thread token.
//
 MQ_ERROR_COULD_NOT_GET_USER_SID  = 0xC00E0036,

//
// MessageId: MQ_ERROR_COULD_NOT_GET_ACCOUNT_INFO
//
// MessageText:
//
//  Could not get the account information for the user.
//
 MQ_ERROR_COULD_NOT_GET_ACCOUNT_INFO = 0xC00E0037,

//
// MessageId: MQ_ERROR_ILLEGAL_MQCOLUMNS
//
// MessageText:
//
//  Invalid MQCOLUMNS parameter
//
 MQ_ERROR_ILLEGAL_MQCOLUMNS       = 0xC00E0038,

//
// MessageId: MQ_ERROR_ILLEGAL_PROPID
//
// MessageText:
//
//  Invalid propid value
//
 MQ_ERROR_ILLEGAL_PROPID          = 0xC00E0039,

//
// MessageId: MQ_ERROR_ILLEGAL_RELATION
//
// MessageText:
//
//  Invalid relation value in restriction
//
 MQ_ERROR_ILLEGAL_RELATION        = 0xC00E003A,

//
// MessageId: MQ_ERROR_ILLEGAL_PROPERTY_SIZE
//
// MessageText:
//
//  ILLEGAL Property Buffer Size
//
 MQ_ERROR_ILLEGAL_PROPERTY_SIZE   = 0xC00E003B,

//
// MessageId: MQ_ERROR_ILLEGAL_RESTRICTION_PROPID
//
// MessageText:
//
//  Invalid propid value in MQRESTRICTION paramter
//
 MQ_ERROR_ILLEGAL_RESTRICTION_PROPID = 0xC00E003C,

//
// MessageId: MQ_ERROR_ILLEGAL_MQQUEUEPROPS
//
// MessageText:
//
//  Illegal MQQUEUEPROPS paramter, either null or with zero properties
//
 MQ_ERROR_ILLEGAL_MQQUEUEPROPS    = 0xC00E003D,

//
// MessageId: MQ_ERROR_PROPERTY_NOTALLOWED
//
// MessageText:
//
//  Invalid propid for the requested operation (e.g. PROPID_Q_INSTANCE
//  in MQSetQueueProperties)
//
 MQ_ERROR_PROPERTY_NOTALLOWED     = 0xC00E003E,

//
// MessageId: MQ_ERROR_INSUFFICIENT_PROPERTIES
//
// MessageText:
//
//  Not all the required properties for the operation were specified
//  in the input paramters
//
 MQ_ERROR_INSUFFICIENT_PROPERTIES = 0xC00E003F,

//
// MessageId: MQ_ERROR_MACHINE_EXISTS
//
// MessageText:
//
//  Computer with the same name already exists in the site.
//
 MQ_ERROR_MACHINE_EXISTS          = 0xC00E0040,

//
// MessageId: MQ_ERROR_ILLEGAL_MQQMPROPS
//
// MessageText:
//
//  Illegal MQQMPROPS paramter, either null or with zero properties
//
 MQ_ERROR_ILLEGAL_MQQMPROPS       = 0xC00E0041,

//
// MessageId: MQ_ERROR_DS_IS_FUL,
//
// MessageText:
//
//  DS is full
//
 MQ_ERROR_DS_IS_FULL              = 0xC00E0042,

//
// MessageId: MQ_ERROR_DS_ERROR
//
// MessageText:
//
//  Internal DS error.
//
 MQ_ERROR_DS_ERROR                = 0xC00E0043,

//
// MessageId: MQ_ERROR_INVALID_OWNER
//
// MessageText:
//
//  Invalid object owner. For example MQCreateQueue failed because the QM
//  object is invalid
//
 MQ_ERROR_INVALID_OWNER           = 0xC00E0044,

//
// MessageId: MQ_ERROR_UNSUPPORTED_ACCESS_MODE
//
// MessageText:
//
//  The specified access mode is not supported.
//
 MQ_ERROR_UNSUPPORTED_ACCESS_MODE = 0xC00E0045,

//
// MessageId: MQ_ERROR_RESULT_BUFFER_TOO_SMALL
//
// MessageText:
//
//  The supplied result buffer is too small
//
 MQ_ERROR_RESULT_BUFFER_TOO_SMALL = 0xC00E0046,

//
// MessageId: MQ_ERROR_DELETE_CN_IN_USE
//
// MessageText:
//
//  The Connected Network can not be deleted, it is in use.
//
 MQ_ERROR_DELETE_CN_IN_USE        = 0xC00E0048,

//
// MessageId: MQ_ERROR_NO_RESPONSE_FROM_OBJECT_SERVER
//
// MessageText:
//
//  No response from object owner.
//
 MQ_ERROR_NO_RESPONSE_FROM_OBJECT_SERVER = 0xC00E0049,

//
// MessageId: MQ_ERROR_OBJECT_SERVER_NOT_AVAILABLE
//
// MessageText:
//
//  Object owner is not reachable.
//
 MQ_ERROR_OBJECT_SERVER_NOT_AVAILABLE = 0xC00E004A,

//
// MessageId: MQ_ERROR_QUEUE_NOT_AVAILABLE
//
// MessageText:
//
//  Error while reading from a queue residing on a remote computer
//
 MQ_ERROR_QUEUE_NOT_AVAILABLE     = 0xC00E004B,

//
// MessageId: MQ_ERROR_DTC_CONNECT
//
// MessageText:
//
//  Cannot connect to MS DTC
//
 MQ_ERROR_DTC_CONNECT             = 0xC00E004C,

//
// MessageId: MQ_ERROR_TRANSACTION_IMPORT
//
// MessageText:
//
//  Cannot import the transaction
//
 MQ_ERROR_TRANSACTION_IMPORT      = 0xC00E004E,

//
// MessageId: MQ_ERROR_TRANSACTION_USAGE
//
// MessageText:
//
//  Wrong transaction usage
//
 MQ_ERROR_TRANSACTION_USAGE       = 0xC00E0050,

//
// MessageId: MQ_ERROR_TRANSACTION_SEQUENCE
//
// MessageText:
//
//  Wrong transaction operations sequence
//
 MQ_ERROR_TRANSACTION_SEQUENCE    = 0xC00E0051,

//
// MessageId: MQ_ERROR_MISSING_CONNECTOR_TYPE
//
// MessageText:
//
//  Connector Type is mandatory when sending Acknowledgment or secure message
//
 MQ_ERROR_MISSING_CONNECTOR_TYPE  = 0xC00E0055,

//
// MessageId: MQ_ERROR_STALE_HANDLE
//
// MessageText:
//
//  The Queue manager service has been restarted. The queue handle
//  is stale, and should be closed.
//
 MQ_ERROR_STALE_HANDLE            = 0xC00E0056,

//
// MessageId: MQ_ERROR_TRANSACTION_ENLIST
//
// MessageText:
//
//  Cannot enlist the transaction
//
 MQ_ERROR_TRANSACTION_ENLIST      = 0xC00E0058,

//
// MessageId: MQ_ERROR_QUEUE_DELETED
//
// MessageText:
//
//  The queue was deleted. Messages can not be received anymore using this
//  queue handle. The handle should be closed
//
 MQ_ERROR_QUEUE_DELETED           = 0xC00E005A,

//
// MessageId: MQ_ERROR_ILLEGAL_CONTEXT
//
// MessageText:
//
//  Invalid context parameter ( MQLocateBegin).
//
 MQ_ERROR_ILLEGAL_CONTEXT         = 0xC00E005B,

//
// MessageId: MQ_ERROR_ILLEGAL_SORT_PROPID
//
// MessageText:
//
//  Invalid propid value in MQSORTSET
//
 MQ_ERROR_ILLEGAL_SORT_PROPID     = 0xC00E005C,

//
// MessageId: MQ_ERROR_LABEL_TOO_LONG
//
// MessageText:
//
//  The passed label is too long. It should be less or equal to MQ_MAX_MSG_LABEL_LEN
//
 MQ_ERROR_LABEL_TOO_LONG          = 0xC00E005D,

//
// MessageId: MQ_ERROR_LABEL_BUFFER_TOO_SMALL
//
// MessageText:
//
//  The label buffer supplied to the api was too small
//
 MQ_ERROR_LABEL_BUFFER_TOO_SMALL  = 0xC00E005E,

//
// MessageId: MQ_ERROR_MQIS_SERVER_EMPTY
//
// MessageText:
//
//  The list of MQIS servers (in registry) is empty.
//
 MQ_ERROR_MQIS_SERVER_EMPTY       = 0xC00E005F,

//
// MessageId: MQ_ERROR_MQIS_READONLY_MODE
//
// MessageText:
//
//  MQIS database is in readonly mode.
//
 MQ_ERROR_MQIS_READONLY_MODE      = 0xC00E0060,

//
//
// MessageId: MQ_ERROR_SYMM_KEY_BUFFER_TOO_SMALL
//
// MessageText:
//
//  The passed buffer for the Symmetric key property is too small.
//
 MQ_ERROR_SYMM_KEY_BUFFER_TOO_SMALL     = 0xC00E0061,

//
//
// MessageId: MQ_ERROR_SIGNATURE_BUFFER_TOO_SMALL
//
// MessageText:
//
//  The passed buffer for the Signature property is too small.
//
 MQ_ERROR_SIGNATURE_BUFFER_TOO_SMALL    = 0xC00E0062,

//
//
// MessageId: MQ_ERROR_PROV_NAME_BUFFER_TOO_SMALL
//
// MessageText:
//
//  The passed buffer for the Provider name property is too small.
//
 MQ_ERROR_PROV_NAME_BUFFER_TOO_SMALL    = 0xC00E0063,

//
//
// MessageId: MQ_ERROR_ILLEGAL_OPERATION
//
// MessageText:
//
//  The operation is illegal on foreign message queuing system
//
 MQ_ERROR_ILLEGAL_OPERATION             = 0xC00E0064,

//
//
// MessageId: MQ_ERROR_WRITE_NOT_ALLOWED
//
// MessageText:
//
//  Another MQIS server is being installed, write operations to the
//  database are not allowed at this stage.
//
 MQ_ERROR_WRITE_NOT_ALLOWED             = 0xC00E0065,

//
// MessageId: MQ_ERROR_WKS_CANT_SERVE_CLIENT
//
// MessageText:
//
//  MSMQ independent clients cannot serve MSMQ dependent clients.
//
 MQ_ERROR_WKS_CANT_SERVE_CLIENT         = 0xC00E0066L,

//
//
// MessageId: MQ_ERROR_DEPEND_WKS_LICENSE_OVERFLOW
//
// MessageText:
//
//  The number of dependent clients served by this MSMQ server reached
//  its upper limit.
//
 MQ_ERROR_DEPEND_WKS_LICENSE_OVERFLOW   = 0xC00E0067L,

//
//
// MessageId: MQ_CORRUPTED_QUEUE_WAS_DELETED
//
// MessageText:
//
//  Ini file for queue %1 in LQS was deleted because it was corrupted.
//
 MQ_CORRUPTED_QUEUE_WAS_DELETED         = 0xC00E0068L,

//
//
// MessageId: MQ_ERROR_REMOTE_MACHINE_NOT_AVAILABLE
//
// MessageText:
//
//  The remote machine is not available.
//
 MQ_ERROR_REMOTE_MACHINE_NOT_AVAILABLE   = 0xC00E0069L,

//
//
// MessageId: MQ_ERROR_UNSUPPORTED_OPERATION
//
// MessageText:
//
//  Operation is not supported for WORKGROUP installation computer.
//
 MQ_ERROR_UNSUPPORTED_OPERATION          = 0xC00E006AL,

//
//
// MessageId: MQ_ERROR_ENCRYPTION_PROVIDER_NOT_SUPPORTED
//
// MessageText:
//
//  The encryption provider %1 is not supported by MSMQ
//
 MQ_ERROR_ENCRYPTION_PROVIDER_NOT_SUPPORTED = 0xC00E006BL,

//
//
// MessageId: MQ_ERROR_CANNOT_SET_CRYPTO_SEC_DESCR
//
// MessageText:
//
//  Can't set the security descriptor of the machine keys set.
//
 MQ_ERROR_CANNOT_SET_CRYPTO_SEC_DESCR = 0xC00E006CL,

//
//
// MessageId: MQ_ERROR_CERTIFICATE_NOT_PROVIDED
//
// MessageText:
//
//  User tries to send authenticated message without providing a certificate.
//
 MQ_ERROR_CERTIFICATE_NOT_PROVIDED = 0xC00E006DL,

//
//
// MessageId: MQ_ERROR_Q_DNS_PROPERTY_NOT_SUPPORTED
//
// MessageText:
//
//  Column PROPID_Q_PATHNAME_DNS is not supported in
//  MQLocateBegin API.
//
 MQ_ERROR_Q_DNS_PROPERTY_NOT_SUPPORTED   = 0xC00E006EL,

//
//
// MessageId: MQ_ERROR_CANT_CREATE_CERT_STORE
//
// MessageText:
//
//  Can not create a certificates store for internal certificate.
//
 MQ_ERROR_CANT_CREATE_CERT_STORE   = 0xC00E006FL,
 MQ_ERROR_CANNOT_CREATE_CERT_STORE = 0xC00E006FL,

//
//
// MessageId: MQ_ERROR_CANT_OPEN_CERT_STORE
//
// MessageText:
//
//  Can not open the certificates store of internal certificate.
//
 MQ_ERROR_CANT_OPEN_CERT_STORE   = 0xC00E0070L,
 MQ_ERROR_CANNOT_OPEN_CERT_STORE = 0xC00E0070L,

//
//
// MessageId: MQ_ERROR_ILLEGAL_ENTERPRISE_OPERATION
//
// MessageText:
//
//  The operation is invalid for a msmqServices object.
//
 MQ_ERROR_ILLEGAL_ENTERPRISE_OPERATION = 0xC00E0071L,

//
//
// MessageId: MQ_ERROR_CANNOT_GRANT_ADD_GUID
//
// MessageText:
//
//  Failed to grant the "Add Guid" permission to current user.
//
 MQ_ERROR_CANNOT_GRANT_ADD_GUID = 0xC00E0072L,

//
//
// MessageId: MQ_ERROR_CANNOT_LOAD_MSMQOCM
//
// MessageText:
//
//  Can't load the MSMQOCM.DLL library.
//
 MQ_ERROR_CANNOT_LOAD_MSMQOCM = 0xC00E0073L,

//
//
// MessageId: MQ_ERROR_NO_ENTRY_POINT_MSMQOCM
//
// MessageText:
//
//  Can't locate an entry point in the MSMQOCM.DLL library.
//
 MQ_ERROR_NO_ENTRY_POINT_MSMQOCM = 0xC00E0074L,

//
//
// MessageId: MQ_ERROR_NO_MSMQ_SERVERS_ON_DC
//
// MessageText:
//
//  Could not find MSMQ servers on domain controllers.
//
 MQ_ERROR_NO_MSMQ_SERVERS_ON_DC = 0xC00E0075L,

//
//
// MessageId: MQ_ERROR_CANNOT_JOIN_DOMAIN
//
// MessageText:
//
//  Failed to join MSMQ enterprise on Windows 2000 domain.
//
 MQ_ERROR_CANNOT_JOIN_DOMAIN = 0xC00E0076L,

//
//
// MessageId: MQ_ERROR_CANNOT_CREATE_ON_GC
//
// MessageText:
//
//  Failed to create an object on a specified GC server.
//
 MQ_ERROR_CANNOT_CREATE_ON_GC = 0xC00E0077L,

//
//
// MessageId: MQ_ERROR_GUID_NOT_MATCHING
//
// MessageText:
//
//  Failed to create msmqConfiguration object with GUID that match machine installation. You must uninstall MSMQ and then reinstall it.
//
 MQ_ERROR_GUID_NOT_MATCHING = 0xC00E0078L,

//
// MessageId: MQ_ERROR_PUBLIC_KEY_NOT_FOUND
//
// MessageText:
//
//  Unable to find the public key for computer %1
//
 MQ_ERROR_PUBLIC_KEY_NOT_FOUND = 0xC00E0079L,

//
// MessageId: MQ_ERROR_PUBLIC_KEY_DOES_NOT_EXIST
//
// MessageText:
//
//  The public key for computer %1 does not exist
//
 MQ_ERROR_PUBLIC_KEY_DOES_NOT_EXIST = 0xC00E007AL,

//
//
// MessageId: MQ_ERROR_ILLEGAL_MQPRIVATEPROPS
//
// MessageText:
//
//  The  MQPRIVATEPROPS parameter value is invalid. This may be because it has a  null value or has zero properties specified.
//
 MQ_ERROR_ILLEGAL_MQPRIVATEPROPS = 0xC00E007BL,

//
//
// MessageId: MQ_ERROR_NO_GC_IN_DOMAIN
//
// MessageText:
//
//  Unable to find Global Catalog servers in the specified domain.
//
 MQ_ERROR_NO_GC_IN_DOMAIN = 0xC00E007CL,

//
//
// MessageId: MQ_ERROR_NO_MSMQ_SERVERS_ON_GC
//
// MessageText:
//
//  Failed to find Message Queuing servers on Global Catalog domain controllers.
//
 MQ_ERROR_NO_MSMQ_SERVERS_ON_GC = 0xC00E007DL,

//
//
// MessageId: MQ_ERROR_CANNOT_GET_DN
//
// MessageText:
//
//  Failed to retrieve the distinguished name of local computer.
//
 MQ_ERROR_CANNOT_GET_DN = 0xC00E007EL,

//
//
// MessageId: MQ_ERROR_CANNOT_HASH_DATA_EX
//
// MessageText:
//
//  Unable to hash data for an authenticated message.
//
 MQ_ERROR_CANNOT_HASH_DATA_EX = 0xC00E007FL,

//
//
// MessageId: MQ_ERROR_CANNOT_SIGN_DATA_EX
//
// MessageText:
//
//  Unable to sign data before sending an authenticated message.
//
 MQ_ERROR_CANNOT_SIGN_DATA_EX = 0xC00E0080L,

//
//
// MessageId: MQ_ERROR_CANNOT_CREATE_HASH_EX
//
// MessageText:
//
//  Unable to create hash object for an authenticated message.
//
 MQ_ERROR_CANNOT_CREATE_HASH_EX = 0xC00E0081L,

//
//
// MessageId: MQ_ERROR_FAIL_VERIFY_SIGNATURE_EX
//
// MessageText:
//
//  Signature of recieved message is not valid.
//
 MQ_ERROR_FAIL_VERIFY_SIGNATURE_EX = 0xC00E0082L

    } MQERROR;





//
// Informational
//
    typedef [helpstringcontext(IDS_MQWARNING)] enum _MQWARNING {
//
// Informational
//
//
// MessageId: MQ_INFORMATION_PROPERTY
//
// MessageText:
//
//  One or more of the passed properites resulted in warning but the
//  function completed.
//
 MQ_INFORMATION_PROPERTY          = 0x400E0001,

//
// MessageId: MQ_INFORMATION_ILLEGAL_PROPERTY
//
// MessageText:
//
//  Invalid property id.
//
 MQ_INFORMATION_ILLEGAL_PROPERTY  = 0x400E0002,

//
// MessageId: MQ_INFORMATION_PROPERTY_IGNORED
//
// MessageText:
//
//  The specified property is ignored in this operation
//  (e.g., PROPID_M_SENDERID in SendMessage().
//
 MQ_INFORMATION_PROPERTY_IGNORED  = 0x400E0003,

//
// MessageId: MQ_INFORMATION_UNSUPPORTED_PROPERTY
//
// MessageText:
//
//  The specified property is not supprted and is ignored in this operation
//
 MQ_INFORMATION_UNSUPPORTED_PROPERTY = 0x400E0004,

//
// MessageId: MQ_INFORMATION_DUPLICATE_PROPERTY
//
// MessageText:
//
//  The specified property already appeared in the propid array, and is
//  ignored in this operation
//
 MQ_INFORMATION_DUPLICATE_PROPERTY = 0x400E0005,

//
// MessageId: MQ_INFORMATION_OPERATION_PENDING
//
// MessageText:
//
//  Asynchronous operation is currently pending.
//
 MQ_INFORMATION_OPERATION_PENDING = 0x400E0006,

//
// MessageId: MQ_INFORMATION_FORMATNAME_BUFFER_TOO_SMALL
//
// MessageText:
//
//  The format name buffer supplied to MQCreateQueue was too small
//  to fit the format name. Queue was created successfuly
//
 MQ_INFORMATION_FORMATNAME_BUFFER_TOO_SMALL = 0x400E0009,

//
// MessageId: MQ_INFORMATION_INTERNAL_USER_CERT_EXIST
//
// MessageText:
//
//  The internal MSMQ certificate already exists for this user.
//
 MQ_INFORMATION_INTERNAL_USER_CERT_EXIST    = 0x400E000AL,

// MessageId: MQ_INFORMATION_OWNER_IGNORED
//
// MessageText:
//
//  Owner of queue was not set while processing this call to MQSetQueueSecurity().
//
 MQ_INFORMATION_OWNER_IGNORED               = 0x400E000BL

    } MQWARNING;


#if 0
//
// Upgrade principals used in this COM model from MSQM 1.0 to MSMQ 2.0.
//
// New interfaces are marked with the suffix 2
// New interfaces are the default interface for the coclass
// New interfaces are binary compatible to old interfaces
// Old interfaces that use interfaces that were upgraded, were upgraded as well, and the
//   respective members were changed in-place to use the new interfaces. This requires cooperation
//   in the code - these members need to behave in a certain way:
//       when returning interfaces - we return the upgraded one. since it is binary compatible
//          to the old one we're fine.
//       when using interfaces in a method - we assume we got old interfaces, and if we don't need new
//          functionality, we just cast to the old interface and use it. If we need new functionality
//          we need to QI for the new interface
//       when storing interfaces between methods - we QI for new interface. In almost all cases we
//          will succeed, since the underlying object is ours, however if in some weird scenario the
//          underlying object is not ours, it might return an error to the QI for new interface, therefore
//          we QI for the old one, and store the old one. In this case - for a later get_ we need to know
//          which interfaces initiates the get_, if it is the old one, then no problem we can
//          return the stored old interface, but if it is the new one, we need to return an error, sincew
//          the new one expects a new interface back. This is why we introduce _v1 members.
//
// RaananH Jun 16th, 1999
//
// We also added to all new interfaces a hidden member called Properties. This is a stub that is not
// implemented yet, but in the future it will return a properties collection and will allow
// us to add new properties to the object and access them without upgrading the interface. This
// property already existed on msg and qinfo, but now it is on all the other new interfaces as well.
// RaananH Jul 7th, 1999
//
#endif //0

    // base dispatch interface for CMSMQQuery object
    //
    [
	uuid(D7D6E072-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_IMSMQQUERY),
	hidden,
	dual,
	nonextensible,
	odl
    ]
    interface IMSMQQuery : IDispatch {

	// properties
	//

	// methods
	//
	[helpstringcontext(IDS_LookupQueue)]
	HRESULT LookupQueue([in, optional] VARIANT *QueueGuid,
			    [in, optional] VARIANT *ServiceTypeGuid,
			    [in, optional] VARIANT *Label,
			    [in, optional] VARIANT *CreateTime,
			    [in, optional] VARIANT *ModifyTime,
			    [in, optional] VARIANT *RelServiceType,
			    [in, optional] VARIANT *RelLabel,
			    [in, optional] VARIANT *RelCreateTime,
			    [in, optional] VARIANT *RelModifyTime,
			    [out, retval] IMSMQQueueInfos **ppqinfos);
    };

    // primary dispatch interface for CMSMQQuery object
    // binary compatible to IMSMQQuery
    //
    [
	uuid(eba96b0e-2168-11d3-898c-00e02c074f6b),
	helpstringcontext(IDS_IMSMQQUERY2),
	hidden,
	dual,
	nonextensible,
	odl
    ]
    interface IMSMQQuery2 : IDispatch {
	//
	// first part is like IMSMQQuery, just uses upgrades interfaces
	//
	[helpstringcontext(IDS_LookupQueue)]
	HRESULT LookupQueue([in, optional] VARIANT *QueueGuid,
			    [in, optional] VARIANT *ServiceTypeGuid,
			    [in, optional] VARIANT *Label,
			    [in, optional] VARIANT *CreateTime,
			    [in, optional] VARIANT *ModifyTime,
			    [in, optional] VARIANT *RelServiceType,
			    [in, optional] VARIANT *RelLabel,
			    [in, optional] VARIANT *RelCreateTime,
			    [in, optional] VARIANT *RelModifyTime,
			    [out, retval] IMSMQQueueInfos2 **ppqinfos);
	//
	// IMSMQQuery2 new members
	//
	[hidden, propget, id(DISPID_MQQUERY_PROPERTIES)]
	HRESULT Properties([out, retval] IDispatch **ppcolProperties);
    };

    // coclass for CMSMQQuery objects
    //
    [
	uuid(D7D6E073-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_MSMQQUERY)
    ]
    coclass MSMQQuery {
	                  interface IMSMQQuery;
	[default]         interface IMSMQQuery2;
    };


    // base dispatch interface for CMSMQMessage object
    //
    [
	uuid(D7D6E074-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_IMSMQMESSAGE),
	hidden,
	dual,
	odl
    ]
    interface IMSMQMessage : IDispatch {
	// properties
	//
	[helpstringcontext(IDS_lClass), propget, id(DISPID_MQMESSAGE_MSGCLASS)]
	HRESULT Class([out, retval] long *plClass);

	[helpstringcontext(IDS_lPrivLevel), propget, id(DISPID_MQMESSAGE_PRIVLEVEL)]
	HRESULT PrivLevel([out, retval] long *plPrivLevel);
	[helpstringcontext(IDS_lPrivLevel), propput, id(DISPID_MQMESSAGE_PRIVLEVEL)]
	HRESULT PrivLevel([in] long lPrivLevel);

	[helpstringcontext(IDS_lAuthLevel), propget, id(DISPID_MQMESSAGE_AUTHLEVEL)]
	HRESULT AuthLevel([out, retval] long *plAuthLevel);
	[helpstringcontext(IDS_lAuthLevel), propput, id(DISPID_MQMESSAGE_AUTHLEVEL)]
	HRESULT AuthLevel([in] long lAuthLevel);

	[helpstringcontext(IDS_isAuthenticated), propget, id(DISPID_MQMESSAGE_AUTHENTICATED)]
	HRESULT IsAuthenticated([out, retval] Boolean *pisAuthenticated);

	[helpstringcontext(IDS_lDelivery), propget, id(DISPID_MQMESSAGE_DELIVERY)]
	HRESULT Delivery([out, retval] long *plDelivery);
	[helpstringcontext(IDS_lDelivery), propput, id(DISPID_MQMESSAGE_DELIVERY)]
	HRESULT Delivery([in] long lDelivery);

	[helpstringcontext(IDS_lTrace), propget, id(DISPID_MQMESSAGE_TRACE)]
	HRESULT Trace([out, retval] long *plTrace);
	[helpstringcontext(IDS_lTrace), propput, id(DISPID_MQMESSAGE_TRACE)]
	HRESULT Trace([in] long lTrace);

	[helpstringcontext(IDS_lPriority), propget, id(DISPID_MQMESSAGE_PRIORITY)]
	HRESULT Priority([out, retval] long *plPriority);
	[helpstringcontext(IDS_lPriority), propput, id(DISPID_MQMESSAGE_PRIORITY)]
	HRESULT Priority([in] long lPriority);

	[helpstringcontext(IDS_lJournal), propget, id(DISPID_MQMESSAGE_JOURNAL)]
	HRESULT Journal([out, retval] long *plJournal);
	[helpstringcontext(IDS_lJournal), propput, id(DISPID_MQMESSAGE_JOURNAL)]
	HRESULT Journal([in] long lJournal);

	[helpstringcontext(IDS_queueinfoResponse), propget, id(DISPID_MQMESSAGE_QUEUEINFORESPONSE)]
	HRESULT ResponseQueueInfo([out, retval] IMSMQQueueInfo **ppqinfoResponse);
	[helpstringcontext(IDS_queueinfoResponse), propputref, id(DISPID_MQMESSAGE_QUEUEINFORESPONSE)]
	HRESULT ResponseQueueInfo([in] IMSMQQueueInfo *pqinfoResponse);

	[helpstringcontext(IDS_lAppSpecific), propget, id(DISPID_MQMESSAGE_APPSPECIFIC)]
	HRESULT AppSpecific([out, retval] long *plAppSpecific);
	[helpstringcontext(IDS_lAppSpecific), propput, id(DISPID_MQMESSAGE_APPSPECIFIC)]
	HRESULT AppSpecific([in] long lAppSpecific);

	[helpstringcontext(IDS_guidSrcMachine), propget, id(DISPID_MQMESSAGE_GUIDSRCMACHINE)]
	HRESULT SourceMachineGuid([out, retval] BSTR *pbstrGuidSrcMachine);

	[helpstringcontext(IDS_lenBody), propget, id(DISPID_MQMESSAGE_LENBODY)]
	HRESULT BodyLength([out, retval] long *pcbBody);

	[helpstringcontext(IDS_body), propget, id(DISPID_MQMESSAGE_BODY)]
	HRESULT Body([out, retval] VARIANT *pvarBody);
	[helpstringcontext(IDS_body), propput, id(DISPID_MQMESSAGE_BODY)]
	HRESULT Body([in] VARIANT varBody);

	[helpstringcontext(IDS_queueinfoAdmin), propget, id(DISPID_MQMESSAGE_QUEUEINFOADMIN)]
	HRESULT AdminQueueInfo([out, retval] IMSMQQueueInfo **ppqinfoAdmin);
	[helpstringcontext(IDS_queueinfoAdmin), propputref, id(DISPID_MQMESSAGE_QUEUEINFOADMIN)]
	HRESULT AdminQueueInfo([in] IMSMQQueueInfo *pqinfoAdmin);

	[helpstringcontext(IDS_id), propget, id(DISPID_MQMESSAGE_ID)]
	HRESULT Id([out, retval] VARIANT *pvarMsgId);

	[helpstringcontext(IDS_idCorrelation), propget, id(DISPID_MQMESSAGE_IDCORRELATION)]
	HRESULT CorrelationId([out, retval] VARIANT *pvarMsgId);
	[helpstringcontext(IDS_idCorrelation), propput, id(DISPID_MQMESSAGE_IDCORRELATION)]
	HRESULT CorrelationId([in] VARIANT varMsgId);

	[helpstringcontext(IDS_lAck), propget, id(DISPID_MQMESSAGE_ACKNOWLEDGE)]
	HRESULT Ack([out, retval] long *plAck);
	[helpstringcontext(IDS_lAck), propput, id(DISPID_MQMESSAGE_ACKNOWLEDGE)]
	HRESULT Ack([in] long lAck);

	[helpstringcontext(IDS_strLabel), propget, id(DISPID_MQMESSAGE_LABEL)]
	HRESULT Label([out, retval] BSTR *pbstrLabel);
	[helpstringcontext(IDS_strLabel), propput, id(DISPID_MQMESSAGE_LABEL)]
	HRESULT Label([in] BSTR bstrLabel);

	[helpstringcontext(IDS_lMaxTimeToReachQueue), propget, id(DISPID_MQMESSAGE_MAXTIMETOREACHQUEUE)]
	HRESULT MaxTimeToReachQueue([out, retval] long *plMaxTimeToReachQueue);
	[helpstringcontext(IDS_lMaxTimeToReachQueue), propput, id(DISPID_MQMESSAGE_MAXTIMETOREACHQUEUE)]
	HRESULT MaxTimeToReachQueue([in] long lMaxTimeToReachQueue);

	[helpstringcontext(IDS_lMaxTimeToReceive), propget, id(DISPID_MQMESSAGE_MAXTIMETORECEIVE)]
	HRESULT MaxTimeToReceive([out, retval] long *plMaxTimeToReceive);
	[helpstringcontext(IDS_lMaxTimeToReceive), propput, id(DISPID_MQMESSAGE_MAXTIMETORECEIVE)]
	HRESULT MaxTimeToReceive([in] long lMaxTimeToReceive);

	[helpstringcontext(IDS_lHashAlg), propget, id(DISPID_MQMESSAGE_HASHALG)]
	HRESULT HashAlgorithm([out, retval] long *plHashAlg);
	[helpstringcontext(IDS_lHashAlg), propput, id(DISPID_MQMESSAGE_HASHALG)]
	HRESULT HashAlgorithm([in] long lHashAlg);

	[helpstringcontext(IDS_lEncryptAlg), propget, id(DISPID_MQMESSAGE_ENCRYPTALG)]
	HRESULT EncryptAlgorithm([out, retval] long *plEncryptAlg);
	[helpstringcontext(IDS_lEncryptAlg), propput, id(DISPID_MQMESSAGE_ENCRYPTALG)]
	HRESULT EncryptAlgorithm([in] long lEncryptAlg);

	[helpstringcontext(IDS_dateSentTime), propget, id(DISPID_MQMESSAGE_SENTTIME)]
	HRESULT SentTime([out, retval] VARIANT *pvarSentTime);

	[helpstringcontext(IDS_dateArrivedTime), propget, id(DISPID_MQMESSAGE_ARRIVEDTIME)]
	HRESULT ArrivedTime([out, retval] VARIANT *plArrivedTime);

	[helpstringcontext(IDS_queueinfoDest), propget, id(DISPID_MQMESSAGE_QUEUEINFODEST)]
	HRESULT DestinationQueueInfo([out, retval] IMSMQQueueInfo **ppqinfoDest);

	[helpstringcontext(IDS_binSenderCert), propget, id(DISPID_MQMESSAGE_SENDERCERT)]
	HRESULT SenderCertificate([out, retval] VARIANT *pvarSenderCert);
	[helpstringcontext(IDS_binSenderCert), propput, id(DISPID_MQMESSAGE_SENDERCERT)]
	HRESULT SenderCertificate([in] VARIANT varSenderCert);

	[helpstringcontext(IDS_binSenderId), propget, id(DISPID_MQMESSAGE_SENDERID)]
	HRESULT SenderId([out, retval] VARIANT *pvarSenderId);

	[helpstringcontext(IDS_lSenderIdType), propget, id(DISPID_MQMESSAGE_SENDERIDTYPE)]
	HRESULT SenderIdType([out, retval] long *plSenderIdType);
	[helpstringcontext(IDS_lSenderIdType), propput, id(DISPID_MQMESSAGE_SENDERIDTYPE)]
	HRESULT SenderIdType([in] long lSenderIdType);
	// methods
	//
	[helpstringcontext(IDS_Send)]
	HRESULT Send(
	  [in] IMSMQQueue *DestinationQueue,
	  [in, optional] VARIANT *Transaction);

	[helpstringcontext(IDS_AttachCurrentSecurityContext)]
	HRESULT AttachCurrentSecurityContext();
    };

    // primary dispatch interface for CMSMQMessage object
    // binary compatible to IMSMQMessage
    //
    // we cannot derive IMSMQMessage2 from IMSMQMessage since we add propput for SenderId,
    // and there is a MIDL limitation that it can't span the same dispid over derived interfaces.
    // Another reason is that we have to use upgraded interfaces in old members
    // RaananH Jun 13, 1999.
    //
    [
	uuid(D9933BE0-A567-11D2-B0F3-00E02C074F6B),
	helpstringcontext(IDS_IMSMQMESSAGE2),
	hidden,
	dual,
	odl
    ]
    //
    // first part is IMSMQMessage, but uses upgraded interfaces, contains _v1 suffix for upgraded
    // members (response and admin qinfos), and class made hidden
    //
    interface IMSMQMessage2 : IDispatch {
	// properties
	//
	[helpstringcontext(IDS_lClass), hidden, propget, id(DISPID_MQMESSAGE_MSGCLASS)]
	HRESULT Class([out, retval] long *plClass);

	[helpstringcontext(IDS_lPrivLevel), propget, id(DISPID_MQMESSAGE_PRIVLEVEL)]
	HRESULT PrivLevel([out, retval] long *plPrivLevel);
	[helpstringcontext(IDS_lPrivLevel), propput, id(DISPID_MQMESSAGE_PRIVLEVEL)]
	HRESULT PrivLevel([in] long lPrivLevel);

	[helpstringcontext(IDS_lAuthLevel), propget, id(DISPID_MQMESSAGE_AUTHLEVEL)]
	HRESULT AuthLevel([out, retval] long *plAuthLevel);
	[helpstringcontext(IDS_lAuthLevel), propput, id(DISPID_MQMESSAGE_AUTHLEVEL)]
	HRESULT AuthLevel([in] long lAuthLevel);

	[helpstringcontext(IDS_isAuthenticated), propget, id(DISPID_MQMESSAGE_AUTHENTICATED)]
	HRESULT IsAuthenticated([out, retval] Boolean *pisAuthenticated);

	[helpstringcontext(IDS_lDelivery), propget, id(DISPID_MQMESSAGE_DELIVERY)]
	HRESULT Delivery([out, retval] long *plDelivery);
	[helpstringcontext(IDS_lDelivery), propput, id(DISPID_MQMESSAGE_DELIVERY)]
	HRESULT Delivery([in] long lDelivery);

	[helpstringcontext(IDS_lTrace), propget, id(DISPID_MQMESSAGE_TRACE)]
	HRESULT Trace([out, retval] long *plTrace);
	[helpstringcontext(IDS_lTrace), propput, id(DISPID_MQMESSAGE_TRACE)]
	HRESULT Trace([in] long lTrace);

	[helpstringcontext(IDS_lPriority), propget, id(DISPID_MQMESSAGE_PRIORITY)]
	HRESULT Priority([out, retval] long *plPriority);
	[helpstringcontext(IDS_lPriority), propput, id(DISPID_MQMESSAGE_PRIORITY)]
	HRESULT Priority([in] long lPriority);

	[helpstringcontext(IDS_lJournal), propget, id(DISPID_MQMESSAGE_JOURNAL)]
	HRESULT Journal([out, retval] long *plJournal);
	[helpstringcontext(IDS_lJournal), propput, id(DISPID_MQMESSAGE_JOURNAL)]
	HRESULT Journal([in] long lJournal);

	[helpstringcontext(IDS_queueinfoResponse), propget, id(DISPID_MQMESSAGE_QUEUEINFORESPONSE), hidden]
	HRESULT ResponseQueueInfo_v1([out, retval] IMSMQQueueInfo **ppqinfoResponse);
	[helpstringcontext(IDS_queueinfoResponse), propputref, id(DISPID_MQMESSAGE_QUEUEINFORESPONSE), hidden]
	HRESULT ResponseQueueInfo_v1([in] IMSMQQueueInfo *pqinfoResponse);

	[helpstringcontext(IDS_lAppSpecific), propget, id(DISPID_MQMESSAGE_APPSPECIFIC)]
	HRESULT AppSpecific([out, retval] long *plAppSpecific);
	[helpstringcontext(IDS_lAppSpecific), propput, id(DISPID_MQMESSAGE_APPSPECIFIC)]
	HRESULT AppSpecific([in] long lAppSpecific);

	[helpstringcontext(IDS_guidSrcMachine), propget, id(DISPID_MQMESSAGE_GUIDSRCMACHINE)]
	HRESULT SourceMachineGuid([out, retval] BSTR *pbstrGuidSrcMachine);

	[helpstringcontext(IDS_lenBody), propget, id(DISPID_MQMESSAGE_LENBODY)]
	HRESULT BodyLength([out, retval] long *pcbBody);

	[helpstringcontext(IDS_body), propget, id(DISPID_MQMESSAGE_BODY)]
	HRESULT Body([out, retval] VARIANT *pvarBody);
	[helpstringcontext(IDS_body), propput, id(DISPID_MQMESSAGE_BODY)]
	HRESULT Body([in] VARIANT varBody);

	[helpstringcontext(IDS_queueinfoAdmin), propget, id(DISPID_MQMESSAGE_QUEUEINFOADMIN), hidden]
	HRESULT AdminQueueInfo_v1([out, retval] IMSMQQueueInfo **ppqinfoAdmin);
	[helpstringcontext(IDS_queueinfoAdmin), propputref, id(DISPID_MQMESSAGE_QUEUEINFOADMIN), hidden]
	HRESULT AdminQueueInfo_v1([in] IMSMQQueueInfo *pqinfoAdmin);

	[helpstringcontext(IDS_id), propget, id(DISPID_MQMESSAGE_ID)]
	HRESULT Id([out, retval] VARIANT *pvarMsgId);

	[helpstringcontext(IDS_idCorrelation), propget, id(DISPID_MQMESSAGE_IDCORRELATION)]
	HRESULT CorrelationId([out, retval] VARIANT *pvarMsgId);
	[helpstringcontext(IDS_idCorrelation), propput, id(DISPID_MQMESSAGE_IDCORRELATION)]
	HRESULT CorrelationId([in] VARIANT varMsgId);

	[helpstringcontext(IDS_lAck), propget, id(DISPID_MQMESSAGE_ACKNOWLEDGE)]
	HRESULT Ack([out, retval] long *plAck);
	[helpstringcontext(IDS_lAck), propput, id(DISPID_MQMESSAGE_ACKNOWLEDGE)]
	HRESULT Ack([in] long lAck);

	[helpstringcontext(IDS_strLabel), propget, id(DISPID_MQMESSAGE_LABEL)]
	HRESULT Label([out, retval] BSTR *pbstrLabel);
	[helpstringcontext(IDS_strLabel), propput, id(DISPID_MQMESSAGE_LABEL)]
	HRESULT Label([in] BSTR bstrLabel);

	[helpstringcontext(IDS_lMaxTimeToReachQueue), propget, id(DISPID_MQMESSAGE_MAXTIMETOREACHQUEUE)]
	HRESULT MaxTimeToReachQueue([out, retval] long *plMaxTimeToReachQueue);
	[helpstringcontext(IDS_lMaxTimeToReachQueue), propput, id(DISPID_MQMESSAGE_MAXTIMETOREACHQUEUE)]
	HRESULT MaxTimeToReachQueue([in] long lMaxTimeToReachQueue);

	[helpstringcontext(IDS_lMaxTimeToReceive), propget, id(DISPID_MQMESSAGE_MAXTIMETORECEIVE)]
	HRESULT MaxTimeToReceive([out, retval] long *plMaxTimeToReceive);
	[helpstringcontext(IDS_lMaxTimeToReceive), propput, id(DISPID_MQMESSAGE_MAXTIMETORECEIVE)]
	HRESULT MaxTimeToReceive([in] long lMaxTimeToReceive);

	[helpstringcontext(IDS_lHashAlg), propget, id(DISPID_MQMESSAGE_HASHALG)]
	HRESULT HashAlgorithm([out, retval] long *plHashAlg);
	[helpstringcontext(IDS_lHashAlg), propput, id(DISPID_MQMESSAGE_HASHALG)]
	HRESULT HashAlgorithm([in] long lHashAlg);

	[helpstringcontext(IDS_lEncryptAlg), propget, id(DISPID_MQMESSAGE_ENCRYPTALG)]
	HRESULT EncryptAlgorithm([out, retval] long *plEncryptAlg);
	[helpstringcontext(IDS_lEncryptAlg), propput, id(DISPID_MQMESSAGE_ENCRYPTALG)]
	HRESULT EncryptAlgorithm([in] long lEncryptAlg);

	[helpstringcontext(IDS_dateSentTime), propget, id(DISPID_MQMESSAGE_SENTTIME)]
	HRESULT SentTime([out, retval] VARIANT *pvarSentTime);

	[helpstringcontext(IDS_dateArrivedTime), propget, id(DISPID_MQMESSAGE_ARRIVEDTIME)]
	HRESULT ArrivedTime([out, retval] VARIANT *plArrivedTime);

	[helpstringcontext(IDS_queueinfoDest), propget, id(DISPID_MQMESSAGE_QUEUEINFODEST)]
	HRESULT DestinationQueueInfo([out, retval] IMSMQQueueInfo2 **ppqinfoDest);

	[helpstringcontext(IDS_binSenderCert), propget, id(DISPID_MQMESSAGE_SENDERCERT)]
	HRESULT SenderCertificate([out, retval] VARIANT *pvarSenderCert);
	[helpstringcontext(IDS_binSenderCert), propput, id(DISPID_MQMESSAGE_SENDERCERT)]
	HRESULT SenderCertificate([in] VARIANT varSenderCert);

	[helpstringcontext(IDS_binSenderId), propget, id(DISPID_MQMESSAGE_SENDERID)]
	HRESULT SenderId([out, retval] VARIANT *pvarSenderId);

	[helpstringcontext(IDS_lSenderIdType), propget, id(DISPID_MQMESSAGE_SENDERIDTYPE)]
	HRESULT SenderIdType([out, retval] long *plSenderIdType);
	[helpstringcontext(IDS_lSenderIdType), propput, id(DISPID_MQMESSAGE_SENDERIDTYPE)]
	HRESULT SenderIdType([in] long lSenderIdType);
	// methods
	//
	[helpstringcontext(IDS_Send)]
	HRESULT Send(
	  [in] IMSMQQueue2 *DestinationQueue,
	  [in, optional] VARIANT *Transaction);

	[helpstringcontext(IDS_AttachCurrentSecurityContext)]
	HRESULT AttachCurrentSecurityContext();
	//
	// new properties for IMSMQMessage2
	//
	[helpstringcontext(IDS_lSenderVersion), propget, id(DISPID_MQMESSAGE_SENDERVERSION)]
	HRESULT SenderVersion([out, retval] long *plSenderVersion);

	[helpstringcontext(IDS_binExtension), propget, id(DISPID_MQMESSAGE_EXTENSION)]
	HRESULT Extension([out, retval] VARIANT *pvarExtension);
	[helpstringcontext(IDS_binExtension), propput, id(DISPID_MQMESSAGE_EXTENSION)]
	HRESULT Extension([in] VARIANT varExtension);

	[helpstringcontext(IDS_guidConnectorType), propget, id(DISPID_MQMESSAGE_GUIDCONNECTORTYPE)]
	HRESULT ConnectorTypeGuid([out, retval] BSTR *pbstrGuidConnectorType);
	[helpstringcontext(IDS_guidConnectorType), propput, id(DISPID_MQMESSAGE_GUIDCONNECTORTYPE)]
	HRESULT ConnectorTypeGuid([in] BSTR bstrGuidConnectorType);

	[helpstringcontext(IDS_queueinfoXactStatus), propget, id(DISPID_MQMESSAGE_QUEUEINFOXACTSTATUS)]
	HRESULT TransactionStatusQueueInfo([out, retval] IMSMQQueueInfo2 **ppqinfoXactStatus);

	[helpstringcontext(IDS_binDestSymmKey), propget, id(DISPID_MQMESSAGE_DESTSYMMKEY)]
	HRESULT DestinationSymmetricKey([out, retval] VARIANT *pvarDestSymmKey);
	[helpstringcontext(IDS_binDestSymmKey), propput, id(DISPID_MQMESSAGE_DESTSYMMKEY)]
	HRESULT DestinationSymmetricKey([in] VARIANT varDestSymmKey);

	[helpstringcontext(IDS_binSignature), propget, id(DISPID_MQMESSAGE_SIGNATURE)]
	HRESULT Signature([out, retval] VARIANT *pvarSignature);
	[helpstringcontext(IDS_binSignature), propput, id(DISPID_MQMESSAGE_SIGNATURE)]
	HRESULT Signature([in] VARIANT varSignature);

	[helpstringcontext(IDS_lAuthProvType), propget, id(DISPID_MQMESSAGE_AUTHPROVTYPE)]
	HRESULT AuthenticationProviderType([out, retval] long *plAuthProvType);
	[helpstringcontext(IDS_lAuthProvType), propput, id(DISPID_MQMESSAGE_AUTHPROVTYPE)]
	HRESULT AuthenticationProviderType([in] long lAuthProvType);

	[helpstringcontext(IDS_strAuthProvName), propget, id(DISPID_MQMESSAGE_AUTHPROVNAME)]
	HRESULT AuthenticationProviderName([out, retval] BSTR *pbstrAuthProvName);
	[helpstringcontext(IDS_strAuthProvName), propput, id(DISPID_MQMESSAGE_AUTHPROVNAME)]
	HRESULT AuthenticationProviderName([in] BSTR bstrAuthProvName);

	[helpstringcontext(IDS_binSenderId), propput, id(DISPID_MQMESSAGE_SENDERID)]
	HRESULT SenderId([in] VARIANT varSenderId);

        // MsgClass is the same as Class, but Class in Java is used as GetClass and this
        // conflicts with Java's own GetClass method, so we need to provide another name
        // for the Class property.
        // We make it read/write for connector support. RaananH Jan/17/1999
        //
	[helpstringcontext(IDS_lMsgClass), propget, id(DISPID_MQMESSAGE_MSGCLASS2)]
	HRESULT MsgClass([out, retval] long *plMsgClass);
	[helpstringcontext(IDS_lMsgClass), propput, id(DISPID_MQMESSAGE_MSGCLASS2)]
	HRESULT MsgClass([in] long lMsgClass);

	[hidden, propget, id(DISPID_MQMESSAGE_PROPERTIES)]
	HRESULT Properties([out, retval] IDispatch **ppcolProperties);

	[helpstringcontext(IDS_idXact), propget, id(DISPID_MQMESSAGE_IDXACT)]
	HRESULT TransactionId([out, retval] VARIANT *pvarXactId);

	[helpstringcontext(IDS_isFirstInXact), propget, id(DISPID_MQMESSAGE_FIRSTINXACT)]
	HRESULT IsFirstInTransaction([out, retval] Boolean *pisFirstInXact);

	[helpstringcontext(IDS_isLastInXact), propget, id(DISPID_MQMESSAGE_LASTINXACT)]
	HRESULT IsLastInTransaction([out, retval] Boolean *pisLastInXact);
	//
	// upgraded properties
	//
	[helpstringcontext(IDS_queueinfoResponse), propget, id(DISPID_MQMESSAGE_QUEUEINFORESPONSE_v2)]
	HRESULT ResponseQueueInfo([out, retval] IMSMQQueueInfo2 **ppqinfoResponse);
	[helpstringcontext(IDS_queueinfoResponse), propputref, id(DISPID_MQMESSAGE_QUEUEINFORESPONSE_v2)]
	HRESULT ResponseQueueInfo([in] IMSMQQueueInfo2 *pqinfoResponse);

	[helpstringcontext(IDS_queueinfoAdmin), propget, id(DISPID_MQMESSAGE_QUEUEINFOADMIN_v2)]
	HRESULT AdminQueueInfo([out, retval] IMSMQQueueInfo2 **ppqinfoAdmin);
	[helpstringcontext(IDS_queueinfoAdmin), propputref, id(DISPID_MQMESSAGE_QUEUEINFOADMIN_v2)]
	HRESULT AdminQueueInfo([in] IMSMQQueueInfo2 *pqinfoAdmin);
	//
	// authentication fix #2790 (PROPID_M_AUTHENTICATED_EX)
	//
	[helpstringcontext(IDS_sReceivedAuthenticationLevel), propget, id(DISPID_MQMESSAGE_RECEIVEDAUTHENTICATIONLEVEL)]
	HRESULT ReceivedAuthenticationLevel([out, retval] short *psReceivedAuthenticationLevel);
    };

    // coclass for CMSMQMessage objects
    //
    [
	uuid(D7D6E075-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_MSMQMESSAGE),
    ]
    coclass MSMQMessage {
	                  interface IMSMQMessage;
	[default]         interface IMSMQMessage2;
    };


    // base dispatch interface for CMSMQQueue object
    //
    [
	uuid(D7D6E076-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_IMSMQQUEUE),
	hidden,
	dual,
	odl
    ]
    interface IMSMQQueue : IDispatch {
	// properties
	//
	[helpstringcontext(IDS_lAccess), propget, id(DISPID_MQQUEUE_ACCESS)]
	HRESULT Access([out, retval] long *plAccess);

	[helpstringcontext(IDS_lShareMode), propget, id(DISPID_MQQUEUE_SHAREMODE)]
	HRESULT ShareMode([out, retval] long *plShareMode);

	[helpstringcontext(IDS_queueinfo), propget, id(DISPID_MQQUEUE_QUEUEINFO)]
	HRESULT QueueInfo([out, retval] IMSMQQueueInfo **ppqinfo);

	[helpstringcontext(IDS_lHandle), propget, id(DISPID_MQQUEUE_HANDLE)]
	HRESULT Handle([out, retval] long *plHandle);

	[helpstringcontext(IDS_isOpen), propget, id(DISPID_MQQUEUE_ISOPEN)]
	HRESULT IsOpen([out, retval] Boolean *pisOpen);
	// methods
	//
	[helpstringcontext(IDS_Close)]
	HRESULT Close();

	[helpstringcontext(IDS_Receive)]
	HRESULT Receive (
	  [in, optional] VARIANT *Transaction,
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *ReceiveTimeout,
	  [out, retval] IMSMQMessage **ppmsg);

	[helpstringcontext(IDS_Peek)]
	HRESULT Peek (
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *ReceiveTimeout,
	  [out, retval] IMSMQMessage **ppmsg);

	[helpstringcontext(IDS_EnableNotification)]
	HRESULT EnableNotification(
	  [in] IMSMQEvent *Event,
	  [in , optional] VARIANT *Cursor,
	  [in, optional] VARIANT *ReceiveTimeout);

	[helpstringcontext(IDS_Reset)]
	HRESULT Reset();

	[helpstringcontext(IDS_ReceiveCurrent)]
	HRESULT ReceiveCurrent (
	  [in, optional] VARIANT *Transaction,
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *ReceiveTimeout,
	  [out, retval] IMSMQMessage **ppmsg);

	[helpstringcontext(IDS_PeekNext)]
	HRESULT PeekNext (
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *ReceiveTimeout,
	  [out, retval] IMSMQMessage **ppmsg);

	[helpstringcontext(IDS_PeekCurrent)]
	HRESULT PeekCurrent (
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *ReceiveTimeout,
	  [out, retval] IMSMQMessage **ppmsg);
    };

    // primary dispatch interface for CMSMQQueue object
    // binary compatible to IMSMQQueue.
    //
    // we cannot derive IMSMQQueue2 from IMSMQQueue since we add parameters to Receive (also ReceiveCurrent,
    // Peek, PeekNext, and PeekCurrent), and we want to still use the old names of the new functions w/o
    // changing it to Receive2, Peek2, etc... - for ease of use for VB users - e.g. the additional parameters
    // are optional, so it would not affect existing code, and therefore we don't have to introduce
    // FIVE new functions to the existing model.
    // Another reason is that we have to use upgraded interfaces in old members
    // RaananH Jun 13, 1999.
    //
    [
	uuid(EF0574E0-06D8-11D3-B100-00E02C074F6B),
	helpstringcontext(IDS_IMSMQQUEUE2),
	hidden,
	dual,
	odl
    ]
    //
    // first part is IMSMQQueue, with _v1 appended to upgraded Peek/Receive methods (also made hidden)
    // and using upgraded interfaces
    //
    interface IMSMQQueue2 : IDispatch {
	// properties
	//
	[helpstringcontext(IDS_lAccess), propget, id(DISPID_MQQUEUE_ACCESS)]
	HRESULT Access([out, retval] long *plAccess);

	[helpstringcontext(IDS_lShareMode), propget, id(DISPID_MQQUEUE_SHAREMODE)]
	HRESULT ShareMode([out, retval] long *plShareMode);

	[helpstringcontext(IDS_queueinfo), propget, id(DISPID_MQQUEUE_QUEUEINFO)]
	HRESULT QueueInfo([out, retval] IMSMQQueueInfo2 **ppqinfo);

	[helpstringcontext(IDS_lHandle), propget, id(DISPID_MQQUEUE_HANDLE)]
	HRESULT Handle([out, retval] long *plHandle);

	[helpstringcontext(IDS_isOpen), propget, id(DISPID_MQQUEUE_ISOPEN)]
	HRESULT IsOpen([out, retval] Boolean *pisOpen);
	// properties
	//
	[helpstringcontext(IDS_Close)]
	HRESULT Close();

	[helpstringcontext(IDS_Receive), hidden]
	HRESULT Receive_v1 (
	  [in, optional] VARIANT *Transaction,
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *ReceiveTimeout,
	  [out, retval] IMSMQMessage **ppmsg);

	[helpstringcontext(IDS_Peek), hidden]
	HRESULT Peek_v1 (
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *ReceiveTimeout,
	  [out, retval] IMSMQMessage **ppmsg);

	[helpstringcontext(IDS_EnableNotification)]
	HRESULT EnableNotification(
	  [in] IMSMQEvent2 *Event,
	  [in , optional] VARIANT *Cursor,
	  [in, optional] VARIANT *ReceiveTimeout);

	[helpstringcontext(IDS_Reset)]
	HRESULT Reset();

	[helpstringcontext(IDS_ReceiveCurrent), hidden]
	HRESULT ReceiveCurrent_v1 (
	  [in, optional] VARIANT *Transaction,
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *ReceiveTimeout,
	  [out, retval] IMSMQMessage **ppmsg);

	[helpstringcontext(IDS_PeekNext), hidden]
	HRESULT PeekNext_v1 (
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *ReceiveTimeout,
	  [out, retval] IMSMQMessage **ppmsg);

	[helpstringcontext(IDS_PeekCurrent), hidden]
	HRESULT PeekCurrent_v1 (
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *ReceiveTimeout,
	  [out, retval] IMSMQMessage **ppmsg);
     //
     // new IMSMQQueue2 functionality
     //
     // Receive/Peek functions with two extra parameters (optional parameters)
     //
	[helpstringcontext(IDS_Receive_2)]
	HRESULT Receive(
	  [in, optional] VARIANT *Transaction,
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *ReceiveTimeout,
	  [in, optional] VARIANT *WantConnectorType,
	  [out, retval] IMSMQMessage2 **ppmsg);

	[helpstringcontext(IDS_Peek_2)]
	HRESULT Peek(
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *ReceiveTimeout,
	  [in, optional] VARIANT *WantConnectorType,
	  [out, retval] IMSMQMessage2 **ppmsg);

	[helpstringcontext(IDS_ReceiveCurrent_2)]
	HRESULT ReceiveCurrent(
	  [in, optional] VARIANT *Transaction,
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *ReceiveTimeout,
	  [in, optional] VARIANT *WantConnectorType,
	  [out, retval] IMSMQMessage2 **ppmsg);

	[helpstringcontext(IDS_PeekNext_2)]
	HRESULT PeekNext(
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *ReceiveTimeout,
	  [in, optional] VARIANT *WantConnectorType,
	  [out, retval] IMSMQMessage2 **ppmsg);

	[helpstringcontext(IDS_PeekCurrent_2)]
	HRESULT PeekCurrent(
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *ReceiveTimeout,
	  [in, optional] VARIANT *WantConnectorType,
	  [out, retval] IMSMQMessage2 **ppmsg);

	[hidden, propget, id(DISPID_MQQUEUE_PROPERTIES)]
	HRESULT Properties([out, retval] IDispatch **ppcolProperties);
    };

    // coclass for CMSMQQueue objects
    //
    [
	uuid(D7D6E079-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_MSMQQUEUE)
    ]
    coclass MSMQQueue {
                          interface IMSMQQueue;
        [default]         interface IMSMQQueue2;
    };

    // secondary unknown interface for CMSMQEvent object
    //
    [
	uuid(D7AB3341-C9D3-11d1-BB47-0080C7C5A2C0),
	hidden,
        dual,
        odl
    ]
    interface IMSMQPrivateEvent : IDispatch {

	// properties
	//
	[propget]
	HRESULT Hwnd([out, retval] long *phwnd);
//	[propget]
//	HRESULT HEvent([out, retval] long *phEvent);

        // methods
        //
        HRESULT FireArrivedEvent(
          [in] IMSMQQueue *pq,
          [in] long msgcursor);
        HRESULT FireArrivedErrorEvent(
          [in] IMSMQQueue *pq,
          [in] HRESULT hrStatus,
          [in] long msgcursor);
    }

    // base dispatch interface for CMSMQEvent object
    //
    [
	uuid(D7D6E077-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_IMSMQEVENT),
	hidden,
	dual,
	odl
    ]
    interface IMSMQEvent : IDispatch {
    }

    // primary dispatch interface for CMSMQEvent object
    // derived from IMSMQEvent above
    //
    [
	uuid(eba96b12-2168-11d3-898c-00e02c074f6b),
	helpstringcontext(IDS_IMSMQEVENT2),
	hidden,
	dual,
	odl
    ]
    interface IMSMQEvent2 : IMSMQEvent {
	// methods
	//
	[hidden, propget, id(DISPID_MQEVENT_PROPERTIES)]
	HRESULT Properties([out, retval] IDispatch **ppcolProperties);
    }

    // event interface for CMSMQEvent objects
    //
    [
	uuid(D7D6E078-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_DMSMQEVENTEVENTS),
	hidden
    ]
    dispinterface _DMSMQEventEvents {
      properties:
      methods:
	[id(DISPID_MQEVENTEVENTS_ARRIVED),
	 helpstringcontext(IDS_Arrived)]
	void Arrived(
	  [in] IDispatch *Queue,
	  [in] long Cursor);
	[id(DISPID_MQEVENTEVENTS_ARRIVEDERROR),
	 helpstringcontext(IDS_ArrivedError)]
	void ArrivedError(
	  [in] IDispatch *Queue,
	  [in] long ErrorCode,
	  [in] long Cursor);
    };

    // coclass for CMSMQEvent objects
    //
    [
	uuid(D7D6E07A-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_MSMQEVENT)
    ]
    coclass MSMQEvent {
	                  interface IMSMQEvent;
	[default]         interface IMSMQEvent2;
        interface IMSMQPrivateEvent;
	[default, source] dispinterface _DMSMQEventEvents;
    };

    // base dispatch interface for CMSMQQueueInfo object
    //
    [
	uuid(D7D6E07B-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_IMSMQQUEUEINFO),
	hidden,
	dual,
	odl
    ]
    interface IMSMQQueueInfo : IDispatch {

	// properties
	//
	[helpstringcontext(IDS_guidQueue), propget, id(DISPID_MQQUEUEINFO_GUIDQUEUE)]
	HRESULT QueueGuid([out, retval] BSTR *pbstrGuidQueue);

	[helpstringcontext(IDS_guidServiceType), propget, id(DISPID_MQQUEUEINFO_GUIDSERVICETYPE)]
	HRESULT ServiceTypeGuid([out, retval] BSTR *pbstrGuidServiceType);
	[helpstringcontext(IDS_guidServiceType), propput, id(DISPID_MQQUEUEINFO_GUIDSERVICETYPE)]
	HRESULT ServiceTypeGuid([in] BSTR bstrGuidServiceType);

	[helpstringcontext(IDS_MSMQQueueInfo_strLabel), propget, id(DISPID_MQQUEUEINFO_LABEL)]
	HRESULT Label([out, retval] BSTR *pbstrLabel);
	[helpstringcontext(IDS_MSMQQueueInfo_strLabel), propput, id(DISPID_MQQUEUEINFO_LABEL)]
	HRESULT Label([in] BSTR bstrLabel);

	[helpstringcontext(IDS_strPathName), propget, id(DISPID_MQQUEUEINFO_PATHNAME)]
	HRESULT PathName([out, retval] BSTR *pbstrPathName);
	[helpstringcontext(IDS_strPathName), propput, id(DISPID_MQQUEUEINFO_PATHNAME)]
	HRESULT PathName([in] BSTR bstrPathName);

	[helpstringcontext(IDS_strFormatName), propget, id(DISPID_MQQUEUEINFO_FORMATNAME)]
	HRESULT FormatName([out, retval] BSTR *pbstrFormatName);
	[helpstringcontext(IDS_strFormatName), propput, id(DISPID_MQQUEUEINFO_FORMATNAME)]
	HRESULT FormatName([in] BSTR bstrFormatName);

	[helpstringcontext(IDS_isTransactional), propget, id(DISPID_MQQUEUEINFO_ISTRANSACTIONAL)]
	HRESULT IsTransactional([out, retval] Boolean *pisTransactional);

	[helpstringcontext(IDS_MSMQQueueInfo_lPrivLevel), propget, id(DISPID_MQQUEUEINFO_PRIVLEVEL)]
	HRESULT PrivLevel([out, retval] long *plPrivLevel);
	[helpstringcontext(IDS_MSMQQueueInfo_lPrivLevel), propput, id(DISPID_MQQUEUEINFO_PRIVLEVEL)]
	HRESULT PrivLevel([in] long lPrivLevel);

	[helpstringcontext(IDS_MSMQQueueInfo_lJournal), propget, id(DISPID_MQQUEUEINFO_JOURNAL)]
	HRESULT Journal([out, retval] long *plJournal);
	[helpstringcontext(IDS_MSMQQueueInfo_lJournal), propput, id(DISPID_MQQUEUEINFO_JOURNAL)]
	HRESULT Journal([in] long lJournal);

	[helpstringcontext(IDS_lQuota), propget, id(DISPID_MQQUEUEINFO_QUOTA)]
	HRESULT Quota([out, retval] long *plQuota);
	[helpstringcontext(IDS_lQuota), propput, id(DISPID_MQQUEUEINFO_QUOTA)]
	HRESULT Quota([in] long lQuota);

	[helpstringcontext(IDS_lBasePriority), propget, id(DISPID_MQQUEUEINFO_BASEPRIORITY)]
	HRESULT BasePriority([out, retval] long *plBasePriority);
	[helpstringcontext(IDS_lBasePriority), propput, id(DISPID_MQQUEUEINFO_BASEPRIORITY)]
	HRESULT BasePriority([in] long lBasePriority);

	[helpstringcontext(IDS_dateCreateTime), propget, id(DISPID_MQQUEUEINFO_CREATETIME)]
	HRESULT CreateTime([out, retval] VARIANT *pvarCreateTime);

	[helpstringcontext(IDS_dateModifyTime), propget, id(DISPID_MQQUEUEINFO_MODIFYTIME)]
	HRESULT ModifyTime([out, retval] VARIANT *pvarModifyTime);

	[helpstringcontext(IDS_lAuthenticate), propget, id(DISPID_MQQUEUEINFO_AUTHENTICATE)]
	HRESULT Authenticate([out, retval] long *plAuthenticate);
	[helpstringcontext(IDS_lAuthenticate), propput, id(DISPID_MQQUEUEINFO_AUTHENTICATE)]
	HRESULT Authenticate([in] long lAuthenticate);

	[helpstringcontext(IDS_lJournalQuota), propget, id(DISPID_MQQUEUEINFO_JOURNALQUOTA)]
	HRESULT JournalQuota([out, retval] long *plJournalQuota);
	[helpstringcontext(IDS_lJournalQuota), propput, id(DISPID_MQQUEUEINFO_JOURNALQUOTA)]
	HRESULT JournalQuota([in] long lJournalQuota);

	[helpstringcontext(IDS_IsWorldReadable), propget, id(DISPID_MQQUEUEINFO_ISWORLDREADABLE)]
	HRESULT IsWorldReadable([out, retval] Boolean *pisWorldReadable);

	// methods
	//
	[helpstringcontext(IDS_Create)]
	HRESULT Create(
	  [in, optional] VARIANT *IsTransactional,
	  [in, optional] VARIANT *IsWorldReadable);

	[helpstringcontext(IDS_Delete)]
	HRESULT Delete();

	[helpstringcontext(IDS_Open)]
	HRESULT Open([in] long Access,
		     [in] long ShareMode,
		     [out, retval] IMSMQQueue **ppq);

	[helpstringcontext(IDS_Refresh)]
	HRESULT Refresh();

	[helpstringcontext(IDS_Update)]
	HRESULT Update();
    };

    // primary dispatch interface for CMSMQQueueInfo object
    // binary compatible to IMSMQQueueInfo.
    //
    [
	uuid(FD174A80-89CF-11D2-B0F2-00E02C074F6B),
	helpstringcontext(IDS_IMSMQQUEUEINFO2),
	hidden,
	dual,
	odl
    ]
    //
    // first part is IMSMQQueueInfo, but uses upgraded interfaces
    //
    interface IMSMQQueueInfo2 : IDispatch {

	// properties
	//
	[helpstringcontext(IDS_guidQueue), propget, id(DISPID_MQQUEUEINFO_GUIDQUEUE)]
	HRESULT QueueGuid([out, retval] BSTR *pbstrGuidQueue);

	[helpstringcontext(IDS_guidServiceType), propget, id(DISPID_MQQUEUEINFO_GUIDSERVICETYPE)]
	HRESULT ServiceTypeGuid([out, retval] BSTR *pbstrGuidServiceType);
	[helpstringcontext(IDS_guidServiceType), propput, id(DISPID_MQQUEUEINFO_GUIDSERVICETYPE)]
	HRESULT ServiceTypeGuid([in] BSTR bstrGuidServiceType);

	[helpstringcontext(IDS_MSMQQueueInfo_strLabel), propget, id(DISPID_MQQUEUEINFO_LABEL)]
	HRESULT Label([out, retval] BSTR *pbstrLabel);
	[helpstringcontext(IDS_MSMQQueueInfo_strLabel), propput, id(DISPID_MQQUEUEINFO_LABEL)]
	HRESULT Label([in] BSTR bstrLabel);

	[helpstringcontext(IDS_strPathName), propget, id(DISPID_MQQUEUEINFO_PATHNAME)]
	HRESULT PathName([out, retval] BSTR *pbstrPathName);
	[helpstringcontext(IDS_strPathName), propput, id(DISPID_MQQUEUEINFO_PATHNAME)]
	HRESULT PathName([in] BSTR bstrPathName);

	[helpstringcontext(IDS_strFormatName), propget, id(DISPID_MQQUEUEINFO_FORMATNAME)]
	HRESULT FormatName([out, retval] BSTR *pbstrFormatName);
	[helpstringcontext(IDS_strFormatName), propput, id(DISPID_MQQUEUEINFO_FORMATNAME)]
	HRESULT FormatName([in] BSTR bstrFormatName);

	[helpstringcontext(IDS_isTransactional), propget, id(DISPID_MQQUEUEINFO_ISTRANSACTIONAL)]
	HRESULT IsTransactional([out, retval] Boolean *pisTransactional);

	[helpstringcontext(IDS_MSMQQueueInfo_lPrivLevel), propget, id(DISPID_MQQUEUEINFO_PRIVLEVEL)]
	HRESULT PrivLevel([out, retval] long *plPrivLevel);
	[helpstringcontext(IDS_MSMQQueueInfo_lPrivLevel), propput, id(DISPID_MQQUEUEINFO_PRIVLEVEL)]
	HRESULT PrivLevel([in] long lPrivLevel);

	[helpstringcontext(IDS_MSMQQueueInfo_lJournal), propget, id(DISPID_MQQUEUEINFO_JOURNAL)]
	HRESULT Journal([out, retval] long *plJournal);
	[helpstringcontext(IDS_MSMQQueueInfo_lJournal), propput, id(DISPID_MQQUEUEINFO_JOURNAL)]
	HRESULT Journal([in] long lJournal);

	[helpstringcontext(IDS_lQuota), propget, id(DISPID_MQQUEUEINFO_QUOTA)]
	HRESULT Quota([out, retval] long *plQuota);
	[helpstringcontext(IDS_lQuota), propput, id(DISPID_MQQUEUEINFO_QUOTA)]
	HRESULT Quota([in] long lQuota);

	[helpstringcontext(IDS_lBasePriority), propget, id(DISPID_MQQUEUEINFO_BASEPRIORITY)]
	HRESULT BasePriority([out, retval] long *plBasePriority);
	[helpstringcontext(IDS_lBasePriority), propput, id(DISPID_MQQUEUEINFO_BASEPRIORITY)]
	HRESULT BasePriority([in] long lBasePriority);

	[helpstringcontext(IDS_dateCreateTime), propget, id(DISPID_MQQUEUEINFO_CREATETIME)]
	HRESULT CreateTime([out, retval] VARIANT *pvarCreateTime);

	[helpstringcontext(IDS_dateModifyTime), propget, id(DISPID_MQQUEUEINFO_MODIFYTIME)]
	HRESULT ModifyTime([out, retval] VARIANT *pvarModifyTime);

	[helpstringcontext(IDS_lAuthenticate), propget, id(DISPID_MQQUEUEINFO_AUTHENTICATE)]
	HRESULT Authenticate([out, retval] long *plAuthenticate);
	[helpstringcontext(IDS_lAuthenticate), propput, id(DISPID_MQQUEUEINFO_AUTHENTICATE)]
	HRESULT Authenticate([in] long lAuthenticate);

	[helpstringcontext(IDS_lJournalQuota), propget, id(DISPID_MQQUEUEINFO_JOURNALQUOTA)]
	HRESULT JournalQuota([out, retval] long *plJournalQuota);
	[helpstringcontext(IDS_lJournalQuota), propput, id(DISPID_MQQUEUEINFO_JOURNALQUOTA)]
	HRESULT JournalQuota([in] long lJournalQuota);

	[helpstringcontext(IDS_IsWorldReadable), propget, id(DISPID_MQQUEUEINFO_ISWORLDREADABLE)]
	HRESULT IsWorldReadable([out, retval] Boolean *pisWorldReadable);

	// methods
	//
	[helpstringcontext(IDS_Create)]
	HRESULT Create(
	  [in, optional] VARIANT *IsTransactional,
	  [in, optional] VARIANT *IsWorldReadable);

	[helpstringcontext(IDS_Delete)]
	HRESULT Delete();

	[helpstringcontext(IDS_Open)]
	HRESULT Open([in] long Access,
		     [in] long ShareMode,
		     [out, retval] IMSMQQueue2 **ppq);

	[helpstringcontext(IDS_Refresh)]
	HRESULT Refresh();

	[helpstringcontext(IDS_Update)]
	HRESULT Update();

	// new IMSMQQueueInfo2 properties
	//
	[helpstringcontext(IDS_strPathNameDNS), propget, id(DISPID_MQQUEUEINFO_PATHNAME_DNS)]
	HRESULT PathNameDNS([out, retval] BSTR *pbstrPathNameDNS);

	[hidden, propget, id(DISPID_MQQUEUEINFO_PROPERTIES)]
	HRESULT Properties([out, retval] IDispatch **ppcolProperties);

	[hidden, propget, id(DISPID_MQQUEUEINFO_SECURITY)]
	HRESULT Security([out, retval] VARIANT *pvarSecurity);
	[hidden, propput, id(DISPID_MQQUEUEINFO_SECURITY)]
	HRESULT Security([in] VARIANT varSecurity);
    };

    // coclass for CMSMQQueueInfo objects
    //
    [
	uuid(D7D6E07C-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_MSMQQUEUEINFO)
    ]
    coclass MSMQQueueInfo {
	                  interface IMSMQQueueInfo;
	[default]         interface IMSMQQueueInfo2;
    };

    // base dispatch interface for CMSMQQueueInfos object
    //
    [
	uuid(D7D6E07D-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_IMSMQQUEUEINFOS),
	hidden,
	dual,
	odl
    ]
    interface IMSMQQueueInfos : IDispatch {
	// methods
	//
	[helpstringcontext(IDS_MSMQQueueInfos_Reset)]
	HRESULT Reset();

	[helpstringcontext(IDS_MSMQQueueInfos_Next)]
	HRESULT Next([out, retval] IMSMQQueueInfo **ppqinfoNext);
    };

    // primary dispatch interface for CMSMQQueueInfos object
    // binary compatible to IMSMQQueueInfos.
    //
    [
	uuid(eba96b0f-2168-11d3-898c-00e02c074f6b),
	helpstringcontext(IDS_IMSMQQUEUEINFOS2),
	hidden,
	dual,
	odl
    ]
    //
    // first part is like IMSMQQueueInfos, just uses upgraded interfaces
    //
    interface IMSMQQueueInfos2 : IDispatch {
	// methods
	//
	[helpstringcontext(IDS_MSMQQueueInfos_Reset)]
	HRESULT Reset();

	[helpstringcontext(IDS_MSMQQueueInfos_Next)]
	HRESULT Next([out, retval] IMSMQQueueInfo2 **ppqinfoNext);
	//
	// IMSMQQueueInfos2 new members
	//
	[hidden, propget, id(DISPID_MQQUEUEINFOS_PROPERTIES)]
	HRESULT Properties([out, retval] IDispatch **ppcolProperties);
    };


    // coclass for CMSMQQueueInfos objects
    //
    [
	uuid(D7D6E07E-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_MSMQQUEUEINFOS)
    ]
    coclass MSMQQueueInfos {
	                  interface IMSMQQueueInfos;
	[default]         interface IMSMQQueueInfos2;
    };

    //
    // Transactions
    //
    typedef struct _MQBOID
    {
      BYTE rgb[ 16 ];
    } MQBOID;
    typedef MQBOID MQXACTUOW;
    typedef LONG MQISOLEVEL;

    typedef struct _MQXACTTRANSINFO
    {
      MQXACTUOW uow;
      MQISOLEVEL isoLevel;
      ULONG isoFlags;
      DWORD grfTCSupported;
      DWORD grfRMSupported;
      DWORD grfTCSupportedRetaining;
      DWORD grfRMSupportedRetaining;
    } MQXACTTRANSINFO;

// UNDONE: should be a way to track transact.h
#define IID_ITRANSACTION 0fb15084-af41-11ce-bd2b-204c4f4f5020


    // base dispatch interface for CMSMQTransaction object
    //
    [
	uuid(D7D6E07F-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_IMSMQTRANSACTION),
	hidden,
	dual,
	odl
    ]
    interface IMSMQTransaction : IDispatch {
      // properties
      //
      [helpstringcontext(IDS_lTransaction), propget, id(DISPID_MQTRANSACTION_TRANSACTION)]
      HRESULT Transaction([out, retval] long *plTransaction);

      // methods
      //
      [helpstringcontext(IDS_Commit)]
      HRESULT Commit([in, optional] VARIANT *fRetaining,
		     [in, optional] VARIANT *grfTC,
		     [in, optional] VARIANT *grfRM);
      [helpstringcontext(IDS_Abort)]
      HRESULT Abort([in, optional] VARIANT *fRetaining,
		    [in, optional] VARIANT *fAsync);
      // UNDONE: HRESULT GetTransactionInfo([out] void *pvInfo);
    };

    // primary dispatch interface for CMSMQTransaction object
    // derived from IMSMQTransaction above
    // allows attaching to existing transactions #3478
    //
    [
	uuid(2CE0C5B0-6E67-11D2-B0E6-00E02C074F6B),
	helpstringcontext(IDS_IMSMQTRANSACTION2),
	hidden,
	dual,
	odl
    ]
    interface IMSMQTransaction2 : IMSMQTransaction {
      // methods
      //
      [helpstringcontext(IDS_InitNew)]
      HRESULT InitNew([in] VARIANT varTransaction);

      [hidden, propget, id(DISPID_MQTRANSACTION_PROPERTIES)]
      HRESULT Properties([out, retval] IDispatch **ppcolProperties);
    };

    // coclass for CMSMQTransaction objects
    //
    [
	uuid(D7D6E080-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_MSMQTRANSACTION)
    ]
    coclass MSMQTransaction {
	                  interface IMSMQTransaction;
	[default]         interface IMSMQTransaction2;
    };


    // base dispatch interface for CMSMQCoordinatedTransactionDispenser object
    //
    [
	uuid(D7D6E081-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_IMSMQCOORDINATEDTRANSACTIONDISPENSER),
	hidden,
	dual,
	odl
    ]
    interface IMSMQCoordinatedTransactionDispenser : IDispatch {
      [helpstringcontext(IDS_BeginTransaction)]
      HRESULT BeginTransaction(
	[out, retval] IMSMQTransaction **ptransaction);
    };

    // primary dispatch interface for CMSMQCoordinatedTransactionDispenser object
    // binary compatible to IMSMQCoordinatedTransactionDispenser
    //
    [
	uuid(eba96b10-2168-11d3-898c-00e02c074f6b),
	helpstringcontext(IDS_IMSMQCOORDINATEDTRANSACTIONDISPENSER2),
	hidden,
	dual,
	odl
    ]
    //
    // first part is like IMSMQCoordinatedTransactionDispenser just uses upgraded interfaces
    //
    interface IMSMQCoordinatedTransactionDispenser2 : IDispatch {
      [helpstringcontext(IDS_BeginTransaction)]
      HRESULT BeginTransaction(
	[out, retval] IMSMQTransaction2 **ptransaction);
      //
      // IMSMQCoordinatedTransactionDispenser2 new members
      //
      [hidden, propget, id(DISPID_MQXDISPDTC_PROPERTIES)]
      HRESULT Properties([out, retval] IDispatch **ppcolProperties);
    };

    // coclass for CMSMQCoordinatedTransactionDispenser objects
    //
    [
	uuid(D7D6E082-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_MSMQCOORDINATEDTRANSACTIONDISPENSER)
    ]
    coclass MSMQCoordinatedTransactionDispenser {
	                  interface IMSMQCoordinatedTransactionDispenser;
	[default]         interface IMSMQCoordinatedTransactionDispenser2;
    };


    // base dispatch interface for CMSMQTransactionDispenser object
    //
    [
	uuid(D7D6E083-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_IMSMQTRANSACTIONDISPENSER),
	hidden,
	dual,
	odl
    ]
    interface IMSMQTransactionDispenser : IDispatch {
      [helpstringcontext(IDS_BeginTransaction)]
      HRESULT BeginTransaction(
	[out, retval] IMSMQTransaction **ptransaction);
    };

    // primary dispatch interface for CMSMQTransactionDispenser object
    // binary compatible to IMSMQTransactionDispenser
    //
    [
	uuid(eba96b11-2168-11d3-898c-00e02c074f6b),
	helpstringcontext(IDS_IMSMQTRANSACTIONDISPENSER2),
	hidden,
	dual,
	odl
    ]
    //
    // first part is like IMSMQTransactionDispenser just uses upgraded interfaces
    //
    interface IMSMQTransactionDispenser2 : IDispatch {
      [helpstringcontext(IDS_BeginTransaction)]
      HRESULT BeginTransaction(
	[out, retval] IMSMQTransaction2 **ptransaction);
      //
      // IMSMQTransactionDispenser2 new members
      //
      [hidden, propget, id(DISPID_MQXDISPER_PROPERTIES)]
      HRESULT Properties([out, retval] IDispatch **ppcolProperties);
    };

    // coclass for CMSMQTransactionDispenser objects
    //
    [
	uuid(D7D6E084-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_MSMQTRANSACTIONDISPENSER)
    ]
    coclass MSMQTransactionDispenser {
	                  interface IMSMQTransactionDispenser;
	[default]         interface IMSMQTransactionDispenser2;
    };


    // base dispatch interface for CMSMQApplication object
    //
    [
	uuid(D7D6E085-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_IMSMQAPPLICATION),
	hidden,
	dual,
	odl
    ]
    interface IMSMQApplication : IDispatch {
      // methods
      //
      [helpstringcontext(IDS_StrMachineIdOfMachineName)]
      HRESULT MachineIdOfMachineName(
	[in] BSTR MachineName,
	[out, retval] BSTR *pbstrGuid
	);
    };

    // new primary dispatch interface for CMSMQApplication object
    //
    [
	uuid(12A30900-7300-11D2-B0E6-00E02C074F6B),
	helpstringcontext(IDS_IMSMQAPPLICATION2),
	hidden,
	dual,
	odl
    ]
    interface IMSMQApplication2 : IMSMQApplication {
      // methods
      //
      [helpstringcontext(IDS_RegisterCertificate)]
      HRESULT RegisterCertificate(
    [in, optional] VARIANT * Flags,
    [in, optional] VARIANT * ExternalCertificate
	);

      [helpstringcontext(IDS_StrMachineNameOfMachineId)]
      HRESULT MachineNameOfMachineId(
    [in] BSTR bstrGuid,
    [out, retval] BSTR *pbstrMachineName
	);

      [helpstringcontext(IDS_sMSMQVersionMajor), propget, id(DISPID_MQAPPLICATION_MSMQVERSIONMAJOR)]
      HRESULT MSMQVersionMajor([out, retval] short *psMSMQVersionMajor);

      [helpstringcontext(IDS_sMSMQVersionMinor), propget, id(DISPID_MQAPPLICATION_MSMQVERSIONMINOR)]
      HRESULT MSMQVersionMinor([out, retval] short *psMSMQVersionMinor);

      [helpstringcontext(IDS_sMSMQVersionBuild), propget, id(DISPID_MQAPPLICATION_MSMQVERSIONBUILD)]
      HRESULT MSMQVersionBuild([out, retval] short *psMSMQVersionBuild);

      [helpstringcontext(IDS_fIsDsEnabled), propget, id(DISPID_MQAPPLICATION_ISDSENABLED)]
      HRESULT IsDsEnabled([out, retval] VARIANT_BOOL *pfIsDsEnabled);

      [hidden, propget, id(DISPID_MQAPPLICATION_PROPERTIES)]
      HRESULT Properties([out, retval] IDispatch **ppcolProperties);
    };

    // coclass for CMSMQApplication objects
    //
    [
	uuid(D7D6E086-DCCD-11d0-AA4B-0060970DEBAE),
	appobject,
	helpstringcontext(IDS_MSMQAPPLICATION)
    ]
    coclass MSMQApplication {
	                  interface IMSMQApplication;
	[default]         interface IMSMQApplication2;
    };
};
