Expand Minimize

WsCreateMessageForChannel function

Creates a message for use with a specified channel.

Syntax


HRESULT WINAPI  WsCreateMessageForChannel(
  _In_      WS_CHANNEL* channel,
  const WS_MESSAGE_PROPERTY* properties,
  _In_      ULONG propertyCount,
  WS_MESSAGE** message,
  _In_opt_  WS_ERROR* error
);

Parameters

channel [in]

Pointer to a WS_CHANNEL structure representing the channel for the message.

properties

An array of optional properties for the message. See WS_MESSAGE_PROPERTY.

The value of this parameter may be NULL, in which case, the propertyCount parameter must be 0 (zero).

propertyCount [in]

The number of properties in the properties array.

message

On success, a pointer that receives the address of the WS_MESSAGE structure representing the new message.

When you no longer need this structure, you must free it by calling WsFreeMessage.

error [in, optional]

Pointer to a WS_ERROR structure that receives additional error information if the function fails.

Return value

If the function succeeds, it returns NO_ERROR; otherwise, it returns an HRESULT error code.

Return codeDescription
E_OUTOFMEMORY

Insufficient memory to complete the operation.

E_INVALIDARG

One or more arguments are invalid.

Other Errors

This function may return other errors not listed above.

 

Remarks

In contrast to the more general WsCreateMessage function, WsCreateMessageForChannel ensures that the message version used is appropriate for the channel.

Requirements

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2 [desktop apps | Windows Store apps]

Header

WebServices.h

Library

WebServices.lib

DLL

WebServices.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.