//=--------------------------------------------------------------------------=
// 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.
//=--------------------------------------------------------------------------=
//
// IDL file for the automation object(s) in this inproc server
//

#include "dispids.h"

#if 0
// Last error synch with mq.h was done on Aug 1st, 2000.
//
// Sequential GUIDS that we can use for future upgrades, notice the pattern (eba96bXX), where
// only XX is different.
// Seems we could continue with this pattern even after the last guid, since this is how uuidgen
// generates a group of guids, and I may have asked for more in the first place.
//
eba96b20-2168-11d3-898c-00e02c074f6b
eba96b21-2168-11d3-898c-00e02c074f6b
eba96b22-2168-11d3-898c-00e02c074f6b
eba96b23-2168-11d3-898c-00e02c074f6b
eba96b24-2168-11d3-898c-00e02c074f6b
eba96b25-2168-11d3-898c-00e02c074f6b
eba96b26-2168-11d3-898c-00e02c074f6b
eba96b27-2168-11d3-898c-00e02c074f6b
eba96b28-2168-11d3-898c-00e02c074f6b
#endif //0
//
// 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 3.0 Object Library"),
    helpstringdll(MQOADLL),
    lcid(0x0000),
    version(MSMQ_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 IMSMQQueueInfo3;
    interface IMSMQQueue;
    interface IMSMQQueue2;
    interface IMSMQMessage;
    interface IMSMQQueueInfos;
    interface IMSMQQueueInfos2;
    interface IMSMQQueueInfos3;
    interface IMSMQEvent;
    interface IMSMQEvent2;
    interface IMSMQEvent3;
    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_SHA1                    4
#define ALG_SID_MAC                     5
#define ALG_SID_RIPEMD                  6
#define ALG_SID_RIPEMD160               7
#define ALG_SID_SSL3SHAMD5              8

    [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_SHA1       = (ALG_CLASS_HASH + ALG_TYPE_ANY + ALG_SID_SHA1),
		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)
    };

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

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

    //
    // application related enums
    //
    [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,
    };

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

    //
    // Message related enums
    //

    #define MQCLASS_CODE(s, r, code) ((s) + (r) + (code))
    [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),
    } ;

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

#define DEF_MQMSG_ACKNOWLEDGMENT_NONE 0x00
    [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
    };

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

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

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

#define DEF_MQMSG_PRIV_LEVEL_NONE 0
    [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
    };

#define DEF_MQMSG_AUTH_LEVEL_NONE 0
    [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_SIG10 =  2,
		MQMSG_AUTH_LEVEL_MSMQ20 = 4,
		MQMSG_AUTH_LEVEL_SIG20 =  4,
		MQMSG_AUTH_LEVEL_SIG30 =  8
    };

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

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

    [helpstringcontext(IDS_MQMSGAUTHENTICATION)] 
	enum MQMSGAUTHENTICATION {
		MQMSG_AUTHENTICATION_NOT_REQUESTED = 0,
		MQMSG_AUTHENTICATION_REQUESTED     = 1,
		MQMSG_AUTHENTICATED_SIG10 = 1,
		MQMSG_AUTHENTICATION_REQUESTED_EX = 3,
		MQMSG_AUTHENTICATED_SIG20 = 3,
		MQMSG_AUTHENTICATED_SIG30 = 5,
		MQMSG_AUTHENTICATED_SIGXML = 9
    };

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

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

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

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

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

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

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

    [helpstringcontext(IDS_MQMAX)] 
	enum MQMAX {
		MQ_MAX_Q_NAME_LEN      = 124,
		MQ_MAX_Q_LABEL_LEN     = 124
    };
//
// Enums related to Local Admin:
//
    [helpstringcontext(IDS_QUEUE_TYPE)]
	enum QUEUE_TYPE{
		MQ_TYPE_PUBLIC,
		MQ_TYPE_PRIVATE,    
		MQ_TYPE_MACHINE,     
		MQ_TYPE_CONNECTOR,
		MQ_TYPE_MULTICAST 
	}; 

	[helpstringcontext(IDS_FOREIGN_STATUS)]
	enum FOREIGN_STATUS{
		MQ_STATUS_FOREIGN,
		MQ_STATUS_NOT_FOREIGN,
		MQ_STATUS_UNKNOWN
	};

	enum XACT_STATUS{
		MQ_XACT_STATUS_XACT,
		MQ_XACT_STATUS_NOT_XACT,
		MQ_XACT_STATUS_UNKNOWN
	};

	[helpstringcontext(IDS_QUEUE_STATE)]
	enum QUEUE_STATE{
		MQ_QUEUE_STATE_LOCAL_CONNECTION,
		MQ_QUEUE_STATE_DISCONNECTED,
		MQ_QUEUE_STATE_WAITING,
		MQ_QUEUE_STATE_NEEDVALIDATE,
		MQ_QUEUE_STATE_ONHOLD,
		MQ_QUEUE_STATE_NONACTIVE,
		MQ_QUEUE_STATE_CONNECTED,
		MQ_QUEUE_STATE_DISCONNECTING  
	};

    //
    // default property values
    //
