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

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

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

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

//=--------------------------------------------------------------------------=
// the libid for this type libray
//
[
    uuid(D7D6E071-DCCD-11d0-AA4B-0060970DEBAE),
    helpstring("Microsoft Message Queue 1.0 Object Library"),
    helpstringdll(MQOADLL),
    lcid(0x0000),
    version(MSMQ10_LIB_VER)
]
library MSMQ {
    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 IMSMQQueue;
    interface IMSMQMessage;
    interface IMSMQQueueInfos;
    interface IMSMQEvent;
    interface IMSMQTransaction;
    interface IMSMQCoordinatedTransactionDispenser;
    interface IMSMQTransactionDispenser;


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

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

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

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

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

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

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

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

// RC2 sub-ids
#define ALG_SID_RC2                     2

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

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

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

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

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

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

    //
    // Message related enums
    //

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

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

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

	MQMSG_CLASS_NACK_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),

    } MQMSGCLASS;

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

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

	MQMSG_ACKNOWLEDGMENT_NACK_REACH_QUEUE = 
	    /* MQMSG_ACKNOWLEDGMENT_NEG_ARRIVAL */ 0x04,

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    //
    // Security related enums
    //

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

      MQSEC_RECEIVE_MESSAGE               = (MQSEC_DELETE_MESSAGE +
					     MQSEC_PEEK_MESSAGE),

      MQSEC_RECEIVE_JOURNAL_MESSAGE       = (MQSEC_DELETE_JOURNAL_MESSAGE +
					     MQSEC_PEEK_MESSAGE),

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

      MQSEC_QUEUE_GENERIC_WRITE           = (MQSEC_GET_QUEUE_PROPERTIES +
					     MQSEC_GET_QUEUE_PERMISSIONS +
					     MQSEC_WRITE_MESSAGE),

      MQSEC_QUEUE_GENERIC_EXECUTE         = 0,

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

//
// MessageId: MQ_ERROR_UNSUPPORTED_DBMS
//
// MessageText:
//
//  Current version of Database Management System is not supported.
//
 MQ_ERROR_UNSUPPORTED_DBMS        = 0xC00E0012,

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


    } MQERROR;





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

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

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

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

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

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

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


    } MQWARNING;



    // primary 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);
#if 0
	// UNDONE: post-beta2
	HRESULT LookupSite([in, optional] VARIANT *Name,
			   [in, optional] VARIANT *GuidSite,
			   [out, retval] IMSMQSites **ppsites);
	HRESULT LookupMachine([in, optional] VARIANT *Pathname,
			      [in, optional] VARIANT *Sitename,
			      [in, optional] VARIANT *SiteGuid,
			      [in, optional] VARIANT *MachineGuid,
			      [in, optional] VARIANT *Service,
			      [out, retval] IMSMQMachines **ppmachines);
	HRESULT LookupCN([in, optional] VARIANT *Name,
			 [in, optional] VARIANT *Protocol,
			 [in, optional] VARIANT *CNGuid,
			 [out, retval] IMSMQCNs **ppcns);
#endif // 0
    };

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



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

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

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

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

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

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

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


    // 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 CMSMQQueue objects
    //
    [
	uuid(D7D6E079-DCCD-11d0-AA4B-0060970DEBAE),
	helpstringcontext(IDS_MSMQQUEUE)
    ]
    coclass MSMQQueue {
	[default]         interface IMSMQQueue;
    };

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

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

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

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

	// properties
	//

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

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

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

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

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


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

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


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

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


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

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


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

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