Sun WBEM SDK Developer's Guide

Example — Registering a Provider

The following example shows the MOF file that declares to the CIM Object Manager the Ex_SimpleInstanceProvider class that is served by the SimpleInstanceProvider (shown in Example 5–1). Provider and class names in a valid MOF file follow these rules:


Example 5–5 SimpleInstanceProvider MOF File

// ===================================================================
// Title:       SimpleInstanceProvider
// Filename:    SimpleInstanceProvider.mof
// Description:
// ===================================================================

// ==================================================================
// Pragmas
// ==================================================================
#pragma Locale ("en-US")

// ==================================================================
//   SimpleInstanceProvider
// ==================================================================
[Provider("SimpleInstanceProvider")]
class Ex_SimpleInstanceProvider
{
   // Properties
      [Key, Description("First Name of the User")]
   string First;
      [Description("Last Name of the User")]
   string Last;
};