// ((MQ_MAX_PRIORITY + MQ_MIN_PRIORITY) >> 1)
#define DEF_DEFAULT_M_PRIORITY 3
    
    [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,
		DEFAULT_M_LOOKUPID      = 0,
    };

    //
    // 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
    [helpstringcontext(1)]
	enumMQSECFLAGS {
		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)
    };

#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
//********************************************************************

	[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_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_FULL
//
// MessageText:
//
//  Obsolete, kept for backward compatibility
//
MQ_ERROR_DS_IS_FULL             = 0xC00E0042L,

//
// 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:
//
//  Obsolete, kept for backward compatibility
//
MQ_ERROR_DELETE_CN_IN_USE       = 0xC00E0048L,

//
// 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:
//
//  Obsolete, kept for backward compatibility
//
MQ_ERROR_MQIS_SERVER_EMPTY       = 0xC00E005FL,

//
// MessageId: MQ_ERROR_MQIS_READONLY_MODE
//
// MessageText:
//
//  Obsolete, kept for backward compatibility
//
MQ_ERROR_MQIS_READONLY_MODE     = 0xC00E0060L,

//
//
// 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:
//
//  Obsolete; another MQIS server is being installed. Write operations to the database are not allowed at this stage.
//
MQ_ERROR_WRITE_NOT_ALLOWED      = 0xC00E0065L,

//
// 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:
//
//  Obsolete, kept for backward compatibility 
//
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:
//
//  Obsolete, kept for backward compatibility 
//
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,

//
//
// MessageId: MQ_ERROR_CANNOT_DELETE_PSC_OBJECTS
//
// MessageText:
//
//  The object to be deleted is owned by PSC. The operation cannot be performed.
//
 MQ_ERROR_CANNOT_DELETE_PSC_OBJECTS = 0xC00E0083L,

//
//
// MessageId: MQ_ERROR_NO_MQUSER_OU
//
// MessageText:
//
//  There is no msmqUsers OU in the Active Directory of the domain. Please create one manually.
//
 MQ_ERROR_NO_MQUSER_OU = 0xC00E0084L,

//
//
// MessageId: MQ_ERROR_CANNOT_LOAD_MQAD
//
// MessageText:
//
//  Can't load the MQAD.DLL library.
//
 MQ_ERROR_CANNOT_LOAD_MQAD = 0xC00E0085L,

//
// MessageId: MQ_ERROR_CANNOT_LOAD_MQDSSRV
//
// MessageText:
//
//  Obsolete, kept for backward compatibility 
//
MQ_ERROR_CANNOT_LOAD_MQDSSRV    = 0xC00E0086L,

//
//
// MessageId: MQ_ERROR_PROPERTIES_CONFLICT
//
// MessageText:
//
//  Two or more of the passed properties cannot co-exist.
//  For example, you cannot set both PROPID_M_RESP_QUEUE and PROPID_M_RESP_FORMAT_NAME while sending a message.
//
 MQ_ERROR_PROPERTIES_CONFLICT = 0xC00E0087L,

//
//
// MessageId: MQ_ERROR_MESSAGE_NOT_FOUND
//
// MessageText:
//
//  The message does not exist, or has been removed from the queue.
//
 MQ_ERROR_MESSAGE_NOT_FOUND = 0xC00E0088L,

//
//
// MessageId: MQ_ERROR_CANT_RESOLVE_SITES
//
// MessageText:
//
//  Can't resolve the computer sites. Verify sites and subnets configuration in Active Directory.
//
 MQ_ERROR_CANT_RESOLVE_SITES = 0xC00E0089L,

//
// MessageId: MQ_ERROR_NOT_SUPPORTED_BY_DEPENDENT_CLIENTS
//
// MessageText:
//
//  The operation is not supported by dependent clients.
//
 MQ_ERROR_NOT_SUPPORTED_BY_DEPENDENT_CLIENTS = 0xC00E008AL,

//
//
// MessageId: MQ_ERROR_OPERATION_NOT_SUPPORTED_BY_REMOTE_COMPUTER
//
// MessageText:
//
//  This operation is not supported by the remote Message Queuing service. For example, MQReceiveMessageByLookupId is not supported by MSMQ 1.0/2.0.
//
MQ_ERROR_OPERATION_NOT_SUPPORTED_BY_REMOTE_COMPUTER = 0xC00E008BL,

//
//
// MessageId: MQ_ERROR_NOT_A_CORRECT_OBJECT_CLASS
//
// MessageText:
//
//  The object whose properties are being retrieved from Active Directory does not belong to the class requested. 
//
MQ_ERROR_NOT_A_CORRECT_OBJECT_CLASS = 0xC00E008CL,

//
//
// MessageId: MQ_ERROR_MULTI_SORT_KEYS
//
// MessageText:
//
//  The value of cCol in MQSORTSET cannot be greater than 1. Active Directory supports only a single sort key.
//
MQ_ERROR_MULTI_SORT_KEYS         = 0xC00E008DL,

//
// MessageId: MQ_ERROR_GC_NEEDED
//
// MessageText:
//
//  An MSMQ Configuration (msmq) object with the GUID supplied cannot be created. In order to support the creation of an MSMQ Configuration object with a given GUID, Message Queuing Downlevel Client Support must be installed on a domain controller that is configured as a Global Catalog (GC) server.
//
MQ_ERROR_GC_NEEDED              = 0xC00E008EL,

//
// MessageId: MQ_ERROR_DS_BIND_ROOT_FOREST
//
// MessageText:
//
//  Binding to the forest root failed. This error usually indicates a problem in the DNS configuration.
//
MQ_ERROR_DS_BIND_ROOT_FOREST    = 0xC00E008FL,

//
// MessageId: MQ_ERROR_DS_LOCAL_USER
//
// MessageText:
//
//  A local user is authenticated as an anonymous user and cannot access Active Directory. You need to log on as a domain user to access Active Directory.
//
MQ_ERROR_DS_LOCAL_USER          = 0xC00E0090L,

//
// MessageId: MQ_ERROR_Q_ADS_PROPERTY_NOT_SUPPORTED
//
// MessageText:
//
//  The column PROPID_Q_ADS_PATH is not supported for the MQLocateBegin API.
//
MQ_ERROR_Q_ADS_PROPERTY_NOT_SUPPORTED = 0xC00E0091L,

//
// MessageId: MQ_ERROR_BAD_XML_FORMAT
//
// MessageText:
//
//  The given proporty is not a valid XML document.
//
MQ_ERROR_BAD_XML_FORMAT         = 0xC00E0092L,

//
// MessageId: MQ_ERROR_UNSUPPORTED_CLASS
//
// MessageText:
//
//  The Active Directory object specified is not of a supported class.
//
MQ_ERROR_UNSUPPORTED_CLASS      = 0xC00E0093L


    };

