source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/ddk/wmilib.h@ 1194

Last change on this file since 1194 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 3.1 KB
RevLine 
[1166]1#pragma once
2
3#ifdef __cplusplus
4extern "C" {
5#endif
6
7typedef enum _WMIENABLEDISABLECONTROL {
8 WmiEventControl,
9 WmiDataBlockControl
10} WMIENABLEDISABLECONTROL, *PWMIENABLEDISABLECONTROL;
11
12typedef enum _SYSCTL_IRP_DISPOSITION {
13 IrpProcessed,
14 IrpNotCompleted,
15 IrpNotWmi,
16 IrpForward
17} SYSCTL_IRP_DISPOSITION, *PSYSCTL_IRP_DISPOSITION;
18
19typedef struct _WMIGUIDREGINFO {
20 LPCGUID Guid;
21 ULONG InstanceCount;
22 ULONG Flags;
23} WMIGUIDREGINFO, *PWMIGUIDREGINFO;
24
25typedef NTSTATUS
26(NTAPI WMI_QUERY_REGINFO_CALLBACK) (
27 IN OUT PDEVICE_OBJECT DeviceObject,
28 IN OUT PULONG RegFlags,
29 IN OUT PUNICODE_STRING InstanceName,
30 OUT PUNICODE_STRING *RegistryPath OPTIONAL,
31 IN OUT PUNICODE_STRING MofResourceName,
32 OUT PDEVICE_OBJECT *Pdo OPTIONAL);
33typedef WMI_QUERY_REGINFO_CALLBACK *PWMI_QUERY_REGINFO;
34
35typedef NTSTATUS
36(NTAPI WMI_FUNCTION_CONTROL_CALLBACK) (
37 IN OUT PDEVICE_OBJECT DeviceObject,
38 IN OUT PIRP Irp,
39 IN ULONG GuidIndex,
40 IN WMIENABLEDISABLECONTROL Function,
41 IN BOOLEAN Enable);
42typedef WMI_FUNCTION_CONTROL_CALLBACK *PWMI_FUNCTION_CONTROL;
43
44typedef NTSTATUS
45(NTAPI WMI_QUERY_DATABLOCK_CALLBACK) (
46 IN OUT PDEVICE_OBJECT DeviceObject,
47 IN OUT PIRP Irp,
48 IN ULONG GuidIndex,
49 IN ULONG InstanceIndex,
50 IN ULONG InstanceCount,
51 OUT PULONG InstanceLengthArray OPTIONAL,
52 IN ULONG BufferAvail,
53 OUT PUCHAR Buffer OPTIONAL);
54typedef WMI_QUERY_DATABLOCK_CALLBACK *PWMI_QUERY_DATABLOCK;
55
56typedef NTSTATUS
57(NTAPI WMI_EXECUTE_METHOD_CALLBACK) (
58 IN OUT PDEVICE_OBJECT DeviceObject,
59 IN OUT PIRP Irp,
60 IN ULONG GuidIndex,
61 IN ULONG InstanceIndex,
62 IN ULONG MethodId,
63 IN ULONG InBufferSize,
64 IN ULONG OutBufferSize,
65 IN OUT PUCHAR Buffer);
66typedef WMI_EXECUTE_METHOD_CALLBACK *PWMI_EXECUTE_METHOD;
67
68typedef NTSTATUS
69(NTAPI WMI_SET_DATABLOCK_CALLBACK) (
70 IN OUT PDEVICE_OBJECT DeviceObject,
71 IN OUT PIRP Irp,
72 IN ULONG GuidIndex,
73 IN ULONG InstanceIndex,
74 IN ULONG BufferSize,
75 IN PUCHAR Buffer);
76typedef WMI_SET_DATABLOCK_CALLBACK *PWMI_SET_DATABLOCK;
77
78typedef NTSTATUS
79(NTAPI WMI_SET_DATAITEM_CALLBACK) (
80 IN OUT PDEVICE_OBJECT DeviceObject,
81 IN OUT PIRP Irp,
82 IN ULONG GuidIndex,
83 IN ULONG InstanceIndex,
84 IN ULONG DataItemId,
85 IN ULONG BufferSize,
86 IN PUCHAR Buffer);
87typedef WMI_SET_DATAITEM_CALLBACK *PWMI_SET_DATAITEM;
88
89typedef struct _WMILIB_CONTEXT {
90 ULONG GuidCount;
91 PWMIGUIDREGINFO GuidList;
92 PWMI_QUERY_REGINFO QueryWmiRegInfo;
93 PWMI_QUERY_DATABLOCK QueryWmiDataBlock;
94 PWMI_SET_DATABLOCK SetWmiDataBlock;
95 PWMI_SET_DATAITEM SetWmiDataItem;
96 PWMI_EXECUTE_METHOD ExecuteWmiMethod;
97 PWMI_FUNCTION_CONTROL WmiFunctionControl;
98} WMILIB_CONTEXT, *PWMILIB_CONTEXT;
99
100#if (NTDDI_VERSION >= NTDDI_WIN2K)
101
102NTSTATUS
103NTAPI
104WmiCompleteRequest(
105 IN PDEVICE_OBJECT DeviceObject,
106 IN OUT PIRP Irp,
107 IN NTSTATUS Status,
108 IN ULONG BufferUsed,
109 IN CCHAR PriorityBoost);
110
111NTSTATUS
112NTAPI
113WmiSystemControl(
114 IN PWMILIB_CONTEXT WmiLibInfo,
115 IN PDEVICE_OBJECT DeviceObject,
116 IN OUT PIRP Irp,
117 OUT PSYSCTL_IRP_DISPOSITION IrpDisposition);
118
119NTSTATUS
120NTAPI
121WmiFireEvent(
122 IN PDEVICE_OBJECT DeviceObject,
123 IN LPCGUID Guid,
124 IN ULONG InstanceIndex,
125 IN ULONG EventDataSize,
126 IN PVOID EventData);
127
128#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */
129
130#ifdef __cplusplus
131}
132#endif
Note: See TracBrowser for help on using the repository browser.