ReactOS  0.4.14-dev-554-g2f8d847
scsiwmi.h
Go to the documentation of this file.
1 /*
2  * scsiwmi.h
3  *
4  * SCSI WMILIB interface.
5  *
6  * This file is part of the w32api package.
7  *
8  * Contributors:
9  * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
10  *
11  * THIS SOFTWARE IS NOT COPYRIGHTED
12  *
13  * This source code is offered for use in the public domain. You may
14  * use, modify or distribute it freely.
15  *
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.
20  *
21  */
22 
23 #pragma once
24 
25 #ifndef _SCSIWMI_
26 #define _SCSIWMI_
27 
28 #include "srb.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #pragma pack(push,4)
35 
36 typedef struct _SCSIWMI_REQUEST_CONTEXT {
44 
45 #ifdef _GUID_DEFINED
46 # warning _GUID_DEFINED is deprecated, use GUID_DEFINED instead
47 #endif
48 
49 #if ! (defined _GUID_DEFINED || defined GUID_DEFINED)
50 #define GUID_DEFINED
51 typedef struct _GUID {
52  unsigned long Data1;
53  unsigned short Data2;
54  unsigned short Data3;
55  unsigned char Data4[8];
56 } GUID;
57 #endif
58 
59 typedef struct _SCSIWMIGUIDREGINFO {
64 
65 typedef
67 UCHAR
70  _In_ PSCSIWMI_REQUEST_CONTEXT RequestContext,
72 
73 typedef
75 BOOLEAN
78  _In_ PSCSIWMI_REQUEST_CONTEXT DispatchContext,
82  _Inout_ PULONG InstanceLengthArray,
85 
86 typedef
88 BOOLEAN
91  _In_ PSCSIWMI_REQUEST_CONTEXT RequestContext,
96 
97 typedef
99 BOOLEAN
102  _In_ PSCSIWMI_REQUEST_CONTEXT RequestContext,
108 
109 typedef
111 BOOLEAN
114  _In_ PSCSIWMI_REQUEST_CONTEXT RequestContext,
121 
126 
127 typedef
129 BOOLEAN
132  _In_ PSCSIWMI_REQUEST_CONTEXT RequestContext,
136 
137 typedef struct _SCSIWMILIB_CONTEXT {
147 
150 BOOLEAN
151 NTAPI
153  _In_ PSCSI_WMILIB_CONTEXT WmiLibInfo,
156  _In_ PSCSIWMI_REQUEST_CONTEXT RequestContext,
157  _In_ PVOID DataPath,
159  _In_ PVOID Buffer);
160 
161 #define ScsiPortWmiFireAdapterEvent( \
162  HwDeviceExtension, \
163  Guid, \
164  InstanceIndex, \
165  EventDataSize, \
166  EventData) \
167  ScsiPortWmiFireLogicalUnitEvent( \
168  HwDeviceExtension, \
169  0xff, \
170  0, \
171  0, \
172  Guid, \
173  InstanceIndex, \
174  EventDataSize, \
175  EventData)
176 
177 /*
178  * ULONG
179  * ScsiPortWmiGetReturnSize(
180  * PSCSIWMI_REQUEST_CONTEXT RequestContext);
181  */
182 #define ScsiPortWmiGetReturnSize(RequestContext) \
183  ((RequestContext)->ReturnSize)
184 
185 /* UCHAR
186  * ScsiPortWmiGetReturnStatus(
187  * PSCSIWMI_REQUEST_CONTEXT RequestContext);
188  */
189 #define ScsiPortWmiGetReturnStatus(RequestContext) \
190  ((RequestContext)->ReturnStatus)
191 
193 VOID
194 NTAPI
196  _Inout_ PSCSIWMI_REQUEST_CONTEXT RequestContext,
197  _In_ UCHAR SrbStatus,
198  _In_ ULONG BufferUsed);
199 
201 VOID
202 NTAPI
204  _In_ PVOID HwDeviceExtension,
205  _In_ UCHAR PathId,
207  _In_ UCHAR Lun,
208  _In_ LPGUID Guid,
211  _In_ PVOID EventData);
212 
213 #pragma pack(pop)
214 
215 #ifdef __cplusplus
216 }
217 #endif
218 
219 #endif /* _SCSIWMI_ */
#define _Must_inspect_result_
Definition: no_sal2.h:314
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR _In_ UCHAR Lun
Definition: classpnp.h:1117
Definition: scsiwmi.h:51
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR PathId
Definition: classpnp.h:1117
_In_ PIRP _In_ ULONG _In_ ULONG DataItemId
Definition: classpnp.h:419
PSCSIWMI_QUERY_DATABLOCK QueryWmiDataBlock
Definition: scsiwmi.h:141
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR TargetId
Definition: classpnp.h:1117
struct _SCSIWMILIB_CONTEXT * PSCSI_WMILIB_CONTEXT
unsigned char * PUCHAR
Definition: retypes.h:3
SCSIPORTAPI VOID NTAPI ScsiPortWmiFireLogicalUnitEvent(_In_ PVOID HwDeviceExtension, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun, _In_ LPGUID Guid, _In_ ULONG InstanceIndex, _In_ ULONG EventDataSize, _In_ PVOID EventData)
struct _SCSIWMILIB_CONTEXT SCSI_WMILIB_CONTEXT
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:140
_In_ LPGUID _In_ ULONG InstanceIndex
Definition: classpnp.h:1057
struct _SCSIWMI_REQUEST_CONTEXT SCSIWMI_REQUEST_CONTEXT
_In_ PIRP _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG OutBufferSize
Definition: classpnp.h:429
unsigned short Data2
Definition: scsiwmi.h:53
uint16_t * PWCHAR
Definition: typedefs.h:54
SCSIPORTAPI VOID NTAPI ScsiPortWmiPostProcess(_Inout_ PSCSIWMI_REQUEST_CONTEXT RequestContext, _In_ UCHAR SrbStatus, _In_ ULONG BufferUsed)
_Must_inspect_result_ BOOLEAN(NTAPI * PSCSIWMI_QUERY_DATABLOCK)(_In_ PVOID Context, _In_ PSCSIWMI_REQUEST_CONTEXT DispatchContext, _In_ ULONG GuidIndex, _In_ ULONG InstanceIndex, _In_ ULONG InstanceCount, _Inout_ PULONG InstanceLengthArray, _In_ ULONG BufferAvail, _Out_writes_bytes_(BufferAvail) PUCHAR Buffer)
Definition: scsiwmi.h:76
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
static LPOVERLAPPED_COMPLETION_ROUTINE Function
Definition: sync.c:684
unsigned long Data1
Definition: scsiwmi.h:52
_Must_inspect_result_ SCSIPORTAPI BOOLEAN NTAPI ScsiPortWmiDispatchFunction(_In_ PSCSI_WMILIB_CONTEXT WmiLibInfo, _In_ UCHAR MinorFunction, _In_ PVOID DeviceContext, _In_ PSCSIWMI_REQUEST_CONTEXT RequestContext, _In_ PVOID DataPath, _In_ ULONG BufferSize, _In_ PVOID Buffer)
unsigned char BOOLEAN
static GUID * Guid
Definition: apphelp.c:93
_Out_ ULONG _Out_ PUNICODE_STRING _Out_ PUNICODE_STRING MofResourceName
Definition: classpnp.h:386
PSCSIWMIGUIDREGINFO GuidList
Definition: scsiwmi.h:139
#define _Out_writes_bytes_(size)
Definition: no_sal2.h:370
#define _Out_
Definition: no_sal2.h:323
_In_ PIRP _In_ ULONG GuidIndex
Definition: classpnp.h:401
Definition: bufpool.h:45
PSCSIWMI_QUERY_REGINFO QueryWmiRegInfo
Definition: scsiwmi.h:140
_In_ PIRP _In_ ULONG _In_ ULONG MethodId
Definition: classpnp.h:429
_In_ PIRP _In_ ULONG _In_ ULONG _In_ ULONG InBufferSize
Definition: classpnp.h:429
#define _Inout_updates_bytes_to_(size, count)
Definition: no_sal2.h:291
_Must_inspect_result_ BOOLEAN(NTAPI * PSCSIWMI_FUNCTION_CONTROL)(_In_ PVOID DeviceContext, _In_ PSCSIWMI_REQUEST_CONTEXT RequestContext, _In_ ULONG GuidIndex, _In_ SCSIWMI_ENABLE_DISABLE_CONTROL Function, _In_ BOOLEAN Enable)
Definition: scsiwmi.h:130
_Must_inspect_result_ BOOLEAN(NTAPI * PSCSIWMI_EXECUTE_METHOD)(_In_ PVOID DeviceContext, _In_ PSCSIWMI_REQUEST_CONTEXT RequestContext, _In_ ULONG GuidIndex, _In_ ULONG InstanceIndex, _In_ ULONG MethodId, _In_ ULONG InBufferSize, _In_ ULONG OutBufferSize, _Inout_updates_bytes_to_(InBufferSize, OutBufferSize) PUCHAR Buffer)
Definition: scsiwmi.h:112
_In_ LPGUID _In_ ULONG _In_ ULONG EventDataSize
Definition: classpnp.h:1057
_SCSIWMI_ENABLE_DISABLE_CONTROL
Definition: scsiwmi.h:122
#define BufferSize
Definition: classpnp.h:419
_Must_inspect_result_ BOOLEAN(NTAPI * PSCSIWMI_SET_DATABLOCK)(_In_ PVOID DeviceContext, _In_ PSCSIWMI_REQUEST_CONTEXT RequestContext, _In_ ULONG GuidIndex, _In_ ULONG InstanceIndex, _In_ ULONG BufferSize, _In_reads_bytes_(BufferSize) PUCHAR Buffer)
Definition: scsiwmi.h:89
#define _Inout_
Definition: no_sal2.h:244
unsigned char UCHAR
Definition: xmlstorage.h:181
PSCSIWMI_FUNCTION_CONTROL WmiFunctionControl
Definition: scsiwmi.h:145
_In_ PNDIS_STRING _In_opt_ NDIS_HANDLE DeviceContext
Definition: ndis.h:5245
PSCSIWMI_SET_DATABLOCK SetWmiDataBlock
Definition: scsiwmi.h:142
_In_ PIRP _In_ ULONG _In_ ULONG BufferAvail
Definition: classpnp.h:401
_In_ UCHAR MinorFunction
Definition: pofuncs.h:42
#define _In_reads_bytes_(size)
Definition: no_sal2.h:229
#define _In_
Definition: no_sal2.h:204
struct _SCSIWMI_REQUEST_CONTEXT * PSCSIWMI_REQUEST_CONTEXT
struct _GUID GUID
_Must_inspect_result_ UCHAR(NTAPI * PSCSIWMI_QUERY_REGINFO)(_In_ PVOID DeviceContext, _In_ PSCSIWMI_REQUEST_CONTEXT RequestContext, _Out_ PWCHAR *MofResourceName)
Definition: scsiwmi.h:68
struct _SCSIWMIGUIDREGINFO SCSIWMIGUIDREGINFO
struct _SCSIWMIGUIDREGINFO * PSCSIWMIGUIDREGINFO
_Must_inspect_result_ BOOLEAN(NTAPI * PSCSIWMI_SET_DATAITEM)(_In_ PVOID DeviceContext, _In_ PSCSIWMI_REQUEST_CONTEXT RequestContext, _In_ ULONG GuidIndex, _In_ ULONG InstanceIndex, _In_ ULONG DataItemId, _In_ ULONG BufferSize, _In_reads_bytes_(BufferSize) PUCHAR Buffer)
Definition: scsiwmi.h:100
unsigned int * PULONG
Definition: retypes.h:1
unsigned char Data4[8]
Definition: scsiwmi.h:55
enum _SCSIWMI_ENABLE_DISABLE_CONTROL SCSIWMI_ENABLE_DISABLE_CONTROL
#define BOOLEAN
Definition: pedump.c:73
PSCSIWMI_SET_DATAITEM SetWmiDataItem
Definition: scsiwmi.h:143
#define SCSIPORTAPI
Definition: srb.h:541
struct tagContext Context
Definition: acpixf.h:1030
unsigned int ULONG
Definition: retypes.h:1
_In_ ULONG InstanceCount
Definition: iofuncs.h:1319
unsigned short Data3
Definition: scsiwmi.h:54
PSCSIWMI_EXECUTE_METHOD ExecuteWmiMethod
Definition: scsiwmi.h:144
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
ULONG InstanceCount
Definition: scsiwmi.h:61