📄 mqprops.h
字号:
//
// 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.
//
/*++
Module Name:
mqprops.h
Abstract:
Falcon Properties
--*/
#ifndef __MQPROPS_H
#define __MQPROPS_H
#include <mqdsdef.h>
// begin_mq_h
//********************************************************************
// API FLAGS
//********************************************************************
//
// MQOpenQueue - Access values
//
#define MQ_RECEIVE_ACCESS 0x00000001
#define MQ_SEND_ACCESS 0x00000002
#define MQ_PEEK_ACCESS 0x00000020
// end_mq_h
#define MQ_PURGE_ACCESS 0x00000040
#define MQ_ADMIN_ACCESS 0x00000080
// begin_mq_h
//
// MQOpenQueue - Share values
//
#define MQ_DENY_NONE 0x00000000
#define MQ_DENY_RECEIVE_SHARE 0x00000001
//
// MQReceiveMessage - Action values
//
#define MQ_ACTION_RECEIVE 0x00000000
// end_mq_h
#define MQ_ACTION_PEEK_MASK 0x80000000 // indicate a peek operation
// begin_mq_h
#define MQ_ACTION_PEEK_CURRENT 0x80000000
#define MQ_ACTION_PEEK_NEXT 0x80000001
// end_mq_h
#define MQ_ACTION_PEEK_PREV 0x80000002 // NOTE: Not supported for product 1
// begin_mq_h
// end_mq_h
//
// length of a constant string
//
#define STRLEN(x) (sizeof(x)/sizeof((x)[0])-1)
#define PRIVATE_QUEUE_PATH_INDICATIOR L"PRIVATE$\\"
#define PRIVATE_QUEUE_PATH_INDICATIOR_LENGTH \
STRLEN(PRIVATE_QUEUE_PATH_INDICATIOR)
#define PN_DELIMITER_C L'\\'
#define PN_LOCAL_MACHINE_C L'.'
#define ORDER_QUEUE_PRIVATE_INDEX 4
// begin_mq_h
//
// MQSendMessage, MQReceiveMessage: special cases for the transaction parameter
//
#define MQ_NO_TRANSACTION NULL
#define MQ_MTS_TRANSACTION (ITransaction *)1
#define MQ_XA_TRANSACTION (ITransaction *)2
#define MQ_SINGLE_MESSAGE (ITransaction *)3
//********************************************************************
// PRIORITY LIMITS
//********************************************************************
//
// Message priorities
//
#define MQ_MIN_PRIORITY 0 // Minimal message priority
#define MQ_MAX_PRIORITY 7 // Maximal message priority
//********************************************************************
// MESSAGE PROPERTIES
//********************************************************************
#define PROPID_M_BASE 0
#define PROPID_M_CLASS (PROPID_M_BASE + 1) /* VT_UI2 */
#define PROPID_M_MSGID (PROPID_M_BASE + 2) /* VT_UI1|VT_VECTOR */
#define PROPID_M_CORRELATIONID (PROPID_M_BASE + 3) /* VT_UI1|VT_VECTOR */
#define PROPID_M_PRIORITY (PROPID_M_BASE + 4) /* VT_UI1 */
#define PROPID_M_DELIVERY (PROPID_M_BASE + 5) /* VT_UI1 */
#define PROPID_M_ACKNOWLEDGE (PROPID_M_BASE + 6) /* VT_UI1 */
#define PROPID_M_JOURNAL (PROPID_M_BASE + 7) /* VT_UI1 */
#define PROPID_M_APPSPECIFIC (PROPID_M_BASE + 8) /* VT_UI4 */
#define PROPID_M_BODY (PROPID_M_BASE + 9) /* VT_UI1|VT_VECTOR */
#define PROPID_M_BODY_SIZE (PROPID_M_BASE + 10) /* VT_UI4 */
#define PROPID_M_LABEL (PROPID_M_BASE + 11) /* VT_LPWSTR */
#define PROPID_M_LABEL_LEN (PROPID_M_BASE + 12) /* VT_UI4 */
#define PROPID_M_TIME_TO_REACH_QUEUE (PROPID_M_BASE + 13) /* VT_UI4 */
#define PROPID_M_TIME_TO_BE_RECEIVED (PROPID_M_BASE + 14) /* VT_UI4 */
#define PROPID_M_RESP_QUEUE (PROPID_M_BASE + 15) /* VT_LPWSTR */
#define PROPID_M_RESP_QUEUE_LEN (PROPID_M_BASE + 16) /* VT_UI4 */
#define PROPID_M_ADMIN_QUEUE (PROPID_M_BASE + 17) /* VT_LPWSTR */
#define PROPID_M_ADMIN_QUEUE_LEN (PROPID_M_BASE + 18) /* VT_UI4 */
#define PROPID_M_VERSION (PROPID_M_BASE + 19) /* VT_UI4 */
#define PROPID_M_SENDERID (PROPID_M_BASE + 20) /* VT_UI1|VT_VECTOR */
#define PROPID_M_SENDERID_LEN (PROPID_M_BASE + 21) /* VT_UI4 */
#define PROPID_M_SENDERID_TYPE (PROPID_M_BASE + 22) /* VT_UI4 */
#define PROPID_M_PRIV_LEVEL (PROPID_M_BASE + 23) /* VT_UI4 */
#define PROPID_M_AUTH_LEVEL (PROPID_M_BASE + 24) /* VT_UI4 */
#define PROPID_M_AUTHENTICATED (PROPID_M_BASE + 25) /* VT_UI1 */
#define PROPID_M_HASH_ALG (PROPID_M_BASE + 26) /* VT_UI4 */
#define PROPID_M_ENCRYPTION_ALG (PROPID_M_BASE + 27) /* VT_UI4 */
#define PROPID_M_SENDER_CERT (PROPID_M_BASE + 28) /* VT_UI1|VT_VECTOR */
#define PROPID_M_SENDER_CERT_LEN (PROPID_M_BASE + 29) /* VT_UI4 */
#define PROPID_M_SRC_MACHINE_ID (PROPID_M_BASE + 30) /* VT_CLSID */
#define PROPID_M_SENTTIME (PROPID_M_BASE + 31) /* VT_UI4 */
#define PROPID_M_ARRIVEDTIME (PROPID_M_BASE + 32) /* VT_UI4 */
#define PROPID_M_DEST_QUEUE (PROPID_M_BASE + 33) /* VT_LPWSTR */
#define PROPID_M_DEST_QUEUE_LEN (PROPID_M_BASE + 34) /* VT_UI4 */
#define PROPID_M_EXTENSION (PROPID_M_BASE + 35) /* VT_UI1|VT_VECTOR */
#define PROPID_M_EXTENSION_LEN (PROPID_M_BASE + 36) /* VT_UI4 */
#define PROPID_M_SECURITY_CONTEXT (PROPID_M_BASE + 37) /* VT_UI4 */
#define PROPID_M_CONNECTOR_TYPE (PROPID_M_BASE + 38) /* VT_CLSID */
#define PROPID_M_XACT_STATUS_QUEUE (PROPID_M_BASE + 39) /* VT_LPWSTR */
#define PROPID_M_XACT_STATUS_QUEUE_LEN (PROPID_M_BASE + 40) /* VT_UI4 */
#define PROPID_M_TRACE (PROPID_M_BASE + 41) /* VT_UI1 */
#define PROPID_M_BODY_TYPE (PROPID_M_BASE + 42) /* VT_UI4 */
#define PROPID_M_DEST_SYMM_KEY (PROPID_M_BASE + 43) /* VT_UI1|VT_VECTOR */
#define PROPID_M_DEST_SYMM_KEY_LEN (PROPID_M_BASE + 44) /* VT_UI4 */
#define PROPID_M_SIGNATURE (PROPID_M_BASE + 45) /* VT_UI1|VT_VECTOR */
#define PROPID_M_SIGNATURE_LEN (PROPID_M_BASE + 46) /* VT_UI4 */
#define PROPID_M_PROV_TYPE (PROPID_M_BASE + 47) /* VT_UI4 */
#define PROPID_M_PROV_NAME (PROPID_M_BASE + 48) /* VT_LPWSTR */
#define PROPID_M_PROV_NAME_LEN (PROPID_M_BASE + 49) /* VT_UI4 */
#define PROPID_M_FIRST_IN_XACT (PROPID_M_BASE + 50) /* VT_UI1 */
#define PROPID_M_LAST_IN_XACT (PROPID_M_BASE + 51) /* VT_UI1 */
#define PROPID_M_XACTID (PROPID_M_BASE + 52) /* VT_UI1|VT_VECTOR */
#define PROPID_M_AUTHENTICATED_EX (PROPID_M_BASE + 53) /* VT_UI1 */
#define PROPID_M_RESP_FORMAT_NAME (PROPID_M_BASE + 54) /* VT_LPWSTR */
#define PROPID_M_RESP_FORMAT_NAME_LEN (PROPID_M_BASE + 55) /* VT_UI4 */
#define PROPID_M_DEST_FORMAT_NAME (PROPID_M_BASE + 58) /* VT_LPWSTR */
#define PROPID_M_DEST_FORMAT_NAME_LEN (PROPID_M_BASE + 59) /* VT_UI4 */
#define PROPID_M_LOOKUPID (PROPID_M_BASE + 60) /* VT_UI8 */
#define PROPID_M_SOAP_ENVELOPE (PROPID_M_BASE + 61) /* VT_LPWSTR */
#define PROPID_M_SOAP_ENVELOPE_LEN (PROPID_M_BASE + 62) /* VT_UI4 */
#define PROPID_M_COMPOUND_MESSAGE (PROPID_M_BASE + 63) /* VT_UI1|VT_VECTOR */
#define PROPID_M_COMPOUND_MESSAGE_SIZE (PROPID_M_BASE + 64) /* VT_UI4 */
#define PROPID_M_SOAP_HEADER (PROPID_M_BASE + 65) /* VT_LPWSTR */
#define PROPID_M_SOAP_BODY (PROPID_M_BASE + 66) /* VT_LPWSTR */
#define PROPID_M_BASE_WINCE 1000
#define PROPID_M_SOAP_FWD_VIA (PROPID_M_BASE_WINCE + 1) /* VT_VECTOR | VT_VARIANT*/
#define PROPID_M_SOAP_FWD_VIA_SIZE (PROPID_M_BASE_WINCE + 2) /* VT_UI4 */
#define PROPID_M_SOAP_REV_VIA (PROPID_M_BASE_WINCE + 3) /* VT_VECTOR | VT_VARIANT*/
#define PROPID_M_SOAP_REV_VIA_SIZE (PROPID_M_BASE_WINCE + 4) /* VT_UI4 */
#define PROPID_M_SOAP_FROM (PROPID_M_BASE_WINCE + 5) /* VT_LPWSTR */
#define PROPID_M_SOAP_FROM_LEN (PROPID_M_BASE_WINCE + 6) /* VT_LPWSTR */
#define PROPID_M_SOAP_RELATES_TO (PROPID_M_BASE_WINCE + 7) /* VT_LPWSTR */
#define PROPID_M_SOAP_RELATES_TO_LEN (PROPID_M_BASE_WINCE + 8) /* VT_LPWSTR */
// end_mq_h
#if PROPID_M_BASE != 0
#error PROPID_M_BASE != 0
#endif
#define LAST_M_PROPID PROPID_M_SOAP_BODY
// begin_mq_h
//
// Message Property Size
//
#define PROPID_M_MSGID_SIZE 20
#define PROPID_M_CORRELATIONID_SIZE 20
//********************************************************************
// MESSAGE CLASS VALUES
//********************************************************************
//
// Message Class Values are 16 bits layed out as follows:
//
// 1 1 1 1 1 1
// 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// +-+-+-----------+---------------+
// |S|R| Reserved | Class code |
// +-+-+-----------+---------------+
//
// where
//
// S - is the severity flag
// 0 - Normal Message/Positive Acknowledgment (ACK)
// 1 - Negative Acknowledgment (NACK)
//
// R - is the receive flag
// 0 - Arrival ACK/NACK
// 1 - Receive ACK/NACK
//
#define MQCLASS_CODE(s, r, code) ((USHORT)(((s) << 15) | ((r) << 14) | (code)))
#define MQCLASS_NACK(c) ((c) & 0x8000)
#define MQCLASS_RECEIVE(c) ((c) & 0x4000)
// end_mq_h
#define MQCLASS_POS_ARRIVAL(c) (((c) & 0xC000) == 0x0000)
#define MQCLASS_POS_RECEIVE(c) (((c) & 0xC000) == 0x4000)
#define MQCLASS_NEG_ARRIVAL(c) (((c) & 0xC000) == 0x8000)
#define MQCLASS_NEG_RECEIVE(c) (((c) & 0xC000) == 0xC000)
#define MQCLASS_IS_VALID(c) (!((c) & ~0xC0FF))
// begin_mq_h
//
// Normal message
//
#define MQMSG_CLASS_NORMAL MQCLASS_CODE(0, 0, 0x00)
//
// Report message
//
#define MQMSG_CLASS_REPORT MQCLASS_CODE(0, 0, 0x01)
//
// Arrival acknowledgment. The message has reached the destination queue
//
#define MQMSG_CLASS_ACK_REACH_QUEUE MQCLASS_CODE(0, 0, 0x02)
// end_mq_h
//
// Order acknoledgment used internally by falcon
//
#define MQMSG_CLASS_ORDER_ACK MQCLASS_CODE(0, 0, 0xff)
// begin_mq_h
//
// Receive acknowledgment. The message has been received by the application
//
#define MQMSG_CLASS_ACK_RECEIVE MQCLASS_CODE(0, 1, 0x00)
//-----------------------------------------------
//
// Negative arrival acknowledgments
//
//
// Destination queue can not be reached, the queue may have been deleted
//
#define MQMSG_CLASS_NACK_BAD_DST_Q MQCLASS_CODE(1, 0, 0x00)
//
// The message was purged before reaching the destination queue
//
#define MQMSG_CLASS_NACK_PURGED MQCLASS_CODE(1, 0, 0x01)
//
// Time to reach queue has expired
//
#define MQMSG_CLASS_NACK_REACH_QUEUE_TIMEOUT MQCLASS_CODE(1, 0, 0x02)
//
// The message has exceeded the queue quota
//
#define MQMSG_CLASS_NACK_Q_EXCEED_QUOTA MQCLASS_CODE(1, 0, 0x03)
//
// The sender does not have send access rights on the queue.
//
#define MQMSG_CLASS_NACK_ACCESS_DENIED MQCLASS_CODE(1, 0, 0x04)
//
// The message hop count exceeded
//
#define MQMSG_CLASS_NACK_HOP_COUNT_EXCEEDED MQCLASS_CODE(1, 0, 0x05)
//
// The message signature is bad. The message could not be authenticated.
//
#define MQMSG_CLASS_NACK_BAD_SIGNATURE MQCLASS_CODE(1, 0, 0x06)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -