Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This property specifies the type of acknowledgment messages that Message Queuing posts in the administration queue and when acknowledgments are returned to the sending application.

Syntax

HRESULT get_Ack( 
  long* 
plAck 
);
HRESULT put_Ack( 
  long* 
lAck 
);

Parameters

plAckor lAck

Type of acknowledgment message that Message Queuing posts in the administration queue. The following table shows the possible values.

Value Description

MQMSG_ACKNOWLEDGMENT_FULL_REACH_QUEUE

Posts positive and negative acknowledgments depending on whether the message reaches the queue. This can happen when the time-to-reach-queue timer expires or when a message cannot be authenticated.

MQMSG_ACKNOWLEDGMENT_FULL_RECEIVE

Posts a positive or negative acknowledgment depending on whether the message is retrieved from the queue before its time-to-be-received timer expires.

MQMSG_ACKNOWLEDGMENT_NACK_REACH_QUEUE

Posts a negative acknowledgment when the message cannot reach the queue. This can happen when the time-to-reach-queue timer expires or when a message cannot be authenticated.

MQMSG_ACKNOWLEDGMENT_NACK_RECEIVE

Posts a negative acknowledgment when an error occurs and the message cannot be retrieved from the queue before its time-to-be-received timer expires.

MQMSG_ACKNOWLEDGMENT_NONE

The default. No acknowledgment messages (positive or negative) are posted.

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

To receive a positive acknowledgment message when a message reaches its destination and when the message is retrieved, the following full-acknowledgment settings must be combined using the OR operator:

  • MQMSG_FULL_REACH_QUEUE

  • MQMSG_FULL_RECEIVE

An administrative queue specified by the message sends positive and negative acknowledgments.

Acknowledgment messages contain some of the information found in the original message; however, each acknowledgment message has its own message identifier and class. The message identifier, MSMQMessage.Id, identifies the acknowledgment in the same way it identifies each message sent by a Message Queuing application.

To request acknowledgment messages, the sending application must set Ackand MSMQMessage.AdminQueueInfowhen sending messages.

To find out if acknowledgment messages were requested, the receiving application can examine Ack and MSMQMessage.AdminQueueInfowhen it reads the messages in the queue.

Equivalent Function Property

When using function calls, the acknowledgment level of the message can be set and retrieved using the PROPID_M_ACKNOWLEDGEmessage property.

Requirements

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

See Also