Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WS_MESSAGE_STATE enumeration

The different states that a message can be in.

Syntax


enum WS_MESSAGE_STATE {  WS_MESSAGE_STATE_EMPTY, 
  WS_MESSAGE_STATE_INITIALIZED, 
  WS_MESSAGE_STATE_READING, 
  WS_MESSAGE_STATE_WRITING, 
  WS_MESSAGE_STATE_DONE 

};

Constants

WS_MESSAGE_STATE_EMPTY

The initial state after a message has been created. In this state, there is no content in the message, and neither the header nor the body can be accessed.

WS_MESSAGE_STATE_INITIALIZED

The message headers have been initialized, and can be accessed, but the body cannot be accessed. This state is used to build up all the headers prior to writing/sending them.

WS_MESSAGE_STATE_READING

The body of the message is being read, for example when a message is received. In this state, the headers can be accessed, and the body can be read (see WsReadBody or WS_MESSAGE_PROPERTY_BODY_READER).

WS_MESSAGE_STATE_WRITING

The body of the message is being written, for example when a message is being sent. In this state, the headers can be accessed, and the body can be written (see WsWriteBody or WS_MESSAGE_PROPERTY_BODY_WRITER).

WS_MESSAGE_STATE_DONE

The message body has been read or written (the end of the body has been read or written). The headers can still be accessed.

Remarks

A message object transitions through a set of states as it is being received or sent (or read or written).

The following are the state transitions while writing or sending:

Dd401961.MessageSendStates(en-us,VS.85).png

The following are the state transitions while reading or receiving:

Dd401961.MessageReceiveStates(en-us,VS.85).png

Note that in the above diagrams, only valid transitions are shown.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

WebServices.h

 

 

Community Additions

Show:
© 2017 Microsoft