Compiling the Skeleton Code
[This is preliminary documentation and subject to change.]
To compile the skeleton code
-
From the \Wbem\include directory, type the following commands:
midl wbemsvc.idl
midl providl.idl
midl wbemdisp.idl
-
From the \Prov directory, run: MKTYPLIB myprov.odl /h myprov.h.
-
Make sure \Wbem\include and \Wbem\Include are in your include path.
-
Make sure \Wbem\Lib is in your lib path.
-
You must compile Myprov.cpp and Olesrvr.cpp. You are creating a Microsoft Foundation Class (MFC) DLL.
-
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:
-
Create a new project named MyProv of type Win32 Dynamic Link Library in location \Prov.
-
Project/AddtoProject/Files olesrvr.cpp, myprov.def and myclass.cpp.
-
Go to Project/Settings.
-
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.
-
Under Link/Input tab add the lib path and the two lib files (framedyn.lib and framestat.lib).
-
Under the Additional Lib Path tab add c:\Wbem\Lib.
-
Make sure \Wbem\Lib is in your lib path.
-
Save the settings.
-
Under Build, select Build MyProv.dll.