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.

70 lines
2.1 KiB

  1. ////////////////////////////////////////////////////////////////////
  2. //
  3. // globals.h
  4. //
  5. // Copyright (c) 2000-2001 Microsoft Corporation, All Rights Reserved
  6. //
  7. ////////////////////////////////////////////////////////////////////
  8. #ifndef _GLOBALS_H_
  9. #define _GLOBALS_H_
  10. #include <WDMSHELL.h>
  11. #include <wchar.h>
  12. #include <flexarry.h>
  13. #include <provexpt.h>
  14. typedef LPVOID * PPVOID;
  15. #define PUT_INSTANCE 1
  16. #define CREATE_INSTANCE_ENUM 2
  17. // {0725C3CB-FEFB-11d0-99F9-00C04FC2F8EC}
  18. DEFINE_GUID(CLSID_WMIEventProvider, 0x725c3cb, 0xfefb, 0x11d0, 0x99, 0xf9, 0x0, 0xc0, 0x4f, 0xc2, 0xf8, 0xec);
  19. // {D2D588B5-D081-11d0-99E0-00C04FC2F8EC}
  20. DEFINE_GUID(CLSID_WMIProvider,0xd2d588b5, 0xd081, 0x11d0, 0x99, 0xe0, 0x0, 0xc0, 0x4f, 0xc2, 0xf8, 0xec);
  21. // {35B78F79-B973-48c8-A045-CAEC732A35D5}
  22. DEFINE_GUID(CLSID_WMIHiPerfProvider,0x35b78f79, 0xb973, 0x48c8, 0xa0, 0x45, 0xca, 0xec, 0x73, 0x2a, 0x35, 0xd5);
  23. #include "wdmperf.h"
  24. #include "classfac.h"
  25. #include "wmiprov.h"
  26. #include "wmievent.h"
  27. #include "wmimof.h"
  28. //===============================================================
  29. // These variables keep track of when the module can be unloaded
  30. //===============================================================
  31. extern long g_cObj;
  32. extern long g_cLock;
  33. extern long glInits;
  34. extern CWMIEvent * g_pBinaryMofEvent;
  35. extern CCriticalSection g_EventCs;
  36. ///////////////////////////////////////////////////////////////////////////////////////////////////////
  37. //
  38. // Common functions regarding binary mof processing & security
  39. //
  40. ///////////////////////////////////////////////////////////////////////////////////////////////////////
  41. HRESULT SetupLocalEvents();
  42. void DeleteLocalEvents();
  43. void ProcessAllBinaryMofs(CHandleMap * pMap, IWbemServices __RPC_FAR *pNamespace,IWbemContext __RPC_FAR *pCtx,BOOL bProcessMofs = TRUE);
  44. HRESULT CheckImpersonationLevelAndVerifyInternalEvents(BOOL);
  45. #define STANDARD_CATCH catch(Structured_Exception e_SE) { hr = E_UNEXPECTED; } \
  46. catch(Heap_Exception e_HE) { hr = E_OUTOFMEMORY; } \
  47. catch(...) { hr = WBEM_E_UNEXPECTED; }
  48. #endif