नोट
इस पेज तक पहुँच के लिए प्रमाणन की आवश्यकता होती है. आप साइन इन करने या निर्देशिकाओं को बदलने का प्रयास कर सकते हैं.
इस पेज तक पहुँच के लिए प्रमाणन की आवश्यकता होती है. आप निर्देशिकाओं को बदलने का प्रयास कर सकते हैं.
[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 PutInstance method updates an instance.
Syntax
HRESULT PutInstance(
IWbemClassObject *pInst,
long lFlags,
MethodContext *pContext
);
Parameters
pInst
TBD
lFlags
Bitmask of flags with information about the update operation. This is the value specified by the client in the IWbemServices::PutInstance method.
The following flag is handled by (and filtered out) by WMI:
- WBEM_FLAG_RETURN_IMMEDIATELY
- WBEM_FLAG_CREATE_ONLY
- WBEM_FLAG_CREATE_OR_UPDATE
- WBEM_FLAG_UPDATE_ONLY
pContext
TBD
Return value
The default framework provider implementation of this method returns WBEM_E_PROVIDER_NOT_CAPABLE to the calling method. The IWbemServices::PutInstance method lists the most common return values, although you can choose to return any COM return code.
Remarks
WMI invokes PutInstance when a client calls IWbemServices::PutInstance against your class. You must implement PutInstance if your framework provider updates instances. The following list describes a common implementation of PutInstance:
-
Examine the key properties passed in by the client with the Get methods for CInstance, such as CInstance::GetCHString.
Your implementation should determine if your provider supports the changes requested by the client.
- Create or update the appropriate managed object, as necessary.
-
Return the appropriate return value.
If your provider does not support the changes requested by the client, you should return an appropriate error code. For a complete listing of valid error codes, see IWbemServices::PutInstance.
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 |