Share via


MSMQMessage.PrivLevel (Windows Embedded CE 6.0)

1/6/2010

This property specifies privacy level of the message.

Syntax

HRESULT get_PrivLevel( 
  long* plPrivLevel 
);
HRESULT put_PrivLevel( 
  long lPrivLevel
);

Parameters

  • plPrivLevel or lPrivLevel
    Value that indicates the privacy level of the message. The following table shows the possible values.

    Value Description

    MQMSG_PRIV_LEVEL_BODY

    Privacy is enforced. 40-bit end-to-end encryption of the message body is used.

    MQMSG_PRIV_LEVEL_BODY_BASE

    (Introduced in MSMQ 2.0.) Privacy is enforced. 40-bit end-to-end encryption of the message body is used.

    MQMSG_PRIV_LEVEL_BODY_ENHANCED

    (Introduced in MSMQ 2.0.) Privacy is enforced. 128-bit end-to-end encryption of the message body is used.

    MQMSG_PRIV_LEVEL_NONE

    The default. The message is a nonprivate (clear) message.

Return Value

The following table describes the common return values.

Value Description

S_OK

Success

E_INVALIDARG

One or more arguments are invalid

E_NOTIMPL

The function contains no implementation

E_OUTOFMEMORY

Out of memory

Remarks

The MSMQMessage.PrivLevel is used to request encryption by Message Queuing.

The sending application can request encryption by setting the MSMQMessage.PrivLevel property to one of the following:

  • MQMSG_PRIV_LEVEL_BODY
  • MQMSG_PRIV_LEVEL_BODY_BASE
  • MQMSG_PRIV_LEVEL_BODY_ENHANCED

When one of these settings is used, the body of the message is encrypted with the algorithm specified by MSMQMessage.EncryptAlgorithm.

Note

MSMQ 2.0 and MSMQ 3.0 applications can use MQMSG_PRIV_LEVEL_BODY or MQMSG_PRIV_LEVEL_BODY_BASE to request 40-bit encryption.

Ee500301.collapse(en-US,WinEmbedded.60).gifApplication Encrypted Messages

Messages can also be encrypted by applications. In this case the MSMQMessage.PrivLevel property must be set as follows.

  • If your application is encrypting the message body with a 40-bit key, ignore the MSMQMessage.PrivLevel property when sending messages.
  • If your application is encrypting the message body with a 128-bit key, set MSMQMessage.PrivLevel to MQMSG_PRIV_LEVEL_BODY_ENHANCED and include it with the message.

Requirements

Header mqoai.h
Library mqoa.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

MSMQMessage