WSMAN_STREAM_ELEMENT Structure
[This documentation is preliminary and is subject to change.]
The WSMAN_STREAM_ELEMENT structure describes a stream element. It is used by the WSManSendShellInput and WSManReceiveShellOutput functions. The WSMAN_STREAM_ELEMENT structure encapsulates a fragment of data associated with a particular stream id like STDIN, STDOUT, or STDERR. The format of the data is shell or command specific. The command or shell might return ANSI data, UNICODE data, or encodings that are specific to the command executed. This might require input streams in either or both forms. For example, some commands within the Windows Cmd.exe shell may return ANSI data encoded using the console code page.
typedef struct _WSMAN_STREAM_ELEMENT {
WSMAN_STREAM_ID_INDEX streamIdIndex;
DWORD dataLength;
BYTE* data;
DWORD dataLengthUsed;
BOOL endOfStream;
} WSMAN_STREAM_ELEMENT;
Members
streamIdIndex
The index of the stream for which the data is defined. Typically, the stream is STDIN, STDOUT, or STDERR. It is specified when creating the shell (inputStreamSet and outputStreamSet arrays). If used with the WSManSendShellInput function, the streamIdIndex is the index from within inputStreamSet array and if used with the WSManReceiveShellOutput function, the streamIdIndex is the index within the outputStreamSet array.dataLength
The length, in bytes, of byte buffer data.data
The data associated with the stream fragment. The data can be stream text, binary content, or XML. It cannot be NULL. When using with either the WSManReceiveShellOutput or WSManSendShellInput function, the calling client must allocate this buffer. When used with the WSManReceiveShellOutput function, it receives the output stream data associated with the streamId stream. When used with the WSManSendShellInput function, it contains the input stream data to be sent to the streamId stream.dataLengthUsed
The effective length, in bytes, of the data sent by the WSManSendShellInput function or received by the WSManReceiveShellOutput function.endOfStream
A value that indicates whether the stream data has been exhausted. If used with the WSManSendShellInput function, the client must explicitly specify this field. If used with the WSManReceiveShellOutput function, the value is returned by the function.
Requirements
Client |
Requires Windows XP SP2 + WinRM v1.1. |
Server |
Requires Windows Server 2003 SP1 + WinRM v1.1, Windows Server 2003 SP2 + WinRM v1.1 or Windows Server 2003 R2 + WinRM v1.1. |
Header |
Declared in Wsman.h. |
Send comments about this topic to Microsoft
Build date: 10/1/2007