หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
You can use the following sample code to create a Windows Management Instrumentation (WMI) sink to monitor auditing and logging events:
//Create the WMI query and Event watcher and subscribe to events
ManagementEventWatcher watcher = new ManagementEventWatcher ("root/Default", "select * from PackageEvent");
ManagementBaseObject evtObj = watcher.WaitForNextEvent();
//Do what you want with the event