//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft shared
// source or premium shared source license agreement under which you licensed
// this source code. If you did not accept the terms of the license agreement,
// you are not authorized to use this source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the SOURCE.RTF on your install media or the root of your tools installation.
// THE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES.
//

//=--------------------------------------------------------------------------=
// mqoa.ODL
//=--------------------------------------------------------------------------=
//
// 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 Object Library"),
    helpstringdll(MQOADLL),
    lcid(0x0000),
    version(1.0)
]
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 IMSMQQueueInfos;
    interface IMSMQQuery;
    interface IMSMQQueueInfo;
    interface IMSMQQueue;
    interface IMSMQMessage;
    interface IMSMQEvent;
#if 0 // these interfaces are not supported
    interface IMSMQTransaction;
    interface IMSMQCoordinatedTransactionDispenser;
    interface IMSMQTransactionDispenser;
#endif // 0

    // 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 
#if defined(MQOAHELP)
    [helpstringcontext(IDS_MQCALG)]
#endif
    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 
#if defined(MQOAHELP)
    [helpstringcontext(IDS_MQTRANSACTION)]
#endif
    enum _MQTRANSACTION {
      MQ_NO_TRANSACTION             = 0,
      MQ_MTS_TRANSACTION            = 1,
      MQ_XA_TRANSACTION             = 2,
      MQ_SINGLE_MESSAGE             = 3
    } MQTRANSACTION;

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


    //
    // event/cursor related enums
    // 
    typedef 
#if defined(MQOAHELP)
    [helpstringcontext(IDS_MQMSGCURSOR)]
#endif
    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 
#if defined(MQOAHELP)
    [helpstringcontext(IDS_MQMSGCLASS)]
#endif
    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 
#if defined(MQOAHELP)
    [helpstringcontext(IDS_MQMSGDELIVERY)]
#endif
    enum _MQMSGDELIVERY {
	MQMSG_DELIVERY_EXPRESS              = DEF_MQMSG_DELIVERY_EXPRESS,
	MQMSG_DELIVERY_RECOVERABLE          = DEF_MQMSG_DELIVERY_RECOVERABLE
    } MQMSGDELIVERY;

#define DEF_MQMSG_ACKNOWLEDGMENT_NONE 0x00
    typedef
#if defined(MQOAHELP)
 	[helpstringcontext(IDS_MQMSGACKNOWLEDGEMENT)] 
#endif
    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
#if defined(MQOAHELP)
    [helpstringcontext(IDS_MQMSGJOURNAL)] 
#endif
    enum _MQMSGJOURNAL {
      MQMSG_JOURNAL_NONE = DEF_MQMSG_JOURNAL_NONE,
      MQMSG_DEADLETTER = 1,
      MQMSG_JOURNAL = 2
    } MQMSGJOURNAL;

    typedef 
#if defined(MQOAHELP)
    [helpstringcontext(IDS_MQMSGTRACE)] 
#endif
    enum _MQMSGTRACE {
      MQMSG_TRACE_NONE = 0,
      MQMSG_SEND_ROUTE_TO_REPORT_QUEUE = 1
    } MQMSGTRACE;

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

#define DEF_MQMSG_PRIV_LEVEL_NONE 0
    typedef 
#if defined(MQOAHELP)
	[helpstringcontext(IDS_MQMSGPRIVLEVEL)] 
#endif
	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 
#if defined(MQOAHELP)
	[helpstringcontext(IDS_MQMSGAUTHLEVEL)] 
#endif
	enum _MQMSGAUTHLEVEL {
      MQMSG_AUTH_LEVEL_NONE = DEF_MQMSG_AUTH_LEVEL_NONE,
      MQMSG_AUTH_LEVEL_ALWAYS = 1
    } MQMSGAUTHLEVEL;

    typedef 
#if defined(MQOAHELP)
	[helpstringcontext(IDS_MQMSGIDSIZE)] 
