Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.0 KiB

  1. //=============================================================================
  2. //
  3. // Copyright (c) 1996-1999, Microsoft Corporation, All rights reserved
  4. //
  5. // ESSMAIN.CPP
  6. //
  7. // Defines COM DLL entry points and CFactory implementation.
  8. //
  9. // History:
  10. //
  11. // 11/27/96 a-levn Compiles.
  12. //
  13. //=============================================================================
  14. #include "precomp.h"
  15. #include <wbemidl.h>
  16. #include <wbemcomn.h>
  17. #include "esssink.h"
  18. #include <commain.h>
  19. #include <clsfac.h>
  20. class CMyServer : public CComServer
  21. {
  22. public:
  23. HRESULT Initialize()
  24. {
  25. AddClassInfo(CLSID_WbemEventSubsystem,
  26. _new CClassFactory<CEssObjectSink>(GetLifeControl()),
  27. __TEXT("Event Subsystem"),
  28. TRUE);
  29. AddClassInfo(CLSID_WmiESS,
  30. _new CClassFactory<CEssObjectSink>(GetLifeControl()),
  31. __TEXT("New Event Subsystem"),
  32. TRUE);
  33. return S_OK;
  34. }
  35. } Server;