Skip to main content
WSManCloseCommand function

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

Syntax


void WINAPI WSManCloseCommand(
  _Inout_opt_  HANDLE commandHandle,
  DWORD flags,
  _In_         WSMAN_SHELL_ASYNC *async
);

Parameters

commandHandle [in, out, optional]

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.

async [in]

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

This function does not return a value.

Requirements

Minimum supported client

Windows 7

Minimum supported server

Windows Server 2008 R2

Redistributable

Windows Management Framework on Windows Server 2008 with SP2, Windows Server 2003 with SP2, Windows Vista with SP1, and Windows Vista with SP2

Header

Wsman.h

Library

WsmSvc.lib

DLL

WsmSvc.dll