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.
Syntax
HRESULT DeleteInstance(
ParsedObjectPath *pParsedObjectPath,
long lFlags,
MethodContext *pContext
);
Parameters
pParsedObjectPath
TBD
lFlags
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:
- WBEM_FLAG_RETURN_IMMEDIATELY
pContext
TBD
Return value
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.
Remarks
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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | provider.h (include FwCommon.h) |
Library | FrameDyn.lib |
DLL | FrameDynOS.dll; FrameDyn.dll |