Provider::CreateNewInstance 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 CreateNewInstance method allocates a new CInstance object and returns a pointer to it.


CInstance * CreateNewInstance(
  MethodContext *pMethodContext



A pointer to the context associated with this instance.

Return value

Returns a pointer to the new instance.


The caller must call either CInstance::Release or Provider::Commit on the returned pointer. Either of these methods may be used, but they are not interchangeable. Refer to the Remarks section on each of these methods to determine which is appropriate.

This method does not return a NULL pointer. If it fails, it throws an exception.


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