//
// Informational
//
    [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


   };


#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



//----------------------------------------------------------------
// MSMQQuery object
//----------------------------------------------------------------
    // 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);
    };

    // IMSMQQuery2 - 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);
    };

    // IMSMQQuery3 - dispatch interface for CMSMQQuery object
    // binary compatible to IMSMQQuery2
    //
    [
	uuid(eba96b19-2168-11d3-898c-00e02c074f6b),
	helpstringcontext(IDS_IMSMQQUERY3),
	hidden,
	dual,
	nonextensible,
	odl
    ]
    interface IMSMQQuery3 : IDispatch {
	//
	// First part like IMSMQQuery2, just uses upgrades interfaces
	//
	[helpstringcontext(IDS_LookupQueue), hidden]
	HRESULT LookupQueue_v2([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] IMSMQQueueInfos3 **ppqinfos);

	[hidden, propget, id(DISPID_MQQUERY_PROPERTIES)]
	HRESULT Properties([out, retval] IDispatch **ppcolProperties);
	//
	// New IMSMQQuery3 functionality
	//
	//
	// LookupQueue with two extra parameters (optional parameters) - multicast address
	//
	[helpstringcontext(IDS_LookupQueue_3)]
	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,
			    [in, optional] VARIANT *MulticastAddress,
			    [in, optional] VARIANT *RelMulticastAddress,
			    [out, retval] IMSMQQueueInfos3 **ppqinfos);
    };

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



