Provider::DeleteInstance(ParsedObjectPath,long,MethodContext) method (provider.h)
[The Provider class is part of the WMI Provider Framework which is now considered in final state, and no further development, enhancements, or updates will be available for non-security related issues affecting these libraries. The MI APIs should be used for all new development.]
The DeleteInstance method is called by WMI to delete an instance.
HRESULT DeleteInstance( ParsedObjectPath *pParsedObjectPath, long lFlags, MethodContext *pContext );
Bitmask of flags with information about the delete operation. This is the value specified by the client in the IWbemServices::DeleteInstance function.
The following flag is handled by (and filtered out) by WMI:
The default framework provider implementation of this method returns WBEM_E_PROVIDER_NOT_CAPABLE to the calling function. The IWbemServices::DeleteInstance function lists the most common return values, although you can choose to return any COM return code.
WMI invokes DeleteInstance when a client calls IWbemServices::DeleteInstance against a class. Therefore, you must implement DeleteInstance if your framework provider supports deleting instances. The following list describes a common implementation of DeleteInstance:
- Determine which instance the client requested by reading the key properties with one of the Get methods for CInstance, such as CInstance::GetCHString.
- Delete the instance.
|Minimum supported client||Windows Vista|
|Minimum supported server||Windows Server 2008|
|Header||provider.h (include FwCommon.h)|