4 * SCSI WMILIB interface.
6 * This file is part of the w32api package.
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
11 * THIS SOFTWARE IS NOT COPYRIGHTED
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27 #pragma GCC system_header
40 typedef struct _SCSIWMI_REQUEST_CONTEXT
{
47 } SCSIWMI_REQUEST_CONTEXT
, *PSCSIWMI_REQUEST_CONTEXT
;
50 # warning _GUID_DEFINED is deprecated, use GUID_DEFINED instead
53 #if ! (defined _GUID_DEFINED || defined GUID_DEFINED)
55 typedef struct _GUID
{
59 unsigned char Data4
[ 8 ];
63 #ifndef _LPCGUID_DEFINED
64 #define _LPCGUID_DEFINED
65 typedef const GUID
*LPCGUID
;
68 typedef struct _SCSIWMIGUIDREGINFO
{
72 } SCSIWMIGUIDREGINFO
, *PSCSIWMIGUIDREGINFO
;
75 (*PSCSIWMI_QUERY_REGINFO
)(
76 /*IN*/ PVOID DeviceContext
,
77 /*IN*/ PSCSIWMI_REQUEST_CONTEXT RequestContext
,
78 /*OUT*/ PWCHAR
*MofResourceName
);
80 typedef BOOLEAN DDKAPI
81 (*PSCSIWMI_QUERY_DATABLOCK
)(
83 /*IN*/ PSCSIWMI_REQUEST_CONTEXT DispatchContext
,
84 /*IN*/ ULONG GuidIndex
,
85 /*IN*/ ULONG InstanceIndex
,
86 /*IN*/ ULONG InstanceCount
,
87 /*IN OUT*/ PULONG InstanceLengthArray
,
88 /*IN*/ ULONG BufferAvail
,
89 /*OUT*/ PUCHAR Buffer
);
91 typedef BOOLEAN DDKAPI
92 (*PSCSIWMI_SET_DATABLOCK
)(
93 /*IN*/ PVOID DeviceContext
,
94 /*IN*/ PSCSIWMI_REQUEST_CONTEXT RequestContext
,
95 /*IN*/ ULONG GuidIndex
,
96 /*IN*/ ULONG InstanceIndex
,
97 /*IN*/ ULONG BufferSize
,
98 /*IN*/ PUCHAR Buffer
);
100 typedef BOOLEAN DDKAPI
101 (*PSCSIWMI_SET_DATAITEM
)(
102 /*IN*/ PVOID DeviceContext
,
103 /*IN*/ PSCSIWMI_REQUEST_CONTEXT RequestContext
,
104 /*IN*/ ULONG GuidIndex
,
105 /*IN*/ ULONG InstanceIndex
,
106 /*IN*/ ULONG DataItemId
,
107 /*IN*/ ULONG BufferSize
,
108 /*IN*/ PUCHAR Buffer
);
110 typedef BOOLEAN DDKAPI
111 (*PSCSIWMI_EXECUTE_METHOD
)(
112 /*IN*/ PVOID DeviceContext
,
113 /*IN*/ PSCSIWMI_REQUEST_CONTEXT RequestContext
,
114 /*IN*/ ULONG GuidIndex
,
115 /*IN*/ ULONG InstanceIndex
,
116 /*IN*/ ULONG MethodId
,
117 /*IN*/ ULONG InBufferSize
,
118 /*IN*/ ULONG OutBufferSize
,
119 /*IN OUT*/ PUCHAR Buffer
);
121 typedef enum _SCSIWMI_ENABLE_DISABLE_CONTROL
{
123 ScsiWmiDataBlockControl
124 } SCSIWMI_ENABLE_DISABLE_CONTROL
;
126 typedef BOOLEAN DDKAPI
127 (*PSCSIWMI_FUNCTION_CONTROL
)(
128 /*IN*/ PVOID DeviceContext
,
129 /*IN*/ PSCSIWMI_REQUEST_CONTEXT RequestContext
,
130 /*IN*/ ULONG GuidIndex
,
131 /*IN*/ SCSIWMI_ENABLE_DISABLE_CONTROL Function
,
132 /*IN*/ BOOLEAN Enable
);
134 typedef struct _SCSIWMILIB_CONTEXT
{
136 PSCSIWMIGUIDREGINFO GuidList
;
137 PSCSIWMI_QUERY_REGINFO QueryWmiRegInfo
;
138 PSCSIWMI_QUERY_DATABLOCK QueryWmiDataBlock
;
139 PSCSIWMI_SET_DATABLOCK SetWmiDataBlock
;
140 PSCSIWMI_SET_DATAITEM SetWmiDataItem
;
141 PSCSIWMI_EXECUTE_METHOD ExecuteWmiMethod
;
142 PSCSIWMI_FUNCTION_CONTROL WmiFunctionControl
;
143 } SCSI_WMILIB_CONTEXT
, *PSCSI_WMILIB_CONTEXT
;
148 ScsiPortWmiDispatchFunction(
149 /*IN*/ PSCSI_WMILIB_CONTEXT WmiLibInfo
,
150 /*IN*/ UCHAR MinorFunction
,
151 /*IN*/ PVOID DeviceContext
,
152 /*IN*/ PSCSIWMI_REQUEST_CONTEXT RequestContext
,
153 /*IN*/ PVOID DataPath
,
154 /*IN*/ ULONG BufferSize
,
155 /*IN*/ PVOID Buffer
);
157 #define ScsiPortWmiFireAdapterEvent( \
163 ScsiPortWmiFireLogicalUnitEvent( \
175 * ScsiPortWmiGetReturnSize(
176 * PSCSIWMI_REQUEST_CONTEXT RequestContext);
178 #define ScsiPortWmiGetReturnSize(RequestContext) \
179 ((RequestContext)->ReturnSize)
182 * ScsiPortWmiGetReturnStatus(
183 * PSCSIWMI_REQUEST_CONTEXT RequestContext);
185 #define ScsiPortWmiGetReturnStatus(RequestContext) \
186 ((RequestContext)->ReturnStatus)
191 ScsiPortWmiPostProcess(
192 /*IN*/ PSCSIWMI_REQUEST_CONTEXT RequestContext
,
193 /*IN*/ UCHAR SrbStatus
,
194 /*IN*/ ULONG BufferUsed
);
199 ScsiPortWmiFireLogicalUnitEvent(
200 /*IN*/ PVOID HwDeviceExtension
,
202 /*IN*/ UCHAR TargetId
,
205 /*IN*/ ULONG InstanceIndex
,
206 /*IN*/ ULONG EventDataSize
,
207 /*IN*/ PVOID EventData
);
215 #endif /* __SCSIWMI_H */