MQMailParseBody

The MQMailParseBody function parses the body of an MSMQ mail message and places the information in a mail data structure.

STDAPI MQMailParseBody(
  ULONG cbBuffer,             
  LPBYTE FAR *pbBuffer,       
  LPMQMailEMail FAR *ppEMail  
);
 

Parameters

cbBuffer
[in] Buffer size.
pbBuffer
[in] Pointer to the buffer containing the body of the MSMQ mail message.
ppEMail
[out] Pointer to the address of the newly allocated MQMailEMail structure that contains the copied mail information.

Return Values

S_OK
Indicates success.
E_INVALIDARG
Invalid arguments.
Other system errors
Use the FAILED(hr) macro to test for errors.

Remarks

The MQMailParseBody function is used to convert the body of an MSMQ mail message so its information can be used by an MSMQ application.

The application must free the memory allocated for the MQMailEMail object once the parsed information is used. To free the memory, call MQMailFreeMemory.

MSMQ mail messages can be received from another MSMQ application or either of the two MSMQ Mail services: MSMQ MAPI Transport Provider or the MSMQ Exchange Connector.

QuickInfo

  Windows NT: Requires version 4.0 SP3 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in mqmail.h.
  Import Library: Use mqmail.lib.
  Unicode: Defined only as Unicode.

See Also

MQMailEMail, MQMailFreeMemory