次の方法で共有


PROPID_M_AUTH_LEVEL (Compact 2013)

3/26/2014

This property specifies if the message needs to be authenticated.

  • Type Indicator
    VT_UI4
  • PROPVARIANT Field
    ulVal
  • Property Values
    Set this property to only the following value.

    Value

    Description

    MQMSG_AUTH_LEVEL_NONE

    The default. The message is not signed. MSMQ does not need to authenticate the message when it reaches the queue.

Remarks

The PROPID_M_AUTH_LEVEL property is only used by the sending application.

To set the authentication level of a message, specify PROP_M_AUTH_LEVEL in the MQMSGPROPS structure and call MQSendMessage.

When the authentication level of a message is set to MQMSG_AUTH_LEVEL_NONE and the authentication level of the target queue is set to force authentication, the message is rejected when it reaches the queue.

Examples

This example shows how PROPID_M_AUTH_LEVEL is specified in the MQMSGPROPS structure.

aMsgPropId[i] = PROPID_M_AUTH_LEVEL;    // Property ID
aMsgPropVar[i].vt = VT_UI4;             // Type indicator
aMsgPropVar[i].ulVal = MQMSG_AUTH_LEVEL_NONE;
i++;

Note

OS versions prior to 2.12 require the MSMQ add-on pack.

Requirements

Header

mq.h

See Also

Reference

MSMQ Properties
MQSendMessage
MQMSGPROPS