SOL9 2.0 Sample: SWbemNotificationQueryApplet

SOL9 2.0 Samples

1 Screenshot


2 Source code

/*
 * SWbemNotificationQueryApplet.cpp 
 * Copyright (c) 2009 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */


// SOL9

#include <sol/wmi/SWbemNotificationQueryApplet.h>

// Please specify Query property in the following way:
// Query     = SELECT * FROM __InstanceOperationEvent WITHIN 1 WHERE TargetInstance ISA 'Win32_Process'

void _tmain(int argc, const TCHAR** argv)
{
    try {
        //1 Create SWbemNotificationQueryApplet thread

        SWbemNotificationQueryApplet applet;

        //2 Start query thread
        applet.start();

        //3 Wait a completion of the query thread
        applet.wait();

    } catch (HRESULT hr) {
        printf("Exception HRESULT=%0x", hr); 
    } catch (Exception& ex) {
        ex.printf();
    } catch (...) {
        printf("Unknown exception\n");
    }

}

Last modified: 24 Dec 2009

Copyright (c) 2009 Antillia.com ALL RIGHTS RESERVED.