Provider Framework Utility Classes
[WMI C++ classes that are 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 provider framework libraries Framedyd.dll (debug version) and Framedyn.dll (release version) implement several provider helper classes. Some functions in Framedyn.dll have been removed from the header files. To continue to use these functions, add
#define FRAMEWORK_ALLOW_DEPRECATED to your code before including Fwcommon.h.
You can unload individual providers that are no longer required.
To use this capability, you must make the three following changes to your provider in MainDll.cpp:
- In the function DllMain where you call CWbemProviderGlue::FrameworkLoginDLL, you must add a second parameter which is a pointer to a long.
- In the function DllCanUnloadNow where you call CWbemProviderGlue::FrameworkLogoffDLL, you must add a second parameter which is a pointer to a long.
- In the function DllGetClassObject where you create an instance of CWbemGlueFactory, you must add a parameter which is a pointer to a long.
In all three cases, the pointer to a long must be the same pointer.
The following table lists the provider framework utility classes.
|CHString||Provides string comparison and manipulation functions for WMI.|
|CHStringArray||Contains for creating and manipulating arrays of CHString.|
|TRefPointerCollection||Grants access to a container class for pointers.|
|WBEMTime||Facilitates conversions between various Windows and ANSI C run-time time formats.|
|WBEMTimeSpan||Contains helper functions used to calculate and hold the time span difference between two WBEMTime objects.|
Although times and time spans are stored internally as nanoseconds, they are not necessarily stored with nanosecond accuracy. This is because WBEMTime objects can be constructed using time formats that are accurate to a second (struct tm, and time_t). Adding artificial decimal places does not increase the accuracy.