Classes : MSNdis_80211_ReceivedSignalStrength
C# 에서 WMI 를 사용하시는데 별 어려움 없으실 거라고 생각합니다. 위에 보이는 것 처럼 직접 구현해 주셔도 되지만, 개인적으로 귀찮은지라 WMI Code Creator 를 이용해서 Copy & Paste 를 선호합니다.
To create an application for WMI using C++: you must initialize COM, access and set WMI protocols, and perform a manual cleanup. However, C++ does have the advantage of flexibility and power. Therefore, while you are better served in using Visual Basic Scripting Edition (VBScript) or Microsoft JScript for simple processes, C++ works better for more sophisticated applications and is required for writing providers.
The following procedure describes how to create a WMI application.
To create a WMI application
- Initialize
COM.
Because WMI is based on COM technology, you must perform calls to the CoInitializeEx and CoInitializeSecurity functions to access WMI.
- Create a connection to a WMI namespace.
By definition, WMI runs in a different process than your application. Therefore, you must create a connection between your application and WMI.
- Set the security levels on the WMI connection.
To use the connection you create to WMI, you must set the impersonation and authentication levels for your application.
- Implement the purpose of your application.
WMI exposes a variety of COM interfaces use to access and manipulate data across your enterprise. For more information, see Manipulating Class and Instance Information, Receiving a WMI Event, and COM API for WMI.
This is where the bulk of your WMI client application should exist, such as accessing WMI objects or manipulating data.
- Cleanup and shut down your application.
After you complete your queries to WMI, you should destroy all COM pointers and shut down your application correctly.
For more information and a code example about how to create a WMI application, see Example: Creating a WMI Application.
이해가 잘 안간다면 하단에 나와 있듯이 Example: Creating a WMI Application 를 보면 한눈에 방법을 알 수 있다.