HP WBEM Services Software Developer's Kit for HP-UX Provider and Client Developer's Guide A.01

Provider Implementation
Provider Design Considerations
Chapter 458
The ProviderModuleName property is a string whose value must be the
same (case insensitive) as the Name property of an instance of
PG_ProviderModule.
The Name property in PG_Provider is the string the CIM Server will pass
to the PegasusCreateProvider function when it needs a pointer to the
provider (the first time it calls a function in the provider). Example 4-4
below shows a source fragment with an example of C++ provider class
declarations and an implementation of the PegasusCreateProvider
function. Example 4-5 shows how an instance of PG_Provider associates
a provider name with a provider module corresponding to a shared
library.
Example 4-4 Provider source fragment showing provider class declarations
and implementation of the PegasusCreateProvider entry point
// This module contains two providers
// ProcessStatusProvider
// MemoryInfoProvider
// class declaration for the Process Status Provider
class ProcessStatusProvider : public CIMInstanceProvider
{
...
};
// class declaration for the Memory Info Provider
class MemoryInfoProvider : public CIMInstanceProvider
{
...
};
// This module (shared library) contains two providers.
// PegasusCreateProvider returns a pointer to the provider
// that was requested by the CIM Server. For each provider, it
// will create an instance of the class on the heap
// (i.e., with "new") and return the pointer.
//
// The string passed to PegasusCreateProvider is the
// PG_Provider.Name, and does not need to match the
// name of the C++ provider class declared above.
//
// extern "C" tells the C++ compiler to generate a
// pure C symbol name for PegasusCreateProvider, rather
// than a "mangled" C++ symbol name
//