In this chapter we will use our WMI class to extend the code in Chapter 3. We will use the code to collect information about the local system and log an event.
We will add the constants shown in Example 8-3 to the top of the modService.vb file so that we can write the correct EventID to the Application log.
Example 8-3. Application log EventID constants.
Public Const WMI_ERROR As Integer = 1010 Public Const WMI_INFO As Integer = 2007 Public Const CONFIG_READ_ERROR As Integer = 4000
In this section we will add the WMI class to the Chapter 4 code and then write the code to use this class. Because we will build onto existing code, we do not need to create a new project. ...