home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / mq.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  52.2 KB  |  2,033 lines

  1. /*++
  2.  
  3. Copyright (c) 1996-1999 Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     mq.h
  8.  
  9. Abstract:
  10.  
  11.     Master include file for Message Queue applications
  12.  
  13. --*/
  14.  
  15. #ifndef __MQ_H__
  16. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  17. #define __MQ_H__
  18.  
  19. #if _MSC_VER > 1000
  20. #pragma once
  21. #endif
  22.  
  23.  
  24. //
  25. //  Clients that need transactions should include transact.h before mq.h
  26. //  For the clients not needing transactions - ITransaction is  opaque
  27. //
  28. #ifndef __transact_h__
  29. typedef void ITransaction;
  30. #endif
  31.  
  32. //
  33. //    Support version older than VC4.2
  34. //
  35. #if defined(_MSC_VER) && (_MSC_VER < 1020)
  36.  
  37. typedef struct tagMQPROPVARIANT MQPROPVARIANT;
  38.  
  39. #define TYPEDEF_CA(type, name) \
  40.     typedef struct tag##name {\
  41.         ULONG cElems;\
  42.         type * pElems;\
  43.     } name
  44.  
  45. #ifndef _tagCAUB_DEFINED
  46. #define _tagCAUB_DEFINED
  47. TYPEDEF_CA(unsigned char, CAUB);
  48. #endif
  49.  
  50. #ifndef _tagCAI_DEFINED
  51. #define _tagCAI_DEFINED
  52. TYPEDEF_CA(short, CAI);
  53. #endif
  54.  
  55. #ifndef _tagCAUI_DEFINED
  56. #define _tagCAUI_DEFINED
  57. TYPEDEF_CA(USHORT, CAUI);
  58. #endif
  59.  
  60. #ifndef _tagCAL_DEFINED
  61. #define _tagCAL_DEFINED
  62. TYPEDEF_CA(long, CAL);
  63. #endif
  64.  
  65. #ifndef _tagCAUL_DEFINED
  66. #define _tagCAUL_DEFINED
  67. TYPEDEF_CA(ULONG, CAUL);
  68. #endif
  69.  
  70. #ifndef _tagCACLSID_DEFINED
  71. #define _tagCACLSID_DEFINED
  72. TYPEDEF_CA(CLSID, CACLSID);
  73. #endif
  74.  
  75. #ifndef _tagCABSTR_DEFINED
  76. #define _tagCABSTR_DEFINED
  77. TYPEDEF_CA(LPOLESTR, CABSTR);
  78. #endif
  79.  
  80. #ifndef _tagCALPWSTR_DEFINED
  81. #define _tagCALPWSTR_DEFINED
  82. TYPEDEF_CA(LPWSTR, CALPWSTR);
  83. #endif
  84.  
  85. #ifndef _tagCAMQPROPVARIANT_DEFINED
  86. #define _tagCAMQPROPVARIANT_DEFINED
  87. TYPEDEF_CA(MQPROPVARIANT, CAMQPROPVARIANT);
  88. #endif
  89.  
  90. struct tagMQPROPVARIANT {
  91.     VARTYPE vt;
  92.     WORD wReserved1;
  93.     WORD wReserved2;
  94.     WORD wReserved3;
  95.     /*[switch_is((unsigned short)vt)]*/ union {
  96.       /*[case(VT_EMPTY, VT_NULL)];*/
  97.       /*[case(VT_UI1)]*/               UCHAR bVal;
  98.       /*[case(VT_I2)]*/                short iVal;
  99.       /*[case(VT_UI2)]*/               USHORT uiVal;
  100.       /*[case(VT_BOOL)]*/              VARIANT_BOOL boolVal;
  101.       /*[case(VT_I4)]*/                long lVal;
  102.       /*[case(VT_UI4)]*/               ULONG ulVal;
  103.       /*[case(VT_HRESULT)]*/           SCODE scode;
  104.       /*[case(VT_DATE)]*/              DATE date;
  105.       /*[case(VT_CLSID)]*/             CLSID  *puuid;
  106.       /*[case(VT_BLOB)]*/              BLOB blob;
  107.       /*[case(VT_BSTR)]*/              LPOLESTR bstrVal;
  108.       /*[case(VT_LPSTR)]*/             LPSTR pszVal;
  109.       /*[case(VT_LPWSTR)]*/            LPWSTR pwszVal;
  110.       /*[case(VT_VECTOR | VT_UI1)]*/   CAUB caub;
  111.       /*[case(VT_VECTOR | VT_I2)]*/    CAI cai;
  112.       /*[case(VT_VECTOR | VT_UI2)]*/   CAUI caui;
  113.       /*[case(VT_VECTOR | VT_I4)]*/    CAL cal;
  114.       /*[case(VT_VECTOR | VT_UI4)]*/   CAUL caul;
  115.       /*[case(VT_VECTOR | VT_CLSID)]*/ CACLSID cauuid;
  116.       /*[case(VT_VECTOR | VT_BSTR)]*/  CABSTR cabstr;
  117.       /*[case(VT_VECTOR | VT_LPWSTR)]*/CALPWSTR calpwstr;
  118.       /*[case(VT_VARIANT)]*/           CAMQPROPVARIANT capropvar;
  119.     };
  120. };
  121.  
  122. #else // defined(_MSC_VER) && (_MSC_VER < 1020)
  123.  
  124. #ifdef __midl
  125. // This is the PROPVARIANT definition for marshaling.
  126. typedef struct tag_inner_PROPVARIANT tagMQPROPVARIANT;
  127.  
  128. #else
  129. // This is the standard C layout of the PROPVARIANT.
  130. typedef struct tagPROPVARIANT tagMQPROPVARIANT;
  131. #endif
  132. typedef tagMQPROPVARIANT MQPROPVARIANT;
  133.  
  134. #endif // defined(_MSC_VER) && (_MSC_VER < 1020)
  135.  
  136. #define    PRLT    ( 0 )
  137.  
  138. #define    PRLE    ( 1 )
  139.  
  140. #define    PRGT    ( 2 )
  141.  
  142. #define    PRGE    ( 3 )
  143.  
  144. #define    PREQ    ( 4 )
  145.  
  146. #define    PRNE    ( 5 )
  147.  
  148. typedef struct tagMQPROPERTYRESTRICTION
  149.     {
  150.     ULONG rel;
  151.     PROPID prop;
  152.     MQPROPVARIANT prval;
  153.     }    MQPROPERTYRESTRICTION;
  154.  
  155. typedef struct tagMQRESTRICTION
  156.     {
  157.     ULONG cRes;
  158.     /* [size_is] */ MQPROPERTYRESTRICTION __RPC_FAR *paPropRes;
  159.     }    MQRESTRICTION;
  160.  
  161. typedef struct tagMQCOLUMNSET
  162.     {
  163.     ULONG cCol;
  164.     /* [size_is] */ PROPID __RPC_FAR *aCol;
  165.     }    MQCOLUMNSET;
  166.  
  167. #define    QUERY_SORTASCEND    ( 0 )
  168.  
  169. #define    QUERY_SORTDESCEND    ( 1 )
  170.  
  171. typedef struct tagMQSORTKEY
  172.     {
  173.     PROPID propColumn;
  174.     ULONG dwOrder;
  175.     }    MQSORTKEY;
  176.  
  177. typedef struct tagMQSORTSET
  178.     {
  179.     ULONG cCol;
  180.     /* [size_is] */ MQSORTKEY __RPC_FAR *aCol;
  181.     }    MQSORTSET;
  182.  
  183.  
  184. #define MQ_MAX_Q_NAME_LEN      124   // Maximal WCHAR length of a queue name.
  185. #define MQ_MAX_Q_LABEL_LEN     124
  186. #define MQ_MAX_MSG_LABEL_LEN   250
  187.  
  188. typedef HANDLE QUEUEHANDLE;
  189.  
  190.  
  191. typedef PROPID          MSGPROPID;
  192. typedef PROPID          QUEUEPROPID;
  193. typedef PROPID          QMPROPID;
  194.  
  195. typedef struct tagMQMSGPROPS
  196. {
  197.     DWORD           cProp;
  198.     MSGPROPID*      aPropID;
  199.     MQPROPVARIANT*  aPropVar;
  200.     HRESULT*        aStatus;
  201. } MQMSGPROPS;
  202.  
  203. typedef struct tagMQQUEUEPROPS
  204. {
  205.     DWORD           cProp;
  206.     QUEUEPROPID*    aPropID;
  207.     MQPROPVARIANT*  aPropVar;
  208.     HRESULT*        aStatus;
  209. } MQQUEUEPROPS;
  210.  
  211. typedef struct tagMQQMPROPS
  212. {
  213.     DWORD           cProp;
  214.     QMPROPID*       aPropID;
  215.     MQPROPVARIANT*  aPropVar;
  216.     HRESULT*        aStatus;
  217. } MQQMPROPS;
  218.  
  219. typedef struct tagMQPRIVATEPROPS
  220. {
  221.     DWORD           cProp;
  222.     QMPROPID*       aPropID;
  223.     MQPROPVARIANT*  aPropVar;
  224.     HRESULT*        aStatus;
  225. } MQPRIVATEPROPS;
  226.  
  227.  
  228.  
  229. //********************************************************************
  230. //  API FLAGS
  231. //********************************************************************
  232.  
  233. //
  234. //  MQOpenQueue - Access values
  235. //
  236. #define MQ_RECEIVE_ACCESS       0x00000001
  237. #define MQ_SEND_ACCESS          0x00000002
  238. #define MQ_PEEK_ACCESS          0x00000020
  239.  
  240. //
  241. //  MQOpenQueue - Share values
  242. //
  243. #define MQ_DENY_NONE            0x00000000
  244. #define MQ_DENY_RECEIVE_SHARE   0x00000001
  245.  
  246. //
  247. //  MQReceiveMessage - Action values
  248. //
  249. #define MQ_ACTION_RECEIVE       0x00000000
  250. #define MQ_ACTION_PEEK_CURRENT  0x80000000
  251. #define MQ_ACTION_PEEK_NEXT     0x80000001
  252.  
  253. //
  254. // MQSendMessage,  MQReceiveMessage:  special cases for the transaction parameter
  255. //
  256. #define MQ_NO_TRANSACTION             NULL
  257. #define MQ_MTS_TRANSACTION            (ITransaction *)1
  258. #define MQ_XA_TRANSACTION             (ITransaction *)2
  259. #define MQ_SINGLE_MESSAGE             (ITransaction *)3
  260.  
  261. //********************************************************************
  262. //  PRIORITY LIMITS
  263. //********************************************************************
  264.  
  265. //
  266. //  Message priorities
  267. //
  268. #define MQ_MIN_PRIORITY          0    // Minimal message priority
  269. #define MQ_MAX_PRIORITY          7    // Maximal message priority
  270.  
  271.  
  272. //********************************************************************
  273. //  MESSAGE PROPERTIES
  274. //********************************************************************
  275. #define PROPID_M_BASE                0
  276. #define PROPID_M_CLASS               (PROPID_M_BASE + 1)     /* VT_UI2           */
  277. #define PROPID_M_MSGID               (PROPID_M_BASE + 2)     /* VT_UI1|VT_VECTOR */
  278. #define PROPID_M_CORRELATIONID       (PROPID_M_BASE + 3)     /* VT_UI1|VT_VECTOR */
  279. #define PROPID_M_PRIORITY            (PROPID_M_BASE + 4)     /* VT_UI1           */
  280. #define PROPID_M_DELIVERY            (PROPID_M_BASE + 5)     /* VT_UI1           */
  281. #define PROPID_M_ACKNOWLEDGE         (PROPID_M_BASE + 6)     /* VT_UI1           */
  282. #define PROPID_M_JOURNAL             (PROPID_M_BASE + 7)     /* VT_UI1           */
  283. #define PROPID_M_APPSPECIFIC         (PROPID_M_BASE + 8)     /* VT_UI4           */
  284. #define PROPID_M_BODY                (PROPID_M_BASE + 9)     /* VT_UI1|VT_VECTOR */
  285. #define PROPID_M_BODY_SIZE           (PROPID_M_BASE + 10)    /* VT_UI4           */
  286. #define PROPID_M_LABEL               (PROPID_M_BASE + 11)    /* VT_LPWSTR        */
  287. #define PROPID_M_LABEL_LEN           (PROPID_M_BASE + 12)    /* VT_UI4           */
  288. #define PROPID_M_TIME_TO_REACH_QUEUE (PROPID_M_BASE + 13)    /* VT_UI4           */
  289. #define PROPID_M_TIME_TO_BE_RECEIVED (PROPID_M_BASE + 14)    /* VT_UI4           */
  290. #define PROPID_M_RESP_QUEUE          (PROPID_M_BASE + 15)    /* VT_LPWSTR        */
  291. #define PROPID_M_RESP_QUEUE_LEN      (PROPID_M_BASE + 16)    /* VT_UI4           */
  292. #define PROPID_M_ADMIN_QUEUE         (PROPID_M_BASE + 17)    /* VT_LPWSTR        */
  293. #define PROPID_M_ADMIN_QUEUE_LEN     (PROPID_M_BASE + 18)    /* VT_UI4           */
  294. #define PROPID_M_VERSION             (PROPID_M_BASE + 19)    /* VT_UI4           */
  295. #define PROPID_M_SENDERID            (PROPID_M_BASE + 20)    /* VT_UI1|VT_VECTOR */
  296. #define PROPID_M_SENDERID_LEN        (PROPID_M_BASE + 21)    /* VT_UI4           */
  297. #define PROPID_M_SENDERID_TYPE       (PROPID_M_BASE + 22)    /* VT_UI4           */
  298. #define PROPID_M_PRIV_LEVEL          (PROPID_M_BASE + 23)    /* VT_UI4           */
  299. #define PROPID_M_AUTH_LEVEL          (PROPID_M_BASE + 24)    /* VT_UI4           */
  300. #define PROPID_M_AUTHENTICATED       (PROPID_M_BASE + 25)    /* VT_UI1           */
  301. #define PROPID_M_HASH_ALG            (PROPID_M_BASE + 26)    /* VT_UI4           */
  302. #define PROPID_M_ENCRYPTION_ALG      (PROPID_M_BASE + 27)    /* VT_UI4           */
  303. #define PROPID_M_SENDER_CERT         (PROPID_M_BASE + 28)    /* VT_UI1|VT_VECTOR */
  304. #define PROPID_M_SENDER_CERT_LEN     (PROPID_M_BASE + 29)    /* VT_UI4           */
  305. #define PROPID_M_SRC_MACHINE_ID      (PROPID_M_BASE + 30)    /* VT_CLSID         */
  306. #define PROPID_M_SENTTIME            (PROPID_M_BASE + 31)    /* VT_UI4           */
  307. #define PROPID_M_ARRIVEDTIME         (PROPID_M_BASE + 32)    /* VT_UI4           */
  308. #define PROPID_M_DEST_QUEUE          (PROPID_M_BASE + 33)    /* VT_LPWSTR        */
  309. #define PROPID_M_DEST_QUEUE_LEN      (PROPID_M_BASE + 34)    /* VT_UI4           */
  310. #define PROPID_M_EXTENSION           (PROPID_M_BASE + 35)    /* VT_UI1|VT_VECTOR */
  311. #define PROPID_M_EXTENSION_LEN       (PROPID_M_BASE + 36)    /* VT_UI4           */
  312. #define PROPID_M_SECURITY_CONTEXT    (PROPID_M_BASE + 37)    /* VT_UI4           */
  313. #define PROPID_M_CONNECTOR_TYPE      (PROPID_M_BASE + 38)    /* VT_CLSID         */
  314. #define PROPID_M_XACT_STATUS_QUEUE   (PROPID_M_BASE + 39)    /* VT_LPWSTR        */
  315. #define PROPID_M_XACT_STATUS_QUEUE_LEN (PROPID_M_BASE + 40)  /* VT_UI4           */
  316. #define PROPID_M_TRACE               (PROPID_M_BASE + 41)    /* VT_UI1           */
  317. #define PROPID_M_BODY_TYPE           (PROPID_M_BASE + 42)    /* VT_UI4           */
  318. #define PROPID_M_DEST_SYMM_KEY       (PROPID_M_BASE + 43)    /* VT_UI1|VT_VECTOR */
  319. #define PROPID_M_DEST_SYMM_KEY_LEN   (PROPID_M_BASE + 44)    /* VT_UI4           */
  320. #define PROPID_M_SIGNATURE           (PROPID_M_BASE + 45)    /* VT_UI1|VT_VECTOR */
  321. #define PROPID_M_SIGNATURE_LEN       (PROPID_M_BASE + 46)    /* VT_UI4           */
  322. #define PROPID_M_PROV_TYPE           (PROPID_M_BASE + 47)    /* VT_UI4           */
  323. #define PROPID_M_PROV_NAME           (PROPID_M_BASE + 48)    /* VT_LPWSTR        */
  324. #define PROPID_M_PROV_NAME_LEN       (PROPID_M_BASE + 49)    /* VT_UI4           */
  325. #define PROPID_M_FIRST_IN_XACT       (PROPID_M_BASE + 50)    /* VT_UI1           */
  326. #define PROPID_M_LAST_IN_XACT        (PROPID_M_BASE + 51)    /* VT_UI1           */
  327. #define PROPID_M_XACTID              (PROPID_M_BASE + 52)    /* VT_UI1|VT_VECTOR */
  328.  
  329.  
  330. //
  331. // Message Property Size
  332. //
  333. #define PROPID_M_MSGID_SIZE         20
  334. #define PROPID_M_CORRELATIONID_SIZE 20
  335. #define PROPID_M_XACTID_SIZE        20
  336.  
  337.  
  338. //********************************************************************
  339. //  MESSAGE CLASS VALUES
  340. //********************************************************************
  341. //
  342. //  Message Class Values are 16 bits layed out as follows:
  343. //
  344. //   1 1 1 1 1 1
  345. //   5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
  346. //  +-+-+-----------+---------------+
  347. //  |S|R| Reserved  |  Class code   |
  348. //  +-+-+-----------+---------------+
  349. //
  350. //  where
  351. //
  352. //      S - is the severity flag
  353. //          0 - Normal Message/Positive Acknowledgment (ACK)
  354. //          1 - Negative Acknowledgment (NACK)
  355. //
  356. //      R - is the receive flag
  357. //          0 - Arrival ACK/NACK
  358. //          1 - Receive ACK/NACK
  359. //
  360. #define MQCLASS_CODE(s, r, code) ((USHORT)(((s) << 15) | ((r) << 14) | (code)))
  361. #define MQCLASS_NACK(c)     ((c) & 0x8000)
  362. #define MQCLASS_RECEIVE(c)  ((c) & 0x4000)
  363.  
  364. //
  365. //  Normal message
  366. //
  367. #define MQMSG_CLASS_NORMAL                      MQCLASS_CODE(0, 0, 0x00)
  368.  
  369. //
  370. //  Report message
  371. //
  372. #define MQMSG_CLASS_REPORT                      MQCLASS_CODE(0, 0, 0x01)
  373.  
  374. //
  375. //  Arrival acknowledgment. The message has reached the destination queue
  376. //
  377. #define MQMSG_CLASS_ACK_REACH_QUEUE             MQCLASS_CODE(0, 0, 0x02)
  378.  
  379. //
  380. //  Receive acknowledgment. The message has been received by the application
  381. //
  382. #define MQMSG_CLASS_ACK_RECEIVE                 MQCLASS_CODE(0, 1, 0x00)
  383.  
  384.  
  385. //-----------------------------------------------
  386. //
  387. //  Negative arrival acknowledgments
  388. //
  389.  
  390. //
  391. //  Destination queue can not be reached, the queue may have been deleted
  392. //
  393. #define MQMSG_CLASS_NACK_BAD_DST_Q              MQCLASS_CODE(1, 0, 0x00)
  394.  
  395. //
  396. //  The message was purged before reaching the destination queue
  397. //
  398. #define MQMSG_CLASS_NACK_PURGED                 MQCLASS_CODE(1, 0, 0x01)
  399.  
  400. //
  401. //  Time to reach queue has expired
  402. //
  403. #define MQMSG_CLASS_NACK_REACH_QUEUE_TIMEOUT    MQCLASS_CODE(1, 0, 0x02)
  404.  
  405. //
  406. //  The message has exceeded the queue quota
  407. //
  408. #define MQMSG_CLASS_NACK_Q_EXCEED_QUOTA         MQCLASS_CODE(1, 0, 0x03)
  409.  
  410. //
  411. //  The sender does not have send access rights on the queue.
  412. //
  413. #define MQMSG_CLASS_NACK_ACCESS_DENIED          MQCLASS_CODE(1, 0, 0x04)
  414.  
  415. //
  416. //  The message hop count exceeded
  417. //
  418. #define MQMSG_CLASS_NACK_HOP_COUNT_EXCEEDED     MQCLASS_CODE(1, 0, 0x05)
  419.  
  420. //
  421. //  The message signature is bad. The message could not be authenticated.
  422. //
  423. #define MQMSG_CLASS_NACK_BAD_SIGNATURE          MQCLASS_CODE(1, 0, 0x06)
  424.  
  425. //
  426. //  The message could not be decrypted.
  427. //
  428. #define MQMSG_CLASS_NACK_BAD_ENCRYPTION         MQCLASS_CODE(1, 0, 0x07)
  429.  
  430. //
  431. //  The message could not be encrypted for the destination.
  432. //
  433. #define MQMSG_CLASS_NACK_COULD_NOT_ENCRYPT      MQCLASS_CODE(1, 0, 0x08)
  434.  
  435. //
  436. //  The message was sent to a non-transactional queue within a transaction.
  437. //
  438. #define MQMSG_CLASS_NACK_NOT_TRANSACTIONAL_Q    MQCLASS_CODE(1, 0, 0x09)
  439.  
  440. //
  441. //  The message was sent to a transactional queue not within a transaction.
  442. //
  443. #define MQMSG_CLASS_NACK_NOT_TRANSACTIONAL_MSG  MQCLASS_CODE(1, 0, 0x0A)
  444.  
  445. //
  446. //  The requested crypto provider for encryption is not supported by destination.
  447. //
  448. #define MQMSG_CLASS_NACK_UNSUPPORTED_CRYPTO_PROVIDER  MQCLASS_CODE(1, 0, 0x0B)
  449.  
  450.  
  451. //-----------------------------------------------
  452. //
  453. //  Negative receive acknowledgments
  454. //
  455.  
  456. //
  457. //  The queue was deleted, after the message has arrived
  458. //
  459. #define MQMSG_CLASS_NACK_Q_DELETED              MQCLASS_CODE(1, 1, 0x00)
  460.  
  461. //
  462. //  The message was purged at the destination queue
  463. //
  464. #define MQMSG_CLASS_NACK_Q_PURGED               MQCLASS_CODE(1, 1, 0x01)
  465.  
  466. //
  467. //  Time to receive has expired, while the message is in the queue (info from the destination)
  468. //
  469. #define MQMSG_CLASS_NACK_RECEIVE_TIMEOUT        MQCLASS_CODE(1, 1, 0x02)
  470.  
  471. //
  472. //  Time to receive has expired, while the message is in the queue (generated by sender locally)
  473. //
  474. #define MQMSG_CLASS_NACK_RECEIVE_TIMEOUT_AT_SENDER  MQCLASS_CODE(1, 1, 0x03)
  475.  
  476.  
  477. //------ PROPID_M_ACKNOWLEDGE ---------------
  478. #define MQMSG_ACKNOWLEDGMENT_NONE           0x00
  479.  
  480. #define MQMSG_ACKNOWLEDGMENT_POS_ARRIVAL    0x01
  481. #define MQMSG_ACKNOWLEDGMENT_POS_RECEIVE    0x02
  482. #define MQMSG_ACKNOWLEDGMENT_NEG_ARRIVAL    0x04
  483. #define MQMSG_ACKNOWLEDGMENT_NEG_RECEIVE    0x08
  484.  
  485. #define MQMSG_ACKNOWLEDGMENT_NACK_REACH_QUEUE ((UCHAR)( \
  486.             MQMSG_ACKNOWLEDGMENT_NEG_ARRIVAL ))
  487.  
  488. #define MQMSG_ACKNOWLEDGMENT_FULL_REACH_QUEUE ((UCHAR)( \
  489.             MQMSG_ACKNOWLEDGMENT_NEG_ARRIVAL |  \
  490.             MQMSG_ACKNOWLEDGMENT_POS_ARRIVAL ))
  491.  
  492. #define MQMSG_ACKNOWLEDGMENT_NACK_RECEIVE ((UCHAR)( \
  493.             MQMSG_ACKNOWLEDGMENT_NEG_ARRIVAL |  \
  494.             MQMSG_ACKNOWLEDGMENT_NEG_RECEIVE ))
  495.  
  496. #define MQMSG_ACKNOWLEDGMENT_FULL_RECEIVE ((UCHAR)( \
  497.             MQMSG_ACKNOWLEDGMENT_NEG_ARRIVAL |  \
  498.             MQMSG_ACKNOWLEDGMENT_NEG_RECEIVE |  \
  499.             MQMSG_ACKNOWLEDGMENT_POS_RECEIVE ))
  500.  
  501. //------ PROPID_M_DELIVERY ------------------
  502. #define MQMSG_DELIVERY_EXPRESS              0
  503. #define MQMSG_DELIVERY_RECOVERABLE          1
  504.  
  505. //----- PROPID_M_JOURNAL --------------------
  506. #define MQMSG_JOURNAL_NONE                  0
  507. #define MQMSG_DEADLETTER                    1
  508. #define MQMSG_JOURNAL                       2
  509.  
  510. //----- PROPID_M_TRACE ----------------------
  511. #define MQMSG_TRACE_NONE                    0
  512. #define MQMSG_SEND_ROUTE_TO_REPORT_QUEUE    1
  513.  
  514. //----- PROPID_M_SENDERID_TYPE --------------
  515. #define MQMSG_SENDERID_TYPE_NONE            0
  516. #define MQMSG_SENDERID_TYPE_SID             1
  517.  
  518. //----- PROPID_M_PRIV_LEVEL -----------------
  519. #define MQMSG_PRIV_LEVEL_NONE               0
  520. #define MQMSG_PRIV_LEVEL_BODY               0x01
  521. #define MQMSG_PRIV_LEVEL_BODY_BASE          0x01
  522. #define MQMSG_PRIV_LEVEL_BODY_ENHANCED      0x03
  523.  
  524. //----- PROPID_M_AUTH_LEVEL -----------------
  525. #define MQMSG_AUTH_LEVEL_NONE               0
  526. #define MQMSG_AUTH_LEVEL_ALWAYS             1
  527.  
  528. //----- PROPID_M_AUTHENTICATED --------------
  529. #define MQMSG_AUTHENTICATION_NOT_REQUESTED  0
  530. #define MQMSG_AUTHENTICATION_REQUESTED      1
  531.  
  532. //----- PROPID_M_FIRST_IN_XACT --------------
  533. #define MQMSG_NOT_FIRST_IN_XACT             0
  534. #define MQMSG_FIRST_IN_XACT                 1
  535.  
  536. //----- PROPID_M_LAST_IN_XACT  --------------
  537. #define MQMSG_NOT_LAST_IN_XACT              0
  538. #define MQMSG_LAST_IN_XACT                  1
  539.  
  540.  
  541.  
  542. //********************************************************************
  543. //  QUEUE PROPERTIES
  544. //********************************************************************
  545. #define PROPID_Q_BASE           100
  546. #define PROPID_Q_INSTANCE       (PROPID_Q_BASE +  1)  /* VT_CLSID     */
  547. #define PROPID_Q_TYPE           (PROPID_Q_BASE +  2)  /* VT_CLSID     */
  548. #define PROPID_Q_PATHNAME       (PROPID_Q_BASE +  3)  /* VT_LPWSTR    */
  549. #define PROPID_Q_JOURNAL        (PROPID_Q_BASE +  4)  /* VT_UI1       */
  550. #define PROPID_Q_QUOTA          (PROPID_Q_BASE +  5)  /* VT_UI4       */
  551. #define PROPID_Q_BASEPRIORITY   (PROPID_Q_BASE +  6)  /* VT_I2        */
  552. #define PROPID_Q_JOURNAL_QUOTA  (PROPID_Q_BASE +  7)  /* VT_UI4       */
  553. #define PROPID_Q_LABEL          (PROPID_Q_BASE +  8)  /* VT_LPWSTR    */
  554. #define PROPID_Q_CREATE_TIME    (PROPID_Q_BASE +  9)  /* VT_I4        */
  555. #define PROPID_Q_MODIFY_TIME    (PROPID_Q_BASE + 10)  /* VT_I4        */
  556. #define PROPID_Q_AUTHENTICATE   (PROPID_Q_BASE + 11)  /* VT_UI1       */
  557. #define PROPID_Q_PRIV_LEVEL     (PROPID_Q_BASE + 12)  /* VT_UI4       */
  558. #define PROPID_Q_TRANSACTION    (PROPID_Q_BASE + 13)  /* VT_UI1       */
  559. #define PROPID_Q_PATHNAME_DNS  (PROPID_Q_BASE + 24)  /* VT_LPWSTR    */
  560.  
  561.  
  562. //----- PROPID_Q_JOURNAL ------------------
  563. #define MQ_JOURNAL_NONE     (unsigned char)0
  564. #define MQ_JOURNAL          (unsigned char)1
  565.  
  566. //----- PROPID_Q_TYPE ------------------
  567. //  {55EE8F32-CCE9-11cf-B108-0020AFD61CE9}
  568. #define MQ_QTYPE_REPORT {0x55ee8f32, 0xcce9, 0x11cf, \
  569.                         {0xb1, 0x8, 0x0, 0x20, 0xaf, 0xd6, 0x1c, 0xe9}}
  570.  
  571. //  {55EE8F33-CCE9-11cf-B108-0020AFD61CE9}
  572. #define MQ_QTYPE_TEST   {0x55ee8f33, 0xcce9, 0x11cf, \
  573.                         {0xb1, 0x8, 0x0, 0x20, 0xaf, 0xd6, 0x1c, 0xe9}}
  574.  
  575. //----- PROPID_Q_TRANSACTION ------------------
  576. #define MQ_TRANSACTIONAL_NONE     (unsigned char)0
  577. #define MQ_TRANSACTIONAL          (unsigned char)1
  578.  
  579. //----- PROPID_Q_AUTHENTICATE ------------------
  580. #define MQ_AUTHENTICATE_NONE      (unsigned char)0
  581. #define MQ_AUTHENTICATE           (unsigned char)1
  582.  
  583. //----- PROPID_Q_PRIV_LEVEL ------------------
  584. #define MQ_PRIV_LEVEL_NONE        (unsigned long)0
  585. #define MQ_PRIV_LEVEL_OPTIONAL    (unsigned long)1
  586. #define MQ_PRIV_LEVEL_BODY        (unsigned long)2
  587.  
  588.  
  589. //********************************************************************
  590. //  MACHINE PROPERTIES
  591. //********************************************************************
  592. #define PROPID_QM_BASE 200
  593.  
  594. #define PROPID_QM_SITE_ID                   (PROPID_QM_BASE +  1) /* VT_CLSID            */
  595. #define PROPID_QM_MACHINE_ID                (PROPID_QM_BASE +  2) /* VT_CLSID            */
  596. #define PROPID_QM_PATHNAME                  (PROPID_QM_BASE +  3) /* VT_LPWSTR           */
  597. #define PROPID_QM_CONNECTION                (PROPID_QM_BASE +  4) /* VT_LPWSTR|VT_VECTOR */
  598. #define PROPID_QM_ENCRYPTION_PK             (PROPID_QM_BASE +  5) /* VT_BLOB             */
  599. #define PROPID_QM_ENCRYPTION_PK_BASE        (PROPID_QM_BASE + 31)  /* VT_UI1|VT_VECTOR  */
  600. #define PROPID_QM_ENCRYPTION_PK_ENHANCED    (PROPID_QM_BASE + 32)  /* VT_UI1|VT_VECTOR  */
  601. #define PROPID_QM_PATHNAME_DNS              (PROPID_QM_BASE + 33)  /* VT_LPWSTR         */
  602.  
  603. //
  604. // LONG_LIVED is the default for PROPID_M_TIME_TO_REACH_QUEUE. If call
  605. // to MQSendMessage() specify this value, or not give this property at
  606. // all, then the actual timeout is taken from MQIS database.
  607. //
  608. #define LONG_LIVED    0xfffffffe
  609.  
  610. //********************************************************************
  611. //  PRIVATE COMPUTER PROPERTIES
  612. //********************************************************************
  613. #define PROPID_PC_BASE 5800
  614.  
  615. #define PROPID_PC_VERSION             (PROPID_PC_BASE + 1) /* VT_UI4            */
  616. #define PROPID_PC_DS_ENABLED          (PROPID_PC_BASE + 2) /* VT_BOOL           */
  617.  
  618. //
  619. // Success
  620. //
  621. #define MQ_OK                       0L
  622.  
  623.  
  624. #ifndef FACILITY_MSMQ
  625. #define FACILITY_MSMQ               0x0E
  626. #endif
  627.  
  628.  
  629. //
  630. //  Error
  631. //
  632.  
  633. //
  634. //  Values are 32 bit values layed out as follows:
  635. //
  636. //   3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
  637. //   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
  638. //  +---+-+-+-----------------------+-------------------------------+
  639. //  |Sev|C|R|     Facility          |               Code            |
  640. //  +---+-+-+-----------------------+-------------------------------+
  641. //
  642. //  where
  643. //
  644. //      Sev - is the severity code
  645. //
  646. //          00 - Success
  647. //          01 - Informational
  648. //          10 - Warning
  649. //          11 - Error
  650. //
  651. //      C - is the Customer code flag
  652. //
  653. //      R - is a reserved bit
  654. //
  655. //      Facility - is the facility code
  656. //
  657. //      Code - is the facility's status code
  658. //
  659. //
  660. // Define the facility codes
  661. //
  662.  
  663.  
  664. //
  665. // Define the severity codes
  666. //
  667.  
  668.  
  669. //
  670. // MessageId: MQ_ERROR
  671. //
  672. // MessageText:
  673. //
  674. //  GenericError
  675. //
  676. #define MQ_ERROR                         0xC00E0001L
  677.  
  678. //
  679. // MessageId: MQ_ERROR_PROPERTY
  680. //
  681. // MessageText:
  682. //
  683. //  One or more of the passed properties are invalid.
  684. //
  685. #define MQ_ERROR_PROPERTY                0xC00E0002L
  686.  
  687. //
  688. // MessageId: MQ_ERROR_QUEUE_NOT_FOUND
  689. //
  690. // MessageText:
  691. //
  692. //  The queue does not exist, or you do not have sufficient permissions to perform the operation.
  693. //
  694. #define MQ_ERROR_QUEUE_NOT_FOUND         0xC00E0003L
  695.  
  696. //
  697. // MessageId: MQ_ERROR_QUEUE_EXISTS
  698. //
  699. // MessageText:
  700. //
  701. //  A queue with the same pathname already exists.
  702. //
  703. #define MQ_ERROR_QUEUE_EXISTS            0xC00E0005L
  704.  
  705. //
  706. // MessageId: MQ_ERROR_INVALID_PARAMETER
  707. //
  708. // MessageText:
  709. //
  710. //  An invalid parameter was passed to a function.
  711. //
  712. #define MQ_ERROR_INVALID_PARAMETER       0xC00E0006L
  713.  
  714. //
  715. // MessageId: MQ_ERROR_INVALID_HANDLE
  716. //
  717. // MessageText:
  718. //
  719. //  An invalid handle was passed to a function.
  720. //
  721. #define MQ_ERROR_INVALID_HANDLE          0xC00E0007L
  722.  
  723. //
  724. // MessageId: MQ_ERROR_OPERATION_CANCELLED
  725. //
  726. // MessageText:
  727. //
  728. //  The operation was cancelled before it could be completed.
  729. //
  730. #define MQ_ERROR_OPERATION_CANCELLED     0xC00E0008L
  731.  
  732. //
  733. // MessageId: MQ_ERROR_SHARING_VIOLATION
  734. //
  735. // MessageText:
  736. //
  737. //  There is a sharing violation. The queue is already open for an exclusive receive.
  738. //
  739. #define MQ_ERROR_SHARING_VIOLATION       0xC00E0009L
  740.  
  741. //
  742. // MessageId: MQ_ERROR_SERVICE_NOT_AVAILABLE
  743. //
  744. // MessageText:
  745. //
  746. //  The Message Queuing service is not available
  747. //
  748. #define MQ_ERROR_SERVICE_NOT_AVAILABLE   0xC00E000BL
  749.  
  750. //
  751. // MessageId: MQ_ERROR_MACHINE_NOT_FOUND
  752. //
  753. // MessageText:
  754. //
  755. //  The specified computer could not be found.
  756. //
  757. #define MQ_ERROR_MACHINE_NOT_FOUND       0xC00E000DL
  758.  
  759. //
  760. // MessageId: MQ_ERROR_ILLEGAL_SORT
  761. //
  762. // MessageText:
  763. //
  764. //  The sort operation specified in MQLocateBegin is invalid  (for example: duplicate columns).
  765. //
  766. #define MQ_ERROR_ILLEGAL_SORT            0xC00E0010L
  767.  
  768. //
  769. // MessageId: MQ_ERROR_ILLEGAL_USER
  770. //
  771. // MessageText:
  772. //
  773. //  The user specified is not a valid  user.
  774. //
  775. #define MQ_ERROR_ILLEGAL_USER            0xC00E0011L
  776.  
  777. //
  778. // MessageId: MQ_ERROR_NO_DS
  779. //
  780. // MessageText:
  781. //
  782. //  Unable to establish a connection with Active Directory. Verify there are sufficient permissions to perform this operation.
  783. //
  784. #define MQ_ERROR_NO_DS                   0xC00E0013L
  785.  
  786. //
  787. // MessageId: MQ_ERROR_ILLEGAL_QUEUE_PATHNAME
  788. //
  789. // MessageText:
  790. //
  791. //  The  queue pathname specified is invalid.
  792. //
  793. #define MQ_ERROR_ILLEGAL_QUEUE_PATHNAME  0xC00E0014L
  794.  
  795. //
  796. // MessageId: MQ_ERROR_ILLEGAL_PROPERTY_VALUE
  797. //
  798. // MessageText:
  799. //
  800. //  The property value specified is invalid.
  801. //
  802. #define MQ_ERROR_ILLEGAL_PROPERTY_VALUE  0xC00E0018L
  803.  
  804. //
  805. // MessageId: MQ_ERROR_ILLEGAL_PROPERTY_VT
  806. //
  807. // MessageText:
  808. //
  809. //  The VARTYPE value specified is invalid.
  810. //
  811. #define MQ_ERROR_ILLEGAL_PROPERTY_VT     0xC00E0019L
  812.  
  813. //
  814. // MessageId: MQ_ERROR_BUFFER_OVERFLOW
  815. //
  816. // MessageText:
  817. //
  818. //  The buffer supplied to MQReceiveMessage for message body retrieval
  819. //  was too small. The message was not removed from the queue and part
  820. //  of the message body that is  in the buffer was copied.
  821. //
  822. #define MQ_ERROR_BUFFER_OVERFLOW         0xC00E001AL
  823.  
  824. //
  825. // MessageId: MQ_ERROR_IO_TIMEOUT
  826. //
  827. // MessageText:
  828. //
  829. //  The MQReceiveMessage timeout has expired
  830. //
  831. #define MQ_ERROR_IO_TIMEOUT              0xC00E001BL
  832.  
  833. //
  834. // MessageId: MQ_ERROR_ILLEGAL_CURSOR_ACTION
  835. //
  836. // MessageText:
  837. //
  838. //  The MQ_ACTION_PEEK_NEXT value specified for MQReceiveMessage cannot be used with
  839. //  the current cursor position.
  840. //
  841. #define MQ_ERROR_ILLEGAL_CURSOR_ACTION   0xC00E001CL
  842.  
  843. //
  844. // MessageId: MQ_ERROR_MESSAGE_ALREADY_RECEIVED
  845. //
  846. // MessageText:
  847. //
  848. //  A message that is currently pointed at by the cursor has been removed from
  849. //  the queue by another process or by another call to MQReceiveMessage
  850. //  without the use of this cursor.
  851. //
  852. #define MQ_ERROR_MESSAGE_ALREADY_RECEIVED 0xC00E001DL
  853.  
  854. //
  855. // MessageId: MQ_ERROR_ILLEGAL_FORMATNAME
  856. //
  857. // MessageText:
  858. //
  859. //  The specified format name is invalid.
  860. //
  861. #define MQ_ERROR_ILLEGAL_FORMATNAME      0xC00E001EL
  862.  
  863. //
  864. // MessageId: MQ_ERROR_FORMATNAME_BUFFER_TOO_SMALL
  865. //
  866. // MessageText:
  867. //
  868. //  The format name buffer supplied to the API was too small
  869. //  to hold the format name.
  870. //
  871. #define MQ_ERROR_FORMATNAME_BUFFER_TOO_SMALL 0xC00E001FL
  872.  
  873. //
  874. // MessageId: MQ_ERROR_UNSUPPORTED_FORMATNAME_OPERATION
  875. //
  876. // MessageText:
  877. //
  878. //  The requested operation for the specified format name is not
  879. //  supported (for example:: delete a direct queue format name).
  880. //
  881. #define MQ_ERROR_UNSUPPORTED_FORMATNAME_OPERATION 0xC00E0020L
  882.  
  883. //
  884. // MessageId: MQ_ERROR_ILLEGAL_SECURITY_DESCRIPTOR
  885. //
  886. // MessageText:
  887. //
  888. //  The specified security descriptor is invalid.
  889. //
  890. #define MQ_ERROR_ILLEGAL_SECURITY_DESCRIPTOR 0xC00E0021L
  891.  
  892. //
  893. // MessageId: MQ_ERROR_SENDERID_BUFFER_TOO_SMALL
  894. //
  895. // MessageText:
  896. //
  897. //  The size of the buffer for the user ID property is too small.
  898. //
  899. #define MQ_ERROR_SENDERID_BUFFER_TOO_SMALL 0xC00E0022L
  900.  
  901. //
  902. // MessageId: MQ_ERROR_SECURITY_DESCRIPTOR_TOO_SMALL
  903. //
  904. // MessageText:
  905. //
  906. //  The size of the buffer passed to MQGetQueueSecurity is too small.
  907. //
  908. #define MQ_ERROR_SECURITY_DESCRIPTOR_TOO_SMALL 0xC00E0023L
  909.  
  910. //
  911. // MessageId: MQ_ERROR_CANNOT_IMPERSONATE_CLIENT
  912. //
  913. // MessageText:
  914. //
  915. //  The RPC server can not impersonate the client application, so the security
  916. //  credentials could not be verified.
  917. //
  918. #define MQ_ERROR_CANNOT_IMPERSONATE_CLIENT 0xC00E0024L
  919.  
  920. //
  921. // MessageId: MQ_ERROR_ACCESS_DENIED
  922. //
  923. // MessageText:
  924. //
  925. //  Access is denied.
  926. //
  927. #define MQ_ERROR_ACCESS_DENIED           0xC00E0025L
  928.  
  929. //
  930. // MessageId: MQ_ERROR_PRIVILEGE_NOT_HELD
  931. //
  932. // MessageText:
  933. //
  934. //  The client does not have sufficient security privileges to perform the operation.
  935. //
  936. #define MQ_ERROR_PRIVILEGE_NOT_HELD      0xC00E0026L
  937.  
  938. //
  939. // MessageId: MQ_ERROR_INSUFFICIENT_RESOURCES
  940. //
  941. // MessageText:
  942. //
  943. //  There are insufficient resources to perform the operation.
  944. //
  945. #define MQ_ERROR_INSUFFICIENT_RESOURCES  0xC00E0027L
  946.  
  947. //
  948. // MessageId: MQ_ERROR_USER_BUFFER_TOO_SMALL
  949. //
  950. // MessageText:
  951. //
  952. //  The request failed because the user buffer is too small to hold the returned information.
  953. //
  954. #define MQ_ERROR_USER_BUFFER_TOO_SMALL   0xC00E0028L
  955.  
  956. //
  957. // MessageId: MQ_ERROR_MESSAGE_STORAGE_FAILED
  958. //
  959. // MessageText:
  960. //
  961. //  Unable to store a recoverable or a journal message. The message was not sent.
  962. //
  963. #define MQ_ERROR_MESSAGE_STORAGE_FAILED  0xC00E002AL
  964.  
  965. //
  966. // MessageId: MQ_ERROR_SENDER_CERT_BUFFER_TOO_SMALL
  967. //
  968. // MessageText:
  969. //
  970. //  The buffer for the user certificate property is too small.
  971. //
  972. #define MQ_ERROR_SENDER_CERT_BUFFER_TOO_SMALL 0xC00E002BL
  973.  
  974. //
  975. // MessageId: MQ_ERROR_INVALID_CERTIFICATE
  976. //
  977. // MessageText:
  978. //
  979. //  The user certificate is invalid.
  980. //
  981. #define MQ_ERROR_INVALID_CERTIFICATE     0xC00E002CL
  982.  
  983. //
  984. // MessageId: MQ_ERROR_CORRUPTED_INTERNAL_CERTIFICATE
  985. //
  986. // MessageText:
  987. //
  988. //  The internal Message Queuing certificate is corrupted.
  989. //
  990. #define MQ_ERROR_CORRUPTED_INTERNAL_CERTIFICATE 0xC00E002DL
  991.  
  992.  
  993. //
  994. // MessageId: MQ_ERROR_NO_INTERNAL_USER_CERT
  995. //
  996. // MessageText:
  997. //
  998. //  The internal Message Queuing certificate for the user does not exist.
  999. //
  1000. #define MQ_ERROR_NO_INTERNAL_USER_CERT   0xC00E002FL
  1001.  
  1002. //
  1003. // MessageId: MQ_ERROR_CORRUPTED_SECURITY_DATA
  1004. //
  1005. // MessageText:
  1006. //
  1007. //  A cryptographic function has failed.
  1008. //
  1009. #define MQ_ERROR_CORRUPTED_SECURITY_DATA 0xC00E0030L
  1010.  
  1011. //
  1012. // MessageId: MQ_ERROR_CORRUPTED_PERSONAL_CERT_STORE
  1013. //
  1014. // MessageText:
  1015. //
  1016. //  The personal certificate store is corrupted.
  1017. //
  1018. #define MQ_ERROR_CORRUPTED_PERSONAL_CERT_STORE 0xC00E0031L
  1019.  
  1020. //
  1021. // MessageId: MQ_ERROR_COMPUTER_DOES_NOT_SUPPORT_ENCRYPTION
  1022. //
  1023. // MessageText:
  1024. //
  1025. //  The computer does not support encryption operations.
  1026. //
  1027. #define MQ_ERROR_COMPUTER_DOES_NOT_SUPPORT_ENCRYPTION 0xC00E0033L
  1028.  
  1029. //
  1030. // MessageId: MQ_ERROR_BAD_SECURITY_CONTEXT
  1031. //
  1032. // MessageText:
  1033. //
  1034. //  The security context is invalid.
  1035. //
  1036. #define MQ_ERROR_BAD_SECURITY_CONTEXT    0xC00E0035L
  1037.  
  1038. //
  1039. // MessageId: MQ_ERROR_COULD_NOT_GET_USER_SID
  1040. //
  1041. // MessageText:
  1042. //
  1043. //  Unable to obtain  SID information from the thread token.
  1044. //
  1045. #define MQ_ERROR_COULD_NOT_GET_USER_SID  0xC00E0036L
  1046.  
  1047. //
  1048. // MessageId: MQ_ERROR_COULD_NOT_GET_ACCOUNT_INFO
  1049. //
  1050. // MessageText:
  1051. //
  1052. //  Unable to obtain  account information for the user.
  1053. //
  1054. #define MQ_ERROR_COULD_NOT_GET_ACCOUNT_INFO 0xC00E0037L
  1055.  
  1056. //
  1057. // MessageId: MQ_ERROR_ILLEGAL_MQCOLUMNS
  1058. //
  1059. // MessageText:
  1060. //
  1061. //  The MQCOLUMNS parameter is invalid.
  1062. //
  1063. #define MQ_ERROR_ILLEGAL_MQCOLUMNS       0xC00E0038L
  1064.  
  1065. //
  1066. // MessageId: MQ_ERROR_ILLEGAL_PROPID
  1067. //
  1068. // MessageText:
  1069. //
  1070. //  The PROPID value is invalid.
  1071. //
  1072. #define MQ_ERROR_ILLEGAL_PROPID          0xC00E0039L
  1073.  
  1074. //
  1075. // MessageId: MQ_ERROR_ILLEGAL_RELATION
  1076. //
  1077. // MessageText:
  1078. //
  1079. //  The RELATION value is invalid.
  1080. //
  1081. #define MQ_ERROR_ILLEGAL_RELATION        0xC00E003AL
  1082.  
  1083. //
  1084. // MessageId: MQ_ERROR_ILLEGAL_PROPERTY_SIZE
  1085. //
  1086. // MessageText:
  1087. //
  1088. //  A buffer size property is invalid.
  1089. //
  1090. #define MQ_ERROR_ILLEGAL_PROPERTY_SIZE   0xC00E003BL
  1091.  
  1092. //
  1093. // MessageId: MQ_ERROR_ILLEGAL_RESTRICTION_PROPID
  1094. //
  1095. // MessageText:
  1096. //
  1097. //  The PROPID value for the  MQRESTRICTION parameter is invalid.
  1098. //
  1099. #define MQ_ERROR_ILLEGAL_RESTRICTION_PROPID 0xC00E003CL
  1100.  
  1101. //
  1102. // MessageId: MQ_ERROR_ILLEGAL_MQQUEUEPROPS
  1103. //
  1104. // MessageText:
  1105. //
  1106. //  The  MQQUEUEPROPS parameter  is invalid. This may be because it has a  null value or has zero properties specified.
  1107. //
  1108. #define MQ_ERROR_ILLEGAL_MQQUEUEPROPS    0xC00E003DL
  1109.  
  1110. //
  1111. // MessageId: MQ_ERROR_PROPERTY_NOTALLOWED
  1112. //
  1113. // MessageText:
  1114. //
  1115. //  The PROPID value for the requested operation  is invalid. (for example: PROPID_Q_INSTANCE 
  1116. //  in MQSetQueueProperties)
  1117. //
  1118. #define MQ_ERROR_PROPERTY_NOTALLOWED     0xC00E003EL
  1119.  
  1120. //
  1121. // MessageId: MQ_ERROR_INSUFFICIENT_PROPERTIES
  1122. //
  1123. // MessageText:
  1124. //
  1125. //  Not all the required properties for the operation were specified
  1126. //  for the input parameters.
  1127. //
  1128. #define MQ_ERROR_INSUFFICIENT_PROPERTIES 0xC00E003FL
  1129.  
  1130. //
  1131. // MessageId: MQ_ERROR_MACHINE_EXISTS
  1132. //
  1133. // MessageText:
  1134. //
  1135. //  A computer with the same name already exists in the site. Either the computer object already exists
  1136. //  (for a  Windows NT enterprise), or the MSMQ configuration object already exists for the applicable computer 
  1137. //  object in Active directory (for a Windows 2000 enterprise).
  1138. //
  1139. #define MQ_ERROR_MACHINE_EXISTS          0xC00E0040L
  1140.  
  1141. //
  1142. // MessageId: MQ_ERROR_ILLEGAL_MQQMPROPS
  1143. //
  1144. // MessageText:
  1145. //
  1146. //  The  MQQMPROPS parameter value is invalid. This may be because it has a  null value or has zero properties specified.
  1147. //
  1148. #define MQ_ERROR_ILLEGAL_MQQMPROPS       0xC00E0041L
  1149.  
  1150. //
  1151. // MessageId: MQ_ERROR_DS_IS_FULL
  1152. //
  1153. // MessageText:
  1154. //
  1155. //  This error message is obsolete.
  1156. //
  1157. #define MQ_ERROR_DS_IS_FULL              0xC00E0042L
  1158.  
  1159. //
  1160. // MessageId: MQ_ERROR_DS_ERROR
  1161. //
  1162. // MessageText:
  1163. //
  1164. //  There is an internal Active Directory error.
  1165. //
  1166. #define MQ_ERROR_DS_ERROR                0xC00E0043L
  1167.  
  1168. //
  1169. // MessageId: MQ_ERROR_INVALID_OWNER
  1170. //
  1171. // MessageText:
  1172. //
  1173. //  The object owner is invalid. For example: MQCreateQueue failed because the QM
  1174. //  object is invalid.
  1175. //
  1176. #define MQ_ERROR_INVALID_OWNER           0xC00E0044L
  1177.  
  1178. //
  1179. // MessageId: MQ_ERROR_UNSUPPORTED_ACCESS_MODE
  1180. //
  1181. // MessageText:
  1182. //
  1183. //  The specified access mode is unsupported.
  1184. //
  1185. #define MQ_ERROR_UNSUPPORTED_ACCESS_MODE 0xC00E0045L
  1186.  
  1187. //
  1188. // MessageId: MQ_ERROR_RESULT_BUFFER_TOO_SMALL
  1189. //
  1190. // MessageText:
  1191. //
  1192. //  The specified result buffer is too small.
  1193. //
  1194. #define MQ_ERROR_RESULT_BUFFER_TOO_SMALL 0xC00E0046L
  1195.  
  1196. //
  1197. // MessageId: MQ_ERROR_DELETE_CN_IN_USE
  1198. //
  1199. // MessageText:
  1200. //
  1201. //  The Connected Network cannot be deleted as it is currently in use.
  1202. //
  1203. #define MQ_ERROR_DELETE_CN_IN_USE        0xC00E0048L
  1204.  
  1205. //
  1206. // MessageId: MQ_ERROR_NO_RESPONSE_FROM_OBJECT_SERVER
  1207. //
  1208. // MessageText:
  1209. //
  1210. //  There was no response from the object owner.
  1211. //
  1212. #define MQ_ERROR_NO_RESPONSE_FROM_OBJECT_SERVER 0xC00E0049L
  1213.  
  1214. //
  1215. // MessageId: MQ_ERROR_OBJECT_SERVER_NOT_AVAILABLE
  1216. //
  1217. // MessageText:
  1218. //
  1219. //  The object owner is not available.
  1220. //
  1221. #define MQ_ERROR_OBJECT_SERVER_NOT_AVAILABLE 0xC00E004AL
  1222.  
  1223. //
  1224. // MessageId: MQ_ERROR_QUEUE_NOT_AVAILABLE
  1225. //
  1226. // MessageText:
  1227. //
  1228. //  An error occurred while reading from a queue located on a remote computer.
  1229. //
  1230. #define MQ_ERROR_QUEUE_NOT_AVAILABLE     0xC00E004BL
  1231.  
  1232. //
  1233. // MessageId: MQ_ERROR_DTC_CONNECT
  1234. //
  1235. // MessageText:
  1236. //
  1237. //  Cannot connect to the Distributed Transaction Coordinator.
  1238. //
  1239. #define MQ_ERROR_DTC_CONNECT             0xC00E004CL
  1240.  
  1241. //
  1242. // MessageId: MQ_ERROR_TRANSACTION_IMPORT
  1243. //
  1244. // MessageText:
  1245. //
  1246. //  Cannot import the transaction.
  1247. //
  1248. #define MQ_ERROR_TRANSACTION_IMPORT      0xC00E004EL
  1249.  
  1250. //
  1251. // MessageId: MQ_ERROR_TRANSACTION_USAGE
  1252. //
  1253. // MessageText:
  1254. //
  1255. //  Transaction usage is invalid.
  1256. //
  1257. #define MQ_ERROR_TRANSACTION_USAGE       0xC00E0050L
  1258.  
  1259. //
  1260. // MessageId: MQ_ERROR_TRANSACTION_SEQUENCE
  1261. //
  1262. // MessageText:
  1263. //
  1264. //  The transaction operations sequence is incorrect.
  1265. //
  1266. #define MQ_ERROR_TRANSACTION_SEQUENCE    0xC00E0051L
  1267.  
  1268. //
  1269. // MessageId: MQ_ERROR_MISSING_CONNECTOR_TYPE
  1270. //
  1271. // MessageText:
  1272. //
  1273. //  The Connector Type value is missing and is required  when sending an acknowledgment message or a secure message.
  1274. //
  1275. #define MQ_ERROR_MISSING_CONNECTOR_TYPE  0xC00E0055L
  1276.  
  1277. //
  1278. // MessageId: MQ_ERROR_STALE_HANDLE
  1279. //
  1280. // MessageText:
  1281. //
  1282. //  The Queue Manager service has been restarted. The queue handle should be closed.
  1283. //
  1284. #define MQ_ERROR_STALE_HANDLE            0xC00E0056L
  1285.  
  1286. //
  1287. // MessageId: MQ_ERROR_TRANSACTION_ENLIST
  1288. //
  1289. // MessageText:
  1290. //
  1291. //  Cannot enlist the specified transaction.
  1292. //
  1293. #define MQ_ERROR_TRANSACTION_ENLIST      0xC00E0058L
  1294.  
  1295. //
  1296. // MessageId: MQ_ERROR_QUEUE_DELETED
  1297. //
  1298. // MessageText:
  1299. //
  1300. //  The queue was deleted. Messages cannot be received anymore using this
  1301. //  queue handle. The handle should be closed.
  1302. //
  1303. #define MQ_ERROR_QUEUE_DELETED           0xC00E005AL
  1304.  
  1305. //
  1306. // MessageId: MQ_ERROR_ILLEGAL_CONTEXT
  1307. //
  1308. // MessageText:
  1309. //
  1310. //  The context parameter for MQLocateBegin is invalid.
  1311. //
  1312. #define MQ_ERROR_ILLEGAL_CONTEXT         0xC00E005BL
  1313.  
  1314. //
  1315. // MessageId: MQ_ERROR_ILLEGAL_SORT_PROPID
  1316. //
  1317. // MessageText:
  1318. //
  1319. //  ThePROPID value in MQSORTSET is invalid.
  1320. //
  1321. #define MQ_ERROR_ILLEGAL_SORT_PROPID     0xC00E005CL
  1322.  
  1323. //
  1324. // MessageId: MQ_ERROR_LABEL_TOO_LONG
  1325. //
  1326. // MessageText:
  1327. //
  1328. //  The label is too long. It should be less or equal to MQ_MAX_MSG_LABEL_LEN in length.
  1329. //
  1330. #define MQ_ERROR_LABEL_TOO_LONG          0xC00E005DL
  1331.  
  1332. //
  1333. // MessageId: MQ_ERROR_LABEL_BUFFER_TOO_SMALL
  1334. //
  1335. // MessageText:
  1336. //
  1337. //  The label buffer supplied to the API was too small.
  1338. //
  1339. #define MQ_ERROR_LABEL_BUFFER_TOO_SMALL  0xC00E005EL
  1340.  
  1341. //
  1342. // MessageId: MQ_ERROR_MQIS_SERVER_EMPTY
  1343. //
  1344. // MessageText:
  1345. //
  1346. //  The list (in the registry) of domain controllers that are running Message Queuing is empty.
  1347. //
  1348. #define MQ_ERROR_MQIS_SERVER_EMPTY       0xC00E005FL
  1349.  
  1350. //
  1351. // MessageId: MQ_ERROR_MQIS_READONLY_MODE
  1352. //
  1353. // MessageText:
  1354. //
  1355. //  MQIS database is in read-only mode.
  1356. //
  1357. #define MQ_ERROR_MQIS_READONLY_MODE      0xC00E0060L
  1358.  
  1359. //
  1360. // MessageId: MQ_ERROR_SYMM_KEY_BUFFER_TOO_SMALL
  1361. //
  1362. // MessageText:
  1363. //
  1364. //  The passed buffer for the Symmetric key property is too small.
  1365. //
  1366. #define MQ_ERROR_SYMM_KEY_BUFFER_TOO_SMALL 0xC00E0061L
  1367.  
  1368. //
  1369. // MessageId: MQ_ERROR_SIGNATURE_BUFFER_TOO_SMALL
  1370. //
  1371. // MessageText:
  1372. //
  1373. //  The passed buffer for the Signature property is too small.
  1374. //
  1375. #define MQ_ERROR_SIGNATURE_BUFFER_TOO_SMALL 0xC00E0062L
  1376.  
  1377. //
  1378. // MessageId: MQ_ERROR_PROV_NAME_BUFFER_TOO_SMALL
  1379. //
  1380. // MessageText:
  1381. //
  1382. //  The passed buffer for the Provider Name property is too small.
  1383. //
  1384. #define MQ_ERROR_PROV_NAME_BUFFER_TOO_SMALL 0xC00E0063L
  1385.  
  1386. //
  1387. // MessageId: MQ_ERROR_ILLEGAL_OPERATION
  1388. //
  1389. // MessageText:
  1390. //
  1391. //  The operation is invalid for a foreign message queuing system.
  1392. //
  1393. #define MQ_ERROR_ILLEGAL_OPERATION       0xC00E0064L
  1394.  
  1395. //
  1396. // MessageId: MQ_ERROR_WRITE_NOT_ALLOWED
  1397. //
  1398. // MessageText:
  1399. //
  1400. //  Another MQIS server is being installed, write operations to the
  1401. //  database are not allowed at this stage.
  1402. //
  1403. #define MQ_ERROR_WRITE_NOT_ALLOWED       0xC00E0065L
  1404.  
  1405. //
  1406. // MessageId: MQ_ERROR_WKS_CANT_SERVE_CLIENT
  1407. //
  1408. // MessageText:
  1409. //
  1410. //  Independent clients cannot support dependent clients.
  1411. //
  1412. #define MQ_ERROR_WKS_CANT_SERVE_CLIENT   0xC00E0066L
  1413.  
  1414. //
  1415. //
  1416. // MessageId: MQ_ERROR_DEPEND_WKS_LICENSE_OVERFLOW
  1417. //
  1418. // MessageText:
  1419. //
  1420. //  The number of dependent clients served by the Message Queuing server reached
  1421. //  its upper limit.
  1422. //  
  1423. //
  1424. #define MQ_ERROR_DEPEND_WKS_LICENSE_OVERFLOW 0xC00E0067L
  1425.  
  1426. //
  1427. //
  1428. // MessageId: MQ_CORRUPTED_QUEUE_WAS_DELETED
  1429. //
  1430. // MessageText:
  1431. //
  1432. //  The file %1 for queue %2 in the LQS folder has been deleted because it was corrupted.
  1433. //
  1434. #define MQ_CORRUPTED_QUEUE_WAS_DELETED   0xC00E0068L
  1435.  
  1436. //
  1437. //
  1438. // MessageId: MQ_ERROR_REMOTE_MACHINE_NOT_AVAILABLE
  1439. //
  1440. // MessageText:
  1441. //
  1442. //  The remote computer is not available.
  1443. //
  1444. #define MQ_ERROR_REMOTE_MACHINE_NOT_AVAILABLE 0xC00E0069L
  1445.  
  1446. //
  1447. //
  1448. // MessageId: MQ_ERROR_UNSUPPORTED_OPERATION
  1449. //
  1450. // MessageText:
  1451. //
  1452. //  The operation is not supported for a WORKGROUP installation computer.
  1453. //
  1454. #define MQ_ERROR_UNSUPPORTED_OPERATION   0xC00E006AL
  1455.  
  1456. //
  1457. //
  1458. // MessageId: MQ_ERROR_ENCRYPTION_PROVIDER_NOT_SUPPORTED
  1459. //
  1460. // MessageText:
  1461. //
  1462. //  The Cryptographic Service Provider  %1 is not supported by Message Queuing.
  1463. //
  1464. #define MQ_ERROR_ENCRYPTION_PROVIDER_NOT_SUPPORTED 0xC00E006BL
  1465.  
  1466. //
  1467. //
  1468. // MessageId: MQ_ERROR_CANNOT_SET_CRYPTO_SEC_DESCR
  1469. //
  1470. // MessageText:
  1471. //
  1472. //  Unable to set the security descriptor for the cryptographic keys.
  1473. //
  1474. #define MQ_ERROR_CANNOT_SET_CRYPTO_SEC_DESCR 0xC00E006CL
  1475.  
  1476. //
  1477. //
  1478. // MessageId: MQ_ERROR_CERTIFICATE_NOT_PROVIDED
  1479. //
  1480. // MessageText:
  1481. //
  1482. //  A user attempted  to send an authenticated message without a certificate.
  1483. //
  1484. #define MQ_ERROR_CERTIFICATE_NOT_PROVIDED 0xC00E006DL
  1485.  
  1486. //
  1487. //
  1488. // MessageId: MQ_ERROR_Q_DNS_PROPERTY_NOT_SUPPORTED
  1489. //
  1490. // MessageText:
  1491. //
  1492. //  The column PROPID_Q_PATHNAME_DNS is not supported  for the 
  1493. //  MQLocateBegin API.
  1494. //
  1495. #define MQ_ERROR_Q_DNS_PROPERTY_NOT_SUPPORTED 0xC00E006EL
  1496.  
  1497. //
  1498. //
  1499. // MessageId: MQ_ERROR_CANNOT_CREATE_CERT_STORE
  1500. //
  1501. // MessageText:
  1502. //
  1503. //  Unable to create a certificate store for the internal certificate.
  1504. //
  1505. #define MQ_ERROR_CANNOT_CREATE_CERT_STORE 0xC00E006FL
  1506.  
  1507. //
  1508. //
  1509. // MessageId: MQ_ERROR_CANNOT_OPEN_CERT_STORE
  1510. //
  1511. // MessageText:
  1512. //
  1513. //  Unable to  open the certificates store for the internal certificate.
  1514. //
  1515. #define MQ_ERROR_CANNOT_OPEN_CERT_STORE  0xC00E0070L
  1516.  
  1517. //
  1518. //
  1519. // MessageId: MQ_ERROR_ILLEGAL_ENTERPRISE_OPERATION
  1520. //
  1521. // MessageText:
  1522. //
  1523. //  The operation is invalid for a msmqServices object.
  1524. //
  1525. #define MQ_ERROR_ILLEGAL_ENTERPRISE_OPERATION 0xC00E0071L
  1526.  
  1527. //
  1528. //
  1529. // MessageId: MQ_ERROR_CANNOT_GRANT_ADD_GUID
  1530. //
  1531. // MessageText:
  1532. //
  1533. //  Failed to grant the "Add Guid" permission to current user.
  1534. //
  1535. #define MQ_ERROR_CANNOT_GRANT_ADD_GUID   0xC00E0072L
  1536.  
  1537. //
  1538. //
  1539. // MessageId: MQ_ERROR_CANNOT_LOAD_MSMQOCM
  1540. //
  1541. // MessageText:
  1542. //
  1543. //  Can't load the MSMQOCM.DLL library.
  1544. //
  1545. #define MQ_ERROR_CANNOT_LOAD_MSMQOCM     0xC00E0073L
  1546.  
  1547. //
  1548. //
  1549. // MessageId: MQ_ERROR_NO_ENTRY_POINT_MSMQOCM
  1550. //
  1551. // MessageText:
  1552. //
  1553. //  Cannot locate an entry point in the MSMQOCM.DLL library.
  1554. //
  1555. #define MQ_ERROR_NO_ENTRY_POINT_MSMQOCM  0xC00E0074L
  1556.  
  1557. //
  1558. //
  1559. // MessageId: MQ_ERROR_NO_MSMQ_SERVERS_ON_DC
  1560. //
  1561. // MessageText:
  1562. //
  1563. //  Failed to find Message Queuing servers on domain controllers.
  1564. //
  1565. #define MQ_ERROR_NO_MSMQ_SERVERS_ON_DC   0xC00E0075L
  1566.  
  1567. //
  1568. //
  1569. // MessageId: MQ_ERROR_CANNOT_JOIN_DOMAIN
  1570. //
  1571. // MessageText:
  1572. //
  1573. //  Failed to join MSMQ enterprise on Windows 2000 domain.
  1574. //
  1575. #define MQ_ERROR_CANNOT_JOIN_DOMAIN      0xC00E0076L
  1576.  
  1577. //
  1578. //
  1579. // MessageId: MQ_ERROR_CANNOT_CREATE_ON_GC
  1580. //
  1581. // MessageText:
  1582. //
  1583. //  Failed to create an object on a specified GC server.
  1584. //
  1585. #define MQ_ERROR_CANNOT_CREATE_ON_GC     0xC00E0077L
  1586.  
  1587. //
  1588. //
  1589. // MessageId: MQ_ERROR_GUID_NOT_MATCHING
  1590. //
  1591. // MessageText:
  1592. //
  1593. //  Failed to create msmqConfiguration object with GUID that match machine installation. You must uninstall MSMQ and then reinstall it.
  1594. //
  1595. #define MQ_ERROR_GUID_NOT_MATCHING       0xC00E0078L
  1596.  
  1597. //
  1598. // MessageId: MQ_ERROR_PUBLIC_KEY_NOT_FOUND
  1599. //
  1600. // MessageText:
  1601. //
  1602. //  Unable to find the public key for computer %1
  1603. //
  1604. #define MQ_ERROR_PUBLIC_KEY_NOT_FOUND    0xC00E0079L
  1605.  
  1606. //
  1607. // MessageId: MQ_ERROR_PUBLIC_KEY_DOES_NOT_EXIST
  1608. //
  1609. // MessageText:
  1610. //
  1611. //  The public key for computer %1 does not exist
  1612. //
  1613. #define MQ_ERROR_PUBLIC_KEY_DOES_NOT_EXIST 0xC00E007AL
  1614.  
  1615. //
  1616. //
  1617. // MessageId: MQ_ERROR_ILLEGAL_MQPRIVATEPROPS
  1618. //
  1619. // MessageText:
  1620. //
  1621. //  The  MQPRIVATEPROPS parameter value is invalid. This may be because it has a  null value or has zero properties specified.
  1622. //
  1623. #define MQ_ERROR_ILLEGAL_MQPRIVATEPROPS  0xC00E007BL
  1624.  
  1625. //
  1626. //
  1627. // MessageId: MQ_ERROR_NO_GC_IN_DOMAIN
  1628. //
  1629. // MessageText:
  1630. //
  1631. //  Unable to find Global Catalog servers in the specified domain.
  1632. //
  1633. #define MQ_ERROR_NO_GC_IN_DOMAIN         0xC00E007CL
  1634.  
  1635. //
  1636. //
  1637. // MessageId: MQ_ERROR_NO_MSMQ_SERVERS_ON_GC
  1638. //
  1639. // MessageText:
  1640. //
  1641. //  Failed to find Message Queuing servers on Global Catalog domain controllers.
  1642. //
  1643. #define MQ_ERROR_NO_MSMQ_SERVERS_ON_GC   0xC00E007DL
  1644.  
  1645. //
  1646. //
  1647. // MessageId: MQ_ERROR_CANNOT_GET_DN
  1648. //
  1649. // MessageText:
  1650. //
  1651. //  Failed to retrieve the distinguished name of local computer.
  1652. //
  1653. #define MQ_ERROR_CANNOT_GET_DN           0xC00E007EL
  1654.  
  1655. //
  1656. // Informational
  1657. //
  1658. //
  1659. // MessageId: MQ_INFORMATION_PROPERTY
  1660. //
  1661. // MessageText:
  1662. //
  1663. //  One or more of the passed properties resulted in a warning but the
  1664. //  function completed.
  1665. //
  1666. #define MQ_INFORMATION_PROPERTY          0x400E0001L
  1667.  
  1668. //
  1669. // MessageId: MQ_INFORMATION_ILLEGAL_PROPERTY
  1670. //
  1671. // MessageText:
  1672. //
  1673. //  Invalid property ID.
  1674. //
  1675. #define MQ_INFORMATION_ILLEGAL_PROPERTY  0x400E0002L
  1676.  
  1677. //
  1678. // MessageId: MQ_INFORMATION_PROPERTY_IGNORED
  1679. //
  1680. // MessageText:
  1681. //
  1682. //  The specified property has been  ignored for this operation
  1683. //  (for example:, PROPID_M_SENDERID in SendMessage()).
  1684. //
  1685. #define MQ_INFORMATION_PROPERTY_IGNORED  0x400E0003L
  1686.  
  1687. //
  1688. // MessageId: MQ_INFORMATION_UNSUPPORTED_PROPERTY
  1689. //
  1690. // MessageText:
  1691. //
  1692. //  The specified property is not supported and has been ignored for this operation.
  1693. //
  1694. #define MQ_INFORMATION_UNSUPPORTED_PROPERTY 0x400E0004L
  1695.  
  1696. //
  1697. // MessageId: MQ_INFORMATION_DUPLICATE_PROPERTY
  1698. //
  1699. // MessageText:
  1700. //
  1701. //  The specified property is already in the PROPID array, and has been
  1702. //  ignored for this operation.
  1703. //
  1704. #define MQ_INFORMATION_DUPLICATE_PROPERTY 0x400E0005L
  1705.  
  1706. //
  1707. // MessageId: MQ_INFORMATION_OPERATION_PENDING
  1708. //
  1709. // MessageText:
  1710. //
  1711. //  An asynchronous operation is currently pending.
  1712. //
  1713. #define MQ_INFORMATION_OPERATION_PENDING 0x400E0006L
  1714.  
  1715. //
  1716. // MessageId: MQ_INFORMATION_FORMATNAME_BUFFER_TOO_SMALL
  1717. //
  1718. // MessageText:
  1719. //
  1720. //  The format name buffer supplied to MQCreateQueue was too small
  1721. //  to hold the format name, however the queue was created successfully.
  1722. //
  1723. #define MQ_INFORMATION_FORMATNAME_BUFFER_TOO_SMALL 0x400E0009L
  1724.  
  1725. //
  1726. // MessageId: MQ_INFORMATION_INTERNAL_USER_CERT_EXIST
  1727. //
  1728. // MessageText:
  1729. //
  1730. //  An internal Message Queuing certificate already exists for this user.
  1731. //
  1732. #define MQ_INFORMATION_INTERNAL_USER_CERT_EXIST 0x400E000AL
  1733.  
  1734. //
  1735. // MessageId: MQ_INFORMATION_OWNER_IGNORED
  1736. //
  1737. // MessageText:
  1738. //
  1739. //  Owner of queue was not set while processing this call to MQSetQueueSecurity().
  1740. //
  1741. #define MQ_INFORMATION_OWNER_IGNORED     0x400E000BL
  1742.  
  1743.  
  1744. //+-----------------------------------------
  1745. //
  1746. // Flags for MQRegisterCertificate()
  1747. //
  1748. //+-----------------------------------------
  1749.  
  1750. #define MQCERT_REGISTER_ALWAYS        0x01
  1751. #define MQCERT_REGISTER_IF_NOT_EXIST  0x02
  1752.  
  1753.  
  1754. //********************************************************************
  1755. //  SECURITY Flags (Queue access control)
  1756. //********************************************************************
  1757.  
  1758. #define MQSEC_DELETE_MESSAGE                0x1
  1759. #define MQSEC_PEEK_MESSAGE                  0x2
  1760. #define MQSEC_WRITE_MESSAGE                 0x4
  1761. #define MQSEC_DELETE_JOURNAL_MESSAGE        0x8
  1762. #define MQSEC_SET_QUEUE_PROPERTIES          0x10
  1763. #define MQSEC_GET_QUEUE_PROPERTIES          0x20
  1764. #define MQSEC_DELETE_QUEUE                  DELETE
  1765. #define MQSEC_GET_QUEUE_PERMISSIONS         READ_CONTROL
  1766. #define MQSEC_CHANGE_QUEUE_PERMISSIONS      WRITE_DAC
  1767. #define MQSEC_TAKE_QUEUE_OWNERSHIP          WRITE_OWNER
  1768.  
  1769. #define MQSEC_RECEIVE_MESSAGE               (MQSEC_DELETE_MESSAGE | \
  1770.                                              MQSEC_PEEK_MESSAGE)
  1771.  
  1772. #define MQSEC_RECEIVE_JOURNAL_MESSAGE       (MQSEC_DELETE_JOURNAL_MESSAGE | \
  1773.                                              MQSEC_PEEK_MESSAGE)
  1774.  
  1775. #define MQSEC_QUEUE_GENERIC_READ            (MQSEC_GET_QUEUE_PROPERTIES | \
  1776.                                              MQSEC_GET_QUEUE_PERMISSIONS | \
  1777.                                              MQSEC_RECEIVE_MESSAGE | \
  1778.                                              MQSEC_RECEIVE_JOURNAL_MESSAGE)
  1779.  
  1780. #define MQSEC_QUEUE_GENERIC_WRITE           (MQSEC_GET_QUEUE_PROPERTIES | \
  1781.                                              MQSEC_GET_QUEUE_PERMISSIONS | \
  1782.                                              MQSEC_WRITE_MESSAGE)
  1783.  
  1784. #define MQSEC_QUEUE_GENERIC_EXECUTE         0
  1785.  
  1786. #define MQSEC_QUEUE_GENERIC_ALL             (MQSEC_RECEIVE_MESSAGE | \
  1787.                                              MQSEC_RECEIVE_JOURNAL_MESSAGE | \
  1788.                                              MQSEC_WRITE_MESSAGE | \
  1789.                                              MQSEC_SET_QUEUE_PROPERTIES | \
  1790.                                              MQSEC_GET_QUEUE_PROPERTIES | \
  1791.                                              MQSEC_DELETE_QUEUE | \
  1792.                                              MQSEC_GET_QUEUE_PERMISSIONS | \
  1793.                                              MQSEC_CHANGE_QUEUE_PERMISSIONS | \
  1794.                                              MQSEC_TAKE_QUEUE_OWNERSHIP)
  1795.  
  1796. #ifdef __cplusplus
  1797. extern "C"
  1798. {
  1799. #endif
  1800.  
  1801. //********************************************************************
  1802. //  RECEIVE CALLBACK
  1803. //********************************************************************
  1804.  
  1805. typedef
  1806. VOID
  1807. (APIENTRY *PMQRECEIVECALLBACK)(
  1808.     HRESULT hrStatus,
  1809.     QUEUEHANDLE hSource,
  1810.     DWORD dwTimeout,
  1811.     DWORD dwAction,
  1812.     MQMSGPROPS* pMessageProps,
  1813.     LPOVERLAPPED lpOverlapped,
  1814.     HANDLE hCursor
  1815.     );
  1816.  
  1817.  
  1818. //********************************************************************
  1819. // MSMQ API
  1820. //********************************************************************
  1821.  
  1822. HRESULT
  1823. APIENTRY
  1824. MQCreateQueue(
  1825.     IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
  1826.     IN OUT MQQUEUEPROPS* pQueueProps,
  1827.     OUT LPWSTR lpwcsFormatName,
  1828.     IN OUT LPDWORD lpdwFormatNameLength
  1829.     );
  1830.  
  1831. HRESULT
  1832. APIENTRY
  1833. MQDeleteQueue(
  1834.     IN LPCWSTR lpwcsFormatName
  1835.     );
  1836.  
  1837. HRESULT
  1838. APIENTRY
  1839. MQLocateBegin(
  1840.     IN LPCWSTR lpwcsContext,
  1841.     IN MQRESTRICTION* pRestriction,
  1842.     IN MQCOLUMNSET* pColumns,
  1843.     IN MQSORTSET* pSort,
  1844.     OUT PHANDLE phEnum
  1845.     );
  1846.  
  1847. HRESULT
  1848. APIENTRY
  1849. MQLocateNext(
  1850.     IN HANDLE hEnum,
  1851.     IN OUT DWORD* pcProps,
  1852.     OUT MQPROPVARIANT aPropVar[]
  1853.     );
  1854.  
  1855. HRESULT
  1856. APIENTRY
  1857. MQLocateEnd(
  1858.     IN HANDLE hEnum
  1859.     );
  1860.  
  1861. HRESULT
  1862. APIENTRY
  1863. MQOpenQueue(
  1864.     IN LPCWSTR lpwcsFormatName,
  1865.     IN DWORD dwAccess,
  1866.     IN DWORD dwShareMode,
  1867.     OUT QUEUEHANDLE* phQueue
  1868.     );
  1869.  
  1870. HRESULT
  1871. APIENTRY
  1872. MQSendMessage(
  1873.     IN QUEUEHANDLE hDestinationQueue,
  1874.     IN MQMSGPROPS* pMessageProps,
  1875.     IN ITransaction *pTransaction
  1876.     );
  1877.  
  1878. HRESULT
  1879. APIENTRY
  1880. MQReceiveMessage(
  1881.     IN QUEUEHANDLE hSource,
  1882.     IN DWORD dwTimeout,
  1883.     IN DWORD dwAction,
  1884.     IN OUT MQMSGPROPS* pMessageProps,
  1885.     IN OUT LPOVERLAPPED lpOverlapped,
  1886.     IN PMQRECEIVECALLBACK fnReceiveCallback,
  1887.     IN HANDLE hCursor,
  1888.     IN ITransaction* pTransaction
  1889.     );
  1890.  
  1891. HRESULT
  1892. APIENTRY
  1893. MQCreateCursor(
  1894.     IN QUEUEHANDLE hQueue,
  1895.     OUT PHANDLE phCursor
  1896.     );
  1897.  
  1898. HRESULT
  1899. APIENTRY
  1900. MQCloseCursor(
  1901.     IN HANDLE hCursor
  1902.     );
  1903.  
  1904. HRESULT
  1905. APIENTRY
  1906. MQCloseQueue(
  1907.     IN HANDLE hQueue
  1908.     );
  1909.  
  1910. HRESULT
  1911. APIENTRY
  1912. MQSetQueueProperties(
  1913.     IN LPCWSTR lpwcsFormatName,
  1914.     IN MQQUEUEPROPS* pQueueProps
  1915.     );
  1916.  
  1917. HRESULT
  1918. APIENTRY
  1919. MQGetQueueProperties(
  1920.     IN LPCWSTR lpwcsFormatName,
  1921.     OUT MQQUEUEPROPS* pQueueProps
  1922.     );
  1923.  
  1924. HRESULT
  1925. APIENTRY
  1926. MQGetQueueSecurity(
  1927.     IN LPCWSTR lpwcsFormatName,
  1928.     IN SECURITY_INFORMATION RequestedInformation,
  1929.     OUT PSECURITY_DESCRIPTOR pSecurityDescriptor,
  1930.     IN DWORD nLength,
  1931.     OUT LPDWORD lpnLengthNeeded
  1932.     );
  1933.  
  1934. HRESULT
  1935. APIENTRY
  1936. MQSetQueueSecurity(
  1937.     IN LPCWSTR lpwcsFormatName,
  1938.     IN SECURITY_INFORMATION SecurityInformation,
  1939.     IN PSECURITY_DESCRIPTOR pSecurityDescriptor
  1940.     );
  1941.  
  1942. HRESULT
  1943. APIENTRY
  1944. MQPathNameToFormatName(
  1945.     IN LPCWSTR lpwcsPathName,
  1946.     OUT LPWSTR lpwcsFormatName,
  1947.     IN OUT LPDWORD lpdwFormatNameLength
  1948.     );
  1949.  
  1950. HRESULT
  1951. APIENTRY
  1952. MQHandleToFormatName(
  1953.     IN QUEUEHANDLE hQueue,
  1954.     OUT LPWSTR lpwcsFormatName,
  1955.     IN OUT LPDWORD lpdwFormatNameLength
  1956.     );
  1957.  
  1958. HRESULT
  1959. APIENTRY
  1960. MQInstanceToFormatName(
  1961.     IN GUID* pGuid,
  1962.     OUT LPWSTR lpwcsFormatName,
  1963.     IN OUT LPDWORD lpdwFormatNameLength
  1964.     );
  1965.  
  1966. void
  1967. APIENTRY
  1968. MQFreeMemory(
  1969.     IN PVOID pvMemory
  1970.     );
  1971.  
  1972. HRESULT
  1973. APIENTRY
  1974. MQGetMachineProperties(
  1975.     IN LPCWSTR lpwcsMachineName,
  1976.     IN const GUID* pguidMachineId,
  1977.     IN OUT MQQMPROPS* pQMProps
  1978.     );
  1979.  
  1980. HRESULT
  1981. APIENTRY
  1982. MQGetSecurityContext(
  1983.     IN PVOID lpCertBuffer,
  1984.     IN DWORD dwCertBufferLength,
  1985.     OUT HANDLE* hSecurityContext
  1986.     );
  1987.  
  1988. void
  1989. APIENTRY
  1990. MQFreeSecurityContext(
  1991.     IN HANDLE hSecurityContext
  1992.     );
  1993.  
  1994. HRESULT
  1995. APIENTRY
  1996. MQRegisterCertificate(
  1997.     IN DWORD   dwFlags,
  1998.     IN PVOID   lpCertBuffer,
  1999.     IN DWORD   dwCertBufferLength
  2000.     );
  2001.  
  2002. typedef HRESULT (APIENTRY *MQRegisterCertificate_ROUTINE) (DWORD, PVOID, DWORD);
  2003.  
  2004.  
  2005. HRESULT
  2006. APIENTRY
  2007. MQBeginTransaction(
  2008.     OUT ITransaction **ppTransaction
  2009.     );
  2010.  
  2011. HRESULT
  2012. APIENTRY
  2013. MQGetOverlappedResult(
  2014.     IN LPOVERLAPPED lpOverlapped
  2015.     );
  2016.  
  2017. HRESULT
  2018. APIENTRY
  2019. MQGetPrivateComputerInformation(
  2020.     IN LPCWSTR lpwcsComputerName,
  2021.     IN OUT MQPRIVATEPROPS* pPrivateProps
  2022.     );
  2023.  
  2024.  
  2025.  
  2026. #ifdef __cplusplus
  2027. }
  2028. #endif
  2029.  
  2030. #pragma option pop /*P_O_Pop*/
  2031. #endif // __MQ_H__
  2032.  
  2033.