#endif
	enum _MQMSGIDSIZE {
      MQMSG_MSGID_SIZE         = 20,
      MQMSG_CORRELATIONID_SIZE = 20
    } MQMSGIDSIZE;

    typedef 
#if defined(MQOAHELP)
	[helpstringcontext(IDS_MQMSGMAX)] 
#endif
	enum _MQMSGMAX {
      MQ_MAX_MSG_LABEL_LEN   = 249,
    } MQMSGMAX;

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

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

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

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

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

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

    typedef 
#if defined(MQOAHELP)
    [helpstringcontext(IDS_MQPRIORITY)] 
#endif
    enum _MQPRIORITY {
      MQ_MIN_PRIORITY = 0,
      MQ_MAX_PRIORITY = 7
    } MQPRIORITY;

    typedef 
#if defined(MQOAHELP)
    [helpstringcontext(IDS_MQMAX)] 
#endif
    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 
#if defined(MQOAHELP)
    [helpstringcontext(IDS_MQDEFAULT)]
#endif
    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 
#if defined(MQOAHELP)
    [helpstringcontext(IDS_MQERROR)] 
#endif
    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 
#if defined(MQOAHELP)
    [helpstringcontext(IDS_MQWARNING)] 
#endif
    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),
#if defined(MQOAHELP)	
	helpstringcontext(IDS_IMSMQQUERY),
#endif
	hidden,
	dual,
	nonextensible,
	odl
    ]
    interface IMSMQQuery : IDispatch {

	// properties
	//

	// methods
	//
#if defined(MQOAHELP)
	[helpstringcontext(IDS_LookupQueue)]
#endif
	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)
#if defined(MQOAHELP)
	,helpstringcontext(IDS_MSMQQUERY)
#endif
    ]
    coclass MSMQQuery {
	[default]         interface IMSMQQuery;
    };


    // primary dispatch interface for CMSMQMessage object
    //
    [
	uuid(D7D6E074-DCCD-11d0-AA4B-0060970DEBAE),
#if defined(MQOAHELP)
	helpstringcontext(IDS_IMSMQMESSAGE),
#endif
	hidden,
	dual,
	odl
    ]
    interface IMSMQMessage : IDispatch {

	// properties
	//
	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_lClass),
#endif
	propget, id(DISPID_MQMESSAGE_MSGCLASS)]
	HRESULT Class([out, retval] long *plClass);

	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_lPrivLevel), 
#endif
	propget, id(DISPID_MQMESSAGE_PRIVLEVEL)]
	HRESULT PrivLevel([out, retval] long *plPrivLevel);

	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_lPrivLevel), 
#endif
	propput, id(DISPID_MQMESSAGE_PRIVLEVEL)]
	HRESULT PrivLevel([in] long lPrivLevel);

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

	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_isAuthenticated), 
#endif
	propget, id(DISPID_MQMESSAGE_AUTHENTICATED)]
	HRESULT IsAuthenticated([out, retval] Boolean *pisAuthenticated);

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

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

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

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

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

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

	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_guidSrcMachine), 
#endif
	propget, id(DISPID_MQMESSAGE_GUIDSRCMACHINE)]
	HRESULT SourceMachineGuid([out, retval] BSTR *pbstrGuidSrcMachine);

	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_lenBody), 
#endif
	propget, id(DISPID_MQMESSAGE_LENBODY)]
	HRESULT BodyLength([out, retval] long *pcbBody);

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

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

	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_id), 
#endif
	propget, id(DISPID_MQMESSAGE_ID)]
	HRESULT Id([out, retval] VARIANT *pvarMsgId);

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

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

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

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

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

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

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

	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_dateSentTime), 
#endif
	propget, id(DISPID_MQMESSAGE_SENTTIME)]
	HRESULT SentTime([out, retval] VARIANT *pvarSentTime);

	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_dateArrivedTime), 
