Expand Minimize

MI_Session_DeleteInstance function

Deletes an instance on the server represented by the session.

Syntax


 MI_INLINE void MI_Session_DeleteInstance(
  _In_      MI_Session *session,
  MI_Uint32 flags,
  _In_opt_  MI_OperationOptions *options,
  _In_opt_z_ const MI_Char *namespaceName,
  _In_      const MI_Instance *inboundInstance,
  _In_opt_  MI_OperationCallbacks *callbacks,
  _Out_     MI_Operation *operation
);

Parameters

session [in]

Session handle returned from MI_Application_NewSession.

flags

Must be 0.

options [in, optional]

Optional MI_OperationOptions value that specifies options such as timeouts and how to control the CIM semantics. Specify NULL if no operation options are to be sent.

namespaceName

An optional, null-terminated string that represents the namespace name to carry out the operation. If none is specified, the server will pick a default. The namespace cannot include a computer name. It can only be in the form of a namespace name separated by a slash mark character (/). For example, the following would be a valid namespaceName value: root/cimv2.

inboundInstance [in]

MI_Instance that represents the class name and key of the instance to be deleted on the server.

callbacks [in, optional]

Optional MI_OperationCallbacks structure that defines the operational callbacks to receive the instance result and CIM semantics. A callback value is required to carry out the operation asynchronously. If NULL is specified, then the client must call the MI_Operation_GetInstance function to retrieve the results.

operation [out]

Operation handle that must be closed with a call to MI_Operation_Close once the operation is finished and all results have been received. The handle can be used to cancel the operation with a call to MI_Operation_Cancel.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Redistributable

Windows Management Framework 3.0 on Windows Server 2008 R2 with SP1, Windows 7 with SP1, and Windows Server 2008 with SP2

Header

Mi.h

See also

MI_Application_NewSession
MI_Operation_GetInstance
MI_Operation_Cancel
MI_Operation_Close

 

 

Show:
© 2014 Microsoft