Compiling the Skeleton Code

[This is preliminary documentation and subject to change.]

    To compile the skeleton code
  1. From the \Wbem\include directory, type the following commands:

    midl wbemsvc.idl

    midl providl.idl

    midl wbemdisp.idl

  2. From the \Prov directory, run: MKTYPLIB myprov.odl /h myprov.h.
  3. Make sure \Wbem\include and \Wbem\Include are in your include path.
  4. Make sure \Wbem\Lib is in your lib path.
  5. You must compile Myprov.cpp and Olesrvr.cpp. You are creating a Microsoft Foundation Class (MFC) DLL.
  6. When you link, you must include framedyn.lib and framestat.lib and you must use myprov.def.

For Microsoft® Visual C++® version 5 users, this would be done as follows:

  1. Create a new project named MyProv of type Win32 Dynamic Link Library in location \Prov.
  2. Project/AddtoProject/Files olesrvr.cpp, myprov.def and myclass.cpp.
  3. Go to Project/Settings.
  4. Under C/C++ Preprocessor tab, select the category options and add the two paths for the include files: c:\Wbem\Include and c:\Wbem\Include.
  5. Under Link/Input tab add the lib path and the two lib files (framedyn.lib and framestat.lib).
  6. Under the Additional Lib Path tab add c:\Wbem\Lib.
  7. Make sure \Wbem\Lib is in your lib path.
  8. Save the settings.
  9. Under Build, select Build MyProv.dll.