How to: Create a Visual Studio Project for an MI Provider
While you can use the Convert-MofToProvider tool to generate the source code files for an MI provider and then build those files at the command prompt, using a robust IDE such as Microsoft Visual Studio makes the process much easier. This topic illustrates how to create an empty Win32 DLL project to which you can subsequently add the MI provider source code files generated using the Convert-MofToProvider tool.
- Start Visual Studio.
- Create a new project by clicking <Ctrl><Shift><N>.
- When the New Project dialog displays, expand the Templates entry on the left side of the dialog until you locate the Win32 entry. Click that template.
- In the Name field, specify the name for your project. One technique is to use the following form: <ProviderName>Provider. For example, if you're writing an MI provider to enable management of Win32 processes, you might want to call the provider Process, which would yield a project name of ProcessProvider.
- Click OK.
- When the Win32 Application Wizard displays, click Next to display the Application Settings page.
- Under Application type, select DLL.
- Under Additional options, select Empty project.
- Click Finish to generate the project.
- Once you've created the Visual Studio project that will house your MI provider, the next step is to generate an MI Provider from a MOF file.