#endif
	propget, id(DISPID_MQMESSAGE_ARRIVEDTIME)]
	HRESULT ArrivedTime([out, retval] VARIANT *plArrivedTime);

	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_queueinfoDest), 
#endif
	propget, id(DISPID_MQMESSAGE_QUEUEINFODEST)]
	HRESULT DestinationQueueInfo([out, retval] IMSMQQueueInfo **ppqinfoDest);

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

	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_binSenderId), 
#endif
	propget, id(DISPID_MQMESSAGE_SENDERID)]
	HRESULT SenderId([out, retval] VARIANT *pvarSenderId);

	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_lSenderIdType), 
#endif
	propget, id(DISPID_MQMESSAGE_SENDERIDTYPE)]
	HRESULT SenderIdType([out, retval] long *plSenderIdType);
	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_lSenderIdType), 
#endif
	propput, id(DISPID_MQMESSAGE_SENDERIDTYPE)]
	HRESULT SenderIdType([in] long lSenderIdType);

	// methods
	//
#if defined(MQOAHELP)
	[helpstringcontext(IDS_Send)]
#endif
	HRESULT Send(
	  [in] IMSMQQueue *DestinationQueue,
	  [in, optional] VARIANT *Transaction);
#if defined(MQOAHELP)
	[helpstringcontext(IDS_AttachCurrentSecurityContext)]
#endif
	HRESULT AttachCurrentSecurityContext();
    };

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

    // primary dispatch interface for CMSMQQueue object
    //
    [
	uuid(D7D6E076-DCCD-11d0-AA4B-0060970DEBAE),
#if defined(MQOAHELP)
	helpstringcontext(IDS_IMSMQQUEUE),
#endif
	hidden,
	dual,
	odl
    ]
    interface IMSMQQueue : IDispatch {

	// properties
	//
	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_lAccess), 
#endif
	propget, id(DISPID_MQQUEUE_ACCESS)]
	HRESULT Access([out, retval] long *plAccess);

	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_lShareMode), 
#endif
	propget, id(DISPID_MQQUEUE_SHAREMODE)]
	HRESULT ShareMode([out, retval] long *plShareMode);

	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_queueinfo), 
#endif
	propget, id(DISPID_MQQUEUE_QUEUEINFO)]
	HRESULT QueueInfo([out, retval] IMSMQQueueInfo **ppqinfo);

	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_lHandle), 
#endif
	propget, id(DISPID_MQQUEUE_HANDLE)]
	HRESULT Handle([out, retval] long *plHandle);

	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_isOpen), 
#endif
	propget, id(DISPID_MQQUEUE_ISOPEN)]
	HRESULT IsOpen([out, retval] Boolean *pisOpen);

	// methods
	//
#if defined(MQOAHELP)	
	[helpstringcontext(IDS_Close)]
#endif
	HRESULT Close();
#if defined(MQOAHELP)
	[helpstringcontext(IDS_Receive)]
#endif
	HRESULT Receive(
	  [in, optional] VARIANT *Transaction,
	  [in, optional] VARIANT *WantDestinationQueue,
	  [in, optional] VARIANT *WantBody,
	  [in, optional] VARIANT *ReceiveTimeout,
	  [out, retval] IMSMQMessage **ppmsg);

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

#if defined(MQOAHELP)
	[helpstringcontext(IDS_EnableNotification)]
#endif
	HRESULT EnableNotification(
	  [in] IMSMQEvent *Event,
	  [in , optional] VARIANT *Cursor,
	  [in, optional] VARIANT *ReceiveTimeout);

#if defined(MQOAHELP)
	[helpstringcontext(IDS_Reset)]
#endif
	HRESULT Reset();

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

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

#if defined(MQOAHELP)
	[helpstringcontext(IDS_PeekCurrent)]
#endif
	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 {
        // 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),
#if defined(MQOAHELP)
	helpstringcontext(IDS_IMSMQEVENT),
#endif
	hidden,
	dual,
	odl
    ]
    interface IMSMQEvent : IDispatch {
    }


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

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

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

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

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

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

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

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

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

	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_isTransactional), 
