WSManReceiveShellOutput function (wsman.h)
Retrieves output from a running command or from the shell.
Syntax
void WSManReceiveShellOutput(
[in, out] WSMAN_SHELL_HANDLE shell,
[in, optional] WSMAN_COMMAND_HANDLE command,
DWORD flags,
[in, optional] WSMAN_STREAM_ID_SET *desiredStreamSet,
[in] WSMAN_SHELL_ASYNC *async,
[out] WSMAN_OPERATION_HANDLE *receiveOperation
);
Parameters
[in, out] shell
Specifies the shell handle returned by a WSManCreateShell call. This parameter cannot be NULL.
[in, optional] command
Specifies the command handle returned by a WSManRunShellCommand call.
flags
Reserved for future use. Must be set to zero.
[in, optional] desiredStreamSet
Specifies the requested output from a particular stream or a list of streams.
[in] async
Defines an asynchronous structure. The asynchronous structure contains an optional user context and a mandatory callback function. See the WSMAN_SHELL_ASYNC structure for more information. This parameter cannot be NULL and should be closed by calling the WSManCloseOperation method.
[out] receiveOperation
Defines the operation handle for the receive operation. This handle is returned from a successful call of the function and can be used to asynchronously cancel the receive operation. This handle should be closed by calling the WSManCloseOperation method. This parameter cannot be NULL.
Return value
None
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 |
Minimum supported server | Windows Server 2008 R2 |
Target Platform | Windows |
Header | wsman.h |
Library | WsmSvc.lib |
DLL | WsmSvc.dll |
Redistributable | Windows Management Framework on Windows Server 2008 with SP2, Windows Vista with SP1, and Windows Vista with SP2 |