//-----------------------------------------------------------------------------
// MSMQMessage object
//-----------------------------------------------------------------------------
    // 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();
    };

    // IMSMQMessage2 - 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);
    };


    // IMSMQMessage3 - dispatch interface for CMSMQMessage object
    // binary compatible to IMSMQMessage2
    //
    [
	uuid(eba96b1a-2168-11d3-898c-00e02c074f6b),
	helpstringcontext(IDS_IMSMQMESSAGE3),
	hidden,
	dual,
	odl
    ]
    //
    // first part like IMSMQMessage2, but uses upgraded interfaces, contains _v2 suffix for upgraded
    // members (response and admin qinfos). Also Send method accepts IDispatch (e.g. also
    // MSMQDestination in addition to MSMQQueue).
    // In addition contains new props for IMSMQMessage3 (new format name props)
    //
    interface IMSMQMessage3 : 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);

	[hidden, 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] IMSMQQueueInfo3 **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);

	[helpstringcontext(IDS_Send_3)]
	HRESULT Send(
	  [in] IDispatch *DestinationQueue,
	  [in, optional] VARIANT *Transaction);

	[hidden, helpstringcontext(IDS_AttachCurrentSecurityContext)]
	HRESULT AttachCurrentSecurityContext();

	[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] IMSMQQueueInfo3 **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);

	[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);

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

	[hidden, helpstringcontext(IDS_isLastInXact), propget, id(DISPID_MQMESSAGE_LASTINXACT)]
	HRESULT IsLastInTransaction([out, retval] Boolean *pisLastInXact);

	[helpstringcontext(IDS_queueinfoResponse), propget, id(DISPID_MQMESSAGE_QUEUEINFORESPONSE_v2), hidden]
	HRESULT ResponseQueueInfo_v2([out, retval] IMSMQQueueInfo2 **ppqinfoResponse);
	[helpstringcontext(IDS_queueinfoResponse), propputref, id(DISPID_MQMESSAGE_QUEUEINFORESPONSE_v2), hidden]
	HRESULT ResponseQueueInfo_v2([in] IMSMQQueueInfo2 *pqinfoResponse);

	[helpstringcontext(IDS_queueinfoAdmin), propget, id(DISPID_MQMESSAGE_QUEUEINFOADMIN_v2), hidden]
	HRESULT AdminQueueInfo_v2([out, retval] IMSMQQueueInfo2 **ppqinfoAdmin);
	[helpstringcontext(IDS_queueinfoAdmin), propputref, id(DISPID_MQMESSAGE_QUEUEINFOADMIN_v2), hidden]
	HRESULT AdminQueueInfo_v2([in] IMSMQQueueInfo2 *pqinfoAdmin);

	[helpstringcontext(IDS_sReceivedAuthenticationLevel), propget, id(DISPID_MQMESSAGE_RECEIVEDAUTHENTICATIONLEVEL)]
	HRESULT ReceivedAuthenticationLevel([out, retval] short *psReceivedAuthenticationLevel);

	//
	// upgraded properties for IMSMQMessage3
	//
	[helpstringcontext(IDS_queueinfoResponse), propget, id(DISPID_MQMESSAGE_QUEUEINFORESPONSE_v3)]
	HRESULT ResponseQueueInfo([out, retval] IMSMQQueueInfo3 **ppqinfoResponse);
	[helpstringcontext(IDS_queueinfoResponse), propputref, id(DISPID_MQMESSAGE_QUEUEINFORESPONSE_v3)]
	HRESULT ResponseQueueInfo([in] IMSMQQueueInfo3 *pqinfoResponse);

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

	//
	// new properties for IMSMQMessage3
	//
	[helpstringcontext(IDS_destResponse), propget, id(DISPID_MQMESSAGE_DESTRESPONSE)]
	HRESULT ResponseDestination([out, retval] IDispatch **ppdestResponse);
	[helpstringcontext(IDS_destResponse), propputref, id(DISPID_MQMESSAGE_DESTRESPONSE)]
	HRESULT ResponseDestination([in] IDispatch *pdestResponse);

	[helpstringcontext(IDS_destDestination), propget, id(DISPID_MQMESSAGE_DESTINATION)]
	HRESULT Destination([out, retval] IDispatch **ppdestDestination);

	[helpstringcontext(IDS_varLookupId), propget, id(DISPID_MQMESSAGE_LOOKUPID)]
	HRESULT LookupId([out, retval] VARIANT *pvarLookupId);

	[helpstringcontext(IDS_isAuthenticated2), propget, id(DISPID_MQMESSAGE_AUTHENTICATED2)]
	HRESULT IsAuthenticated2([out, retval] VARIANT_BOOL *pisAuthenticated);

	[helpstringcontext(IDS_isFirstInXact2), propget, id(DISPID_MQMESSAGE_FIRSTINXACT2)]
	HRESULT IsFirstInTransaction2([out, retval] VARIANT_BOOL *pisFirstInXact);

	[helpstringcontext(IDS_isLastInXact2), propget, id(DISPID_MQMESSAGE_LASTINXACT2)]
	HRESULT IsLastInTransaction2([out, retval] VARIANT_BOOL *pisLastInXact);

	[helpstringcontext(IDS_AttachCurrentSecurityContext2)]
	HRESULT AttachCurrentSecurityContext2();

	[helpstringcontext(IDS_binSoapEnvelope), propget, id(DISPID_MQMESSAGE_SOAPENVELOPE)]
	HRESULT SoapEnvelope([out, retval] BSTR *pbstrSoapEnvelope);

	[helpstringcontext(IDS_binCompoundMessage), propget, id(DISPID_MQMESSAGE_COMPOUNDMESSAGE)]
	HRESULT CompoundMessage([out, retval] VARIANT *pvarCompoundMessage);
   
	[helpstringcontext(IDS_binSoapHeader), propput, id(DISPID_MQMESSAGE_SOAPHEADER)]
	HRESULT SoapHeader([in] BSTR bstrSoapHeader);

	[helpstringcontext(IDS_binSoapBody), propput, id(DISPID_MQMESSAGE_SOAPBODY)]
	HRESULT SoapBody([in] BSTR bstrSoapBody);
	};

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



