WSManCloseCommand function (wsman.h)

Deletes a command and frees the resources that are associated with it.

Syntax

void WSManCloseCommand(
  [in, out, optional] WSMAN_COMMAND_HANDLE commandHandle,
                      DWORD                flags,
  [in]                WSMAN_SHELL_ASYNC    *async
);

Parameters

[in, out, optional] commandHandle

Specifies the command handle to be closed. This handle is returned by a WSManRunShellCommand call.

flags

Reserved for future use. Must be set to zero.

[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.

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 and Windows Vista with SP2