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.

141 lines
3.0 KiB

  1. //***************************************************************************
  2. //
  3. // Copyright � Microsoft Corporation. All rights reserved.
  4. //
  5. // NCEvent.h
  6. //
  7. //***************************************************************************
  8. #ifndef _NCEVENT_H
  9. #define _NCEVENT_H
  10. #ifdef ISP2PDLL
  11. //#define WMIAPI __declspec(dllexport) WINAPI
  12. #define WMIAPI WINAPI
  13. #else
  14. #define WMIAPI __declspec(dllimport) WINAPI
  15. #endif
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. typedef enum _tagEVENT_SOURCE_MSG
  20. {
  21. ESM_START_SENDING_EVENTS,
  22. ESM_STOP_SENDING_EVENTS,
  23. ESM_NEW_QUERY,
  24. ESM_CANCEL_QUERY,
  25. ESM_ACCESS_CHECK,
  26. } EVENT_SOURCE_MSG;
  27. typedef HRESULT (WINAPI *LPEVENT_SOURCE_CALLBACK)(HANDLE, EVENT_SOURCE_MSG, LPVOID, LPVOID);
  28. typedef struct _tagES_ACCESS_CHECK
  29. {
  30. LPCWSTR szQueryLanguage;
  31. LPCWSTR szQuery;
  32. DWORD dwSidLen;
  33. LPBYTE pSid;
  34. } ES_ACCESS_CHECK;
  35. typedef struct _tagES_NEW_QUERY
  36. {
  37. DWORD dwID;
  38. LPCWSTR szQueryLanguage;
  39. LPCWSTR szQuery;
  40. } ES_NEW_QUERY;
  41. typedef struct _tagES_CANCEL_QUERY
  42. {
  43. DWORD dwID;
  44. } ES_CANCEL_QUERY;
  45. typedef long CIMTYPE;
  46. // Flags for all Create functions
  47. #define WMI_CREATEOBJ_LOCKABLE 1
  48. // Flags for WmiSetAndCommit
  49. #define WMI_SENDCOMMIT_SET_NOT_REQUIRED 1
  50. #define WMI_USE_VA_LIST 2
  51. #ifndef __WbemClient_v1_LIBRARY_DEFINED__
  52. typedef /* [v1_enum] */
  53. enum tag_CIMTYPE_ENUMERATION
  54. { CIM_ILLEGAL = 0xfff,
  55. CIM_EMPTY = 0,
  56. CIM_SINT8 = 16,
  57. CIM_UINT8 = 17,
  58. CIM_SINT16 = 2,
  59. CIM_UINT16 = 18,
  60. CIM_SINT32 = 3,
  61. CIM_UINT32 = 19,
  62. CIM_SINT64 = 20,
  63. CIM_UINT64 = 21,
  64. CIM_REAL32 = 4,
  65. CIM_REAL64 = 5,
  66. CIM_BOOLEAN = 11,
  67. CIM_STRING = 8,
  68. CIM_DATETIME = 101,
  69. CIM_REFERENCE = 102,
  70. CIM_CHAR16 = 103,
  71. CIM_OBJECT = 13,
  72. CIM_IUNKNOWN = 104,
  73. CIM_FLAG_ARRAY = 0x2000
  74. } CIMTYPE_ENUMERATION;
  75. #endif
  76. // Register to send events
  77. HANDLE WMIAPI WmiEventSourceConnect(
  78. LPCWSTR szNamespace,
  79. LPCWSTR szProviderName,
  80. BOOL bBatchSend,
  81. DWORD dwBatchBufferSize,
  82. DWORD dwMaxSendLatency,
  83. LPVOID pUserData,
  84. LPEVENT_SOURCE_CALLBACK pCallback);
  85. void WMIAPI WmiEventSourceDisconnect(
  86. HANDLE hSource);
  87. BOOL WMIAPI WmiIsObjectActive(HANDLE hObject);
  88. BOOL WMIAPI WmiDestroyObject(
  89. HANDLE hObject);
  90. HANDLE WMIAPI WmiCreateObjectWithFormat(
  91. HANDLE hSource,
  92. LPCWSTR szEventName,
  93. DWORD dwFlags,
  94. LPCWSTR szFormat);
  95. BOOL WMIAPI WmiSetAndCommitObject(
  96. HANDLE hObject,
  97. DWORD dwFlags,
  98. ...);
  99. HANDLE WMIAPI WmiCreateObject(
  100. HANDLE hSource,
  101. LPCWSTR szClassName,
  102. DWORD dwFlags);
  103. BOOL WMIAPI WmiAddObjectProp(
  104. HANDLE hObject,
  105. LPCWSTR szPropertyName,
  106. CIMTYPE type,
  107. DWORD *pdwPropIndex);
  108. HANDLE WMIAPI WmiCreateObjectWithProps(
  109. HANDLE hSource,
  110. LPCWSTR szEventName,
  111. DWORD dwFlags,
  112. DWORD nPropertyCount,
  113. LPCWSTR *pszPropertyNames,
  114. CIMTYPE *pPropertyTypes);
  115. #ifdef __cplusplus
  116. }
  117. #endif
  118. #endif