//-----------------------------------------------------------------------------
// MSMQQueue object
//-----------------------------------------------------------------------------
    // IMSMQQueue - 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);
    };

    // IMSMQQueue2 - 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);
    };

    // IMSMQQueue3 - dispatch interface for CMSMQQueue object
    // binary compatible to IMSMQQueue2.
    //
    [
	uuid(eba96b1b-2168-11d3-898c-00e02c074f6b),
	helpstringcontext(IDS_IMSMQQUEUE3),
	hidden,
	dual,
	odl
    ]
    //
    // first part is like IMSMQQueue2, just using upgraded interfaces
    //
    interface IMSMQQueue3 : IDispatch {

	[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] IMSMQQueueInfo3 **ppqinfo);

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

	[hidden, helpstringcontext(IDS_isOpen), propget, id(DISPID_MQQUEUE_ISOPEN)]
	HRESULT IsOpen([out, retval] Boolean *pisOpen);

	[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] IMSMQEvent3 *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);

	[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] IMSMQMessage3 **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] IMSMQMessage3 **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] IMSMQMessage3 **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] IMSMQMessage3 **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] IMSMQMessage3 **ppmsg);

	[hidden, propget, id(DISPID_MQQUEUE_PROPERTIES)]
	HRESULT Properties([out, retval] IDispatch **ppcolProperties);
    //
    // properties new to IMSMQQueue3
    //
	[hidden, helpstringcontext(IDS_varHandle2), propget, id(DISPID_MQQUEUE_HANDLE2)]
	HRESULT Handle2([out, retval] VARIANT *pvarHandle);

	[helpstringcontext(IDS_ReceiveByLookupId)]
	HRESULT ReceiveByLookupId(
	  [in] VARIANT LookupId,
	  [in, optional] VARIANT *Transaction,
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *WantConnectorType,
	  [out, retval] IMSMQMessage3 **ppmsg);

	[helpstringcontext(IDS_ReceiveNextByLookupId)]
	HRESULT ReceiveNextByLookupId(
	  [in] VARIANT LookupId,
	  [in, optional] VARIANT *Transaction,
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *WantConnectorType,
	  [out, retval] IMSMQMessage3 **ppmsg);

	[helpstringcontext(IDS_ReceivePreviousByLookupId)]
	HRESULT ReceivePreviousByLookupId(
	  [in] VARIANT LookupId,
	  [in, optional] VARIANT *Transaction,
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *WantConnectorType,
	  [out, retval] IMSMQMessage3 **ppmsg);

	[helpstringcontext(IDS_ReceiveFirstByLookupId)]
	HRESULT ReceiveFirstByLookupId(
	  [in, optional] VARIANT *Transaction,
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *WantConnectorType,
	  [out, retval] IMSMQMessage3 **ppmsg);

	[helpstringcontext(IDS_ReceiveLastByLookupId)]
	HRESULT ReceiveLastByLookupId(
	  [in, optional] VARIANT *Transaction,
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *WantConnectorType,
	  [out, retval] IMSMQMessage3 **ppmsg);

	[helpstringcontext(IDS_PeekByLookupId)]
	HRESULT PeekByLookupId(
	  [in] VARIANT LookupId,
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *WantConnectorType,
	  [out, retval] IMSMQMessage3 **ppmsg);

	[helpstringcontext(IDS_PeekNextByLookupId)]
	HRESULT PeekNextByLookupId(
	  [in] VARIANT LookupId,
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *WantConnectorType,
	  [out, retval] IMSMQMessage3 **ppmsg);

	[helpstringcontext(IDS_PeekPreviousByLookupId)]
	HRESULT PeekPreviousByLookupId(
	  [in] VARIANT LookupId,
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *WantConnectorType,
	  [out, retval] IMSMQMessage3 **ppmsg);

	[helpstringcontext(IDS_PeekFirstByLookupId)]
	HRESULT PeekFirstByLookupId(
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *WantConnectorType,
	  [out, retval] IMSMQMessage3 **ppmsg);

	[helpstringcontext(IDS_PeekLastByLookupId)]
	HRESULT PeekLastByLookupId(
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *WantConnectorType,
	  [out, retval] IMSMQMessage3 **ppmsg);

  	[helpstringcontext(IDS_Purge)]
	HRESULT Purge();

	[helpstringcontext(IDS_isOpen2), propget, id(DISPID_MQQUEUE_ISOPEN2)]
	HRESULT IsOpen2([out, retval] VARIANT_BOOL *pisOpen);

    };


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



//-----------------------------------------------------------------------------
// MSMQEvent object
//-----------------------------------------------------------------------------
    // IMSMQPrivateEvent - private dispatch 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);
    }

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

    // IMSMQEvent2 - 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);
    }

    // IMSMQEvent3 - dispatch interface for CMSMQEvent object
    // derived from IMSMQEvent2 above
    //
    [
	uuid(eba96b1c-2168-11d3-898c-00e02c074f6b),
	helpstringcontext(IDS_IMSMQEVENT3),
	hidden,
	dual,
	odl
    ]
    interface IMSMQEvent3 : IMSMQEvent2 {
    }

    // _DMSMQEventEvents - outgoing 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;
	                  interface IMSMQEvent2;
	[default]         interface IMSMQEvent3;
        interface IMSMQPrivateEvent;
	[default, source] dispinterface _DMSMQEventEvents;
    };



