[1166] | 1 | #pragma once
|
---|
| 2 |
|
---|
| 3 | #ifdef __cplusplus
|
---|
| 4 | extern "C" {
|
---|
| 5 | #endif
|
---|
| 6 |
|
---|
| 7 | typedef enum _WMIENABLEDISABLECONTROL {
|
---|
| 8 | WmiEventControl,
|
---|
| 9 | WmiDataBlockControl
|
---|
| 10 | } WMIENABLEDISABLECONTROL, *PWMIENABLEDISABLECONTROL;
|
---|
| 11 |
|
---|
| 12 | typedef enum _SYSCTL_IRP_DISPOSITION {
|
---|
| 13 | IrpProcessed,
|
---|
| 14 | IrpNotCompleted,
|
---|
| 15 | IrpNotWmi,
|
---|
| 16 | IrpForward
|
---|
| 17 | } SYSCTL_IRP_DISPOSITION, *PSYSCTL_IRP_DISPOSITION;
|
---|
| 18 |
|
---|
| 19 | typedef struct _WMIGUIDREGINFO {
|
---|
| 20 | LPCGUID Guid;
|
---|
| 21 | ULONG InstanceCount;
|
---|
| 22 | ULONG Flags;
|
---|
| 23 | } WMIGUIDREGINFO, *PWMIGUIDREGINFO;
|
---|
| 24 |
|
---|
| 25 | typedef 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);
|
---|
| 33 | typedef WMI_QUERY_REGINFO_CALLBACK *PWMI_QUERY_REGINFO;
|
---|
| 34 |
|
---|
| 35 | typedef 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);
|
---|
| 42 | typedef WMI_FUNCTION_CONTROL_CALLBACK *PWMI_FUNCTION_CONTROL;
|
---|
| 43 |
|
---|
| 44 | typedef 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);
|
---|
| 54 | typedef WMI_QUERY_DATABLOCK_CALLBACK *PWMI_QUERY_DATABLOCK;
|
---|
| 55 |
|
---|
| 56 | typedef 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);
|
---|
| 66 | typedef WMI_EXECUTE_METHOD_CALLBACK *PWMI_EXECUTE_METHOD;
|
---|
| 67 |
|
---|
| 68 | typedef 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);
|
---|
| 76 | typedef WMI_SET_DATABLOCK_CALLBACK *PWMI_SET_DATABLOCK;
|
---|
| 77 |
|
---|
| 78 | typedef 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);
|
---|
| 87 | typedef WMI_SET_DATAITEM_CALLBACK *PWMI_SET_DATAITEM;
|
---|
| 88 |
|
---|
| 89 | typedef 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 |
|
---|
| 102 | NTSTATUS
|
---|
| 103 | NTAPI
|
---|
| 104 | WmiCompleteRequest(
|
---|
| 105 | IN PDEVICE_OBJECT DeviceObject,
|
---|
| 106 | IN OUT PIRP Irp,
|
---|
| 107 | IN NTSTATUS Status,
|
---|
| 108 | IN ULONG BufferUsed,
|
---|
| 109 | IN CCHAR PriorityBoost);
|
---|
| 110 |
|
---|
| 111 | NTSTATUS
|
---|
| 112 | NTAPI
|
---|
| 113 | WmiSystemControl(
|
---|
| 114 | IN PWMILIB_CONTEXT WmiLibInfo,
|
---|
| 115 | IN PDEVICE_OBJECT DeviceObject,
|
---|
| 116 | IN OUT PIRP Irp,
|
---|
| 117 | OUT PSYSCTL_IRP_DISPOSITION IrpDisposition);
|
---|
| 118 |
|
---|
| 119 | NTSTATUS
|
---|
| 120 | NTAPI
|
---|
| 121 | WmiFireEvent(
|
---|
| 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
|
---|