O'Reilly logo

Programming Windows® Services with Microsoft® Visual Basic® 2008 by Michael Gernaey

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Extending the WMI Implementation

The current WMI implementation isn’t a very scalable solution, so we’ll implement the same strategies that we used for file monitoring.

Extending the WMI Class

We need to create a more robust and scalable WMI class that allows for multiple instances of monitored servers. In addition, we want to be able to predefine a query that we can use to retrieve specific information.

Because of the extensive nature of changes to the WMI class, I will reprint the code in Example 8-6 and then review the changes.

Example 8-6. Extended WMI class.

Public Class WMI Private m_Error As String = Nothing Private m_Scope As ManagementScope = Nothing Private m_Path As ManagementPath = Nothing Private m_Outgoing As Thread = Nothing Private ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required