//-----------------------------------------------------------------------------
// MSMQQueueInfo object
//-----------------------------------------------------------------------------
    // IMSMQQueueInfo - 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();
    };

    // IMSMQQueueInfo2 - 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);
    };


    // IMSMQQueueInfo3 - dispatch interface for CMSMQQueueInfo object
    // binary compatible to IMSMQQueueInfo2.
    //
    [
	uuid(eba96b1d-2168-11d3-898c-00e02c074f6b),
	helpstringcontext(IDS_IMSMQQUEUEINFO3),
	hidden,
	dual,
	odl
    ]
    //
    // first part is IMSMQQueueInfo2, but uses upgraded interfaces
    //
    interface IMSMQQueueInfo3 : IDispatch {

	[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);

	[hidden, 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);

	[hidden, 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] IMSMQQueue3 **ppq);

	[helpstringcontext(IDS_Refresh)]
	HRESULT Refresh();

	[helpstringcontext(IDS_Update)]
	HRESULT Update();

	[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);
    //
    // New IMSMQQueueInfo3 properties
    //
	[helpstringcontext(IDS_isTransactional2), propget, id(DISPID_MQQUEUEINFO_ISTRANSACTIONAL2)]
	HRESULT IsTransactional2([out, retval] VARIANT_BOOL *pisTransactional);

	[helpstringcontext(IDS_IsWorldReadable2), propget, id(DISPID_MQQUEUEINFO_ISWORLDREADABLE2)]
	HRESULT IsWorldReadable2([out, retval] VARIANT_BOOL *pisWorldReadable);

	[helpstringcontext(IDS_strMulticastAddress), propget, id(DISPID_MQQUEUEINFO_MULTICAST_ADDRESS)]
	HRESULT MulticastAddress([out, retval] BSTR *pbstrMulticastAddress);

	[helpstringcontext(IDS_strMulticastAddress), propput, id(DISPID_MQQUEUEINFO_MULTICAST_ADDRESS)]
	HRESULT MulticastAddress([in] BSTR bstrMulticastAddress);

	[helpstringcontext(IDS_strObjADsPath), propget, id(DISPID_MQQUEUEINFO_ADSPATH)]
	HRESULT ADsPath([out, retval] BSTR *pbstrADsPath);

    };


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



//-----------------------------------------------------------------------------
// MSMQQueueInfos object
//-----------------------------------------------------------------------------
    // IMSMQQueueInfos - 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);
    };

    // IMSMQQueueInfos2 - 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);
    };


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

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

	[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;
	                  interface IMSMQQueueInfos2;
	[default]         interface IMSMQQueueInfos3;
    };



//-----------------------------------------------------------------------------
// MSMQTransaction object
//-----------------------------------------------------------------------------
    //
    // Transactions
    //

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


    // IMSMQTransaction - 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);
    };

    // IMSMQTransaction2 - 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);
    };

    // IMSMQTransaction3 - dispatch interface for CMSMQTransaction object
    // derived from IMSMQTransaction2 above
    // allows getting an ITransaction * as a variant (the only way on win64)
    //
    [
	uuid(eba96b13-2168-11d3-898c-00e02c074f6b),
	helpstringcontext(IDS_IMSMQTRANSACTION3),
	hidden,
	dual,
	odl
    ]
    interface IMSMQTransaction3 : IMSMQTransaction2 {
      // properties
      //
      [helpstringcontext(IDS_varITransaction), propget, id(DISPID_MQTRANSACTION_ITRANSACTION)]
      HRESULT ITransaction([out, retval] VARIANT *pvarITransaction);
    };

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