#endif
	propget, id(DISPID_MQQUEUEINFO_ISTRANSACTIONAL)]
	HRESULT IsTransactional([out, retval] Boolean *pisTransactional);

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

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

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

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

	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_dateCreateTime), 
#endif
	propget, id(DISPID_MQQUEUEINFO_CREATETIME)]
	HRESULT CreateTime([out, retval] VARIANT *pvarCreateTime);

	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_dateModifyTime),
#endif
	propget, id(DISPID_MQQUEUEINFO_MODIFYTIME)]
	HRESULT ModifyTime([out, retval] VARIANT *pvarModifyTime);

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

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

	[
#if defined(MQOAHELP)
	helpstringcontext(IDS_IsWorldReadable), 
#endif
	propget, id(DISPID_MQQUEUEINFO_ISWORLDREADABLE)]
	HRESULT IsWorldReadable([out, retval] Boolean *pisWorldReadable);

	// methods
	//
#if defined(MQOAHELP)
	[helpstringcontext(IDS_Create)]
#endif
	HRESULT Create(
	  [in, optional] VARIANT *IsTransactional,
	  [in, optional] VARIANT *IsWorldReadable);

#if defined(MQOAHELP)
	[helpstringcontext(IDS_Delete)]
#endif
	HRESULT Delete();

#if defined(MQOAHELP)
	[helpstringcontext(IDS_Open)]
#endif
	HRESULT Open([in] long Access,
		     [in] long ShareMode,
		     [out, retval] IMSMQQueue **ppq);

#if defined(MQOAHELP)
	[helpstringcontext(IDS_Refresh)]
#endif
	HRESULT Refresh();

#if defined(MQOAHELP)
	[helpstringcontext(IDS_Update)]
#endif
	HRESULT Update();
    };

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

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

	// properties
	//

	// methods
	//
#if defined(MQOAHELP)
	[helpstringcontext(IDS_MSMQQueueInfos_Reset)]
#endif
	HRESULT Reset();
#if defined(MQOAHELP)
	[helpstringcontext(IDS_MSMQQueueInfos_Reset)]
#endif
	HRESULT Next([out, retval] IMSMQQueueInfo **ppqinfoNext);
    };

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

    //
    // Transactions
    //
 #if 0 // no transaction support
    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),
#if defined(MQOAHELP)
	helpstringcontext(IDS_IMSMQTRANSACTION),
#endif
	hidden,
	dual,
	odl
    ]
    interface IMSMQTransaction : IDispatch {
      // properties
      //
      [
#if defined(MQOAHELP)
      helpstringcontext(IDS_lTransaction), 
#endif
      propget, id(DISPID_MQTRANSACTION_TRANSACTION)]
      HRESULT Transaction([out, retval] long *plTransaction);
      
      // methods
      //
#if defined(MQOAHELP)
      [helpstringcontext(IDS_Commit)]
#endif
      HRESULT Commit([in, optional] VARIANT *fRetaining,
		     [in, optional] VARIANT *grfTC,
		     [in, optional] VARIANT *grfRM);

#if defined(MQOAHELP)
      [helpstringcontext(IDS_Abort)]
#endif 
      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),
#if defined(MQOAHELP)
	helpstringcontext(IDS_MSMQTRANSACTION)
#endif
    ]
    coclass MSMQTransaction {
	[default]         interface IMSMQTransaction;
    };


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

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


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

    // coclass for CMSMQTransactionDispenser objects
    //
    [
	uuid(D7D6E084-DCCD-11d0-AA4B-0060970DEBAE),
#if defined(MQOAHELP)
	helpstringcontext(IDS_MSMQTRANSACTIONDISPENSER)
#endif
    ]
    coclass MSMQTransactionDispenser {
	[default]         interface IMSMQTransactionDispenser;
    };
#endif // 0 no transaction support

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

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