Source code of Windows XP (NT5)
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.

47 lines
1.3 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // Copyright (c) 2000, Microsoft Corporation, All rights reserved
  3. //
  4. // NCEvents.h
  5. //
  6. // This file is the interface to using non-COM events within ESS.
  7. //
  8. #pragma once
  9. #include "NCObjAPI.h"
  10. BOOL InitNCEvents();
  11. void DeinitNCEvents();
  12. // Use this index with g_hNCEvents
  13. enum NCE_INDEX
  14. {
  15. MSFT_WmiRegisterNotificationSink,
  16. MSFT_WmiCancelNotificationSink,
  17. MSFT_WmiEventProviderLoaded,
  18. MSFT_WmiEventProviderUnloaded,
  19. MSFT_WmiEventProviderNewQuery,
  20. MSFT_WmiEventProviderCancelQuery,
  21. MSFT_WmiEventProviderAccessCheck,
  22. MSFT_WmiConsumerProviderLoaded,
  23. MSFT_WmiConsumerProviderUnloaded,
  24. MSFT_WmiConsumerProviderSinkLoaded,
  25. MSFT_WmiConsumerProviderSinkUnloaded,
  26. MSFT_WmiThreadPoolThreadCreated,
  27. MSFT_WmiThreadPoolThreadDeleted,
  28. MSFT_WmiFilterActivated,
  29. MSFT_WmiFilterDeactivated,
  30. NCE_InvalidIndex // This should always be the last one.
  31. };
  32. extern HANDLE g_hNCEvents[];
  33. #ifdef USE_NCEVENTS
  34. #define FIRE_NCEVENT ::WmiSetAndCommitObject
  35. #define IS_NCEVENT_ACTIVE(index) ::WmiIsObjectActive(g_hNCEvents[index])
  36. #else
  37. #define FIRE_NCEVENT 1 ? (void)0 : ::WmiSetAndCommitObject
  38. #define IS_NCEVENT_ACTIVE(index) FALSE
  39. #endif