//-----------------------------------------------------------------------------
// MSMQCoordinatedTransactionDispenser object
//-----------------------------------------------------------------------------
    // IMSMQCoordinatedTransactionDispenser- 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);
    };

    // IMSMQCoordinatedTransactionDispenser2 - 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);
    };

    // IMSMQCoordinatedTransactionDispenser3 - dispatch interface for CMSMQCoordinatedTransactionDispenser object
    // binary compatible to IMSMQCoordinatedTransactionDispenser2
    //
    [
	uuid(eba96b14-2168-11d3-898c-00e02c074f6b),
	helpstringcontext(IDS_IMSMQCOORDINATEDTRANSACTIONDISPENSER3),
	hidden,
	dual,
	odl
    ]
    //
    // Just like IMSMQCoordinatedTransactionDispenser2 just uses upgraded interfaces
    //
    interface IMSMQCoordinatedTransactionDispenser3 : IDispatch {
      [helpstringcontext(IDS_BeginTransaction)]
      HRESULT BeginTransaction(
	[out, retval] IMSMQTransaction3 **ptransaction);

      [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;
	                  interface IMSMQCoordinatedTransactionDispenser2;
	[default]         interface IMSMQCoordinatedTransactionDispenser3;
    };



//-----------------------------------------------------------------------------
// MSMQTransactionDispenser object
//-----------------------------------------------------------------------------
    // IMSMQTransactionDispenser - 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);
    };

    // IMSMQTransactionDispenser2 - 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);
    };

    // IMSMQTransactionDispenser3 - dispatch interface for CMSMQTransactionDispenser object
    // binary compatible to IMSMQTransactionDispenser2
    //
    [
	uuid(eba96b15-2168-11d3-898c-00e02c074f6b),
	helpstringcontext(IDS_IMSMQTRANSACTIONDISPENSER3),
	hidden,
	dual,
	odl
    ]
    //
    // Just like IMSMQTransactionDispenser2 just uses upgraded interfaces
    //
    interface IMSMQTransactionDispenser3 : IDispatch {
      [helpstringcontext(IDS_BeginTransaction)]
      HRESULT BeginTransaction(
	[out, retval] IMSMQTransaction3 **ptransaction);

      [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;
	                  interface IMSMQTransactionDispenser2;
	[default]         interface IMSMQTransactionDispenser3;
    };



//-----------------------------------------------------------------------------
// MSMQApplication object
//-----------------------------------------------------------------------------
    // IMSMQApplication - 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
	);
    };

    // IMSMQApplication2 - dispatch interface for CMSMQApplication object
    // Binary compatible to IMSMQApplication
    //
    [
	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);
    };

    // IMSMQApplication3 - dispatch interface for CMSMQApplication object
    // Binary compatible to IMSMQApplication2
    //
    [
	uuid(eba96b1f-2168-11d3-898c-00e02c074f6b),
	helpstringcontext(IDS_IMSMQAPPLICATION3),
	hidden,
	dual,
	odl
    ]
    interface IMSMQApplication3 : IMSMQApplication2 {
		[helpstringcontext(IDS_ActiveQueues),propget, id(DISPID_MQAPPLICATION_ACTIVE_QUEUES)]
		HRESULT ActiveQueues([out,retval] VARIANT* pvActiveQueues);

	    [helpstringcontext(IDS_PrivateQueues),propget, id(DISPID_MQAPPLICATION_PRIVATE_QUEUES)]
		HRESULT PrivateQueues([out,retval] VARIANT* pvPrivateQueues);

	    [helpstringcontext(IDS_DirectoryServiceServer),propget, id(DISPID_MQAPPLICATION_DIRECTORY_SERVICE_SERVER)]
		HRESULT DirectoryServiceServer([out,retval] BSTR* pbstrDirectoryServiceServer);

	    [helpstringcontext(IDS_IsConnected),propget, id(DISPID_MQAPPLICATION_IS_CONNECTED)]
		HRESULT IsConnected([out,retval] VARIANT_BOOL* pfIsConnected);

	    [hidden,propget, id(DISPID_MQAPPLICATION_BYTES_IN_ALL_QUEUES)]
		HRESULT BytesInAllQueues([out,retval] VARIANT* pvBytesInAllQueues);

		[helpstringcontext(IDS_Machine), propput, id(DISPID_MQAPPLICATION_MACHINE)]
		HRESULT Machine([in] BSTR bstrMachine);

		[helpstringcontext(IDS_Machine), propget, id(DISPID_MQAPPLICATION_MACHINE)]
		HRESULT Machine([out, retval] BSTR *pbstrMachine);

		[helpstringcontext(IDS_Connect)]
		HRESULT Connect();

		[helpstringcontext(IDS_Disconnect)]
		HRESULT Disconnect();

		[helpstringcontext(IDS_Tidy)]
		HRESULT Tidy();
    };


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



