SOL9 Sample: SWbemNotificationQueryApplet

SOL9 2.0 Samples

1 Screenshot


2 Source code

/*
 * SWbemNotificationQueryApplet.cpp 
 * Copyright (c) 2015 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 IException\n");
  }

}

Last modified: 2 May 2016

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