//-----------------------------------------------------------------------------
// MSMQDestination object
//-----------------------------------------------------------------------------
    // dual interface for CMSMQDestination object
    //
    [
	uuid(eba96b16-2168-11d3-898c-00e02c074f6b),
	helpstringcontext(IDS_IMSMQDESTINATION),
	hidden,
	dual,
	odl
    ]
    interface IMSMQDestination : IDispatch {
      // methods
      //
	[helpstringcontext(IDS_DestOpen)]
	HRESULT Open();

	[helpstringcontext(IDS_DestClose)]
	HRESULT Close();
      // properties
      //
	[helpstringcontext(IDS_fDestIsOpen), propget, id(DISPID_MQDEST_ISOPEN)]
	HRESULT IsOpen([out, retval] VARIANT_BOOL *pfIsOpen);

	[hidden, propget, id(DISPID_MQDEST_IADS)]
	HRESULT IADs([out, retval] IDispatch **ppIADs);
	[hidden, propputref, id(DISPID_MQDEST_IADS)]
	HRESULT IADs([in] IDispatch *pIADs);

	[helpstringcontext(IDS_strADsPath), propget, id(DISPID_MQDEST_ADSPATH)]
	HRESULT ADsPath([out, retval] BSTR *pbstrADsPath);
	[helpstringcontext(IDS_strADsPath), propput, id(DISPID_MQDEST_ADSPATH)]
	HRESULT ADsPath([in] BSTR bstrADsPath);

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

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

	[hidden, propget, id(DISPID_MQDEST_DESTINATIONS)]
	HRESULT Destinations([out, retval] IDispatch **ppDestinations);
	[hidden, propputref, id(DISPID_MQDEST_DESTINATIONS)]
	HRESULT Destinations([in] IDispatch *pDestinations);

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

    // private dispatch interface for CMSMQDestination object
    //
    [
	uuid(eba96b17-2168-11d3-898c-00e02c074f6b),
	hidden,
	dual,
	odl
    ]
    interface IMSMQPrivateDestination : IDispatch {
      // properties
      //
	[hidden, propget, id(DISPID_MQDEST_HANDLE)]
	HRESULT Handle([out, retval] VARIANT *pvarHandle);
	[hidden, propput, id(DISPID_MQDEST_HANDLE)]
	HRESULT Handle([in] VARIANT varHandle);
    };

    // coclass for CMSMQDestination objects
    //
    [
	uuid(eba96b18-2168-11d3-898c-00e02c074f6b),
	helpstringcontext(IDS_MSMQDESTINATION)
    ]
    coclass MSMQDestination {
	[default]         interface IMSMQDestination;
	                  interface IMSMQPrivateDestination;
    };


//-----------------------------------------------------------------------------
// MSMQCollection
//-----------------------------------------------------------------------------

    [
		uuid(0188AC2F-ECB3-4173-9779-635CA2039C72),
		hidden,
		dual,
		oleautomation
	]
    interface IMSMQCollection : IDispatch {

		[id(0x00000000)]
		HRESULT Item(
				[in] VARIANT* Index, 
				[out, retval] VARIANT* pvarRet
				);

		[id(0x00000001), propget]
		HRESULT Count([out, retval] long* pCount);
		
		[id(0xfffffffc), restricted]
		HRESULT _NewEnum([out, retval] IUnknown** ppunk);
	};


//-----------------------------------------------------------------------------
// MSMQManagement object
//-----------------------------------------------------------------------------

//
// MSMQManagement
//

    [
		uuid(BE5F0241-E489-4957-8CC4-A452FCF3E23E),
		helpstringcontext(IDS_IMSMQMANAGEMENT),
		hidden,
		dual
    ]
    interface IMSMQManagement : IDispatch {

		[helpstringcontext(IDS_ManagementInit), id(0)]
		HRESULT Init(
				[in, optional] VARIANT *Machine,
				[in, optional] VARIANT *Pathname,
				[in, optional] VARIANT *FormatName
				);
		
		[helpstringcontext(IDS_strFormatName), propget, id(1)]
		HRESULT FormatName([out, retval] BSTR *pbstrFormatName);

		[helpstringcontext(IDS_Machine), propget, id(2)]
		HRESULT Machine([out, retval] BSTR *pbstrMachine);

		[helpstringcontext(IDS_MessageCount), propget, id(3)]
		HRESULT MessageCount([out, retval] long* plMessageCount);

		[helpstringcontext(IDS_ForeignStatus), propget, id(4)]
		HRESULT ForeignStatus([out,retval] long* plForeignStatus);

		[helpstringcontext(IDS_QueueType), propget, id(5)]
		HRESULT QueueType([out,retval] long* plQueueType);
		
		[helpstringcontext(IDS_IsLocal), propget, id(6)]
		HRESULT IsLocal([out,retval] VARIANT_BOOL* pfIsLocal);

		[helpstringcontext(IDS_TransactionalStatus), propget, id(7)]
		HRESULT TransactionalStatus([out,retval] long* plTransactionalStatus);

		[helpstringcontext(IDS_UsedQuota), propget, id(8)]
		HRESULT BytesInQueue([out,retval] VARIANT* pvBytesInQueue);
	};

    [
		uuid(39CE96FE-F4C5-4484-A143-4C2D5D324229),
		helpstringcontext(IDS_IMSMQMANAGEMENT)
    ]
    coclass MSMQManagement {
		[default]	interface IMSMQManagement;
    };


    //
	// IMSMQOutgoingQueueManagement
	//

    [
		uuid(64C478FB-F9B0-4695-8A7F-439AC94326D3),
		helpstringcontext(IDS_IMSMQOUTGOINGQUEUEMANAGEMENT),
		dual
	]
	interface IMSMQOutgoingQueueManagement : IMSMQManagement {

		[helpstringcontext(IDS_State), propget]
		HRESULT State([out,retval] long* plState);

		[helpstringcontext(IDS_NextHops), propget]
		HRESULT NextHops([out,retval] VARIANT* pvNextHops);

		[hidden, helpstringcontext(IDS_EodGetSendInfo)]
		HRESULT EodGetSendInfo([out,retval] IMSMQCollection** ppCollection);
		
		[helpstringcontext(IDS_Resume)]
		HRESULT Resume();

		[helpstringcontext(IDS_Pause)]
		HRESULT Pause();
		
		[helpstringcontext(IDS_EodResend)]
		HRESULT EodResend();
	};


	[
		uuid(0188401c-247a-4fed-99c6-bf14119d7055),
		helpstringcontext(IDS_IMSMQOUTGOINGQUEUEMANAGEMENT)
    ]
    coclass MSMQOutgoingQueueManagement {
			[default]interface IMSMQOutgoingQueueManagement;
    };


	//
	// IMSMQQueueManagement
	//
	 
    [
		uuid(7FBE7759-5760-444d-B8A5-5E7AB9A84CCE),
		helpstringcontext(IDS_IMSMQQUEUEMANAGEMENT),
		dual,
	]
    interface IMSMQQueueManagement : IMSMQManagement {

		[helpstringcontext(IDS_JournalMessageCount), propget]
		HRESULT JournalMessageCount([out,retval] long* plJournalMessageCount);

		[propget]
		HRESULT BytesInJournal([out,retval] VARIANT* pvBytesInJournal);
		[hidden, helpstringcontext(IDS_EodGetSendInfo)]
		HRESULT EodGetReceiveInfo([out,retval] VARIANT* pvCollection);
	};


    [
		uuid(33b6d07e-f27d-42fa-b2d7-bf82e11e9374),
		helpstringcontext(IDS_IMSMQQUEUEMANAGEMENT)
    ]
    coclass MSMQQueueManagement {
		[default]interface IMSMQQueueManagement;
    };
};
