2002-10-06 Casper Hornstrup <chorns@it.dk>
* include/ddk: New subdir.
* lib/ddk: Ditto.
* include/ddk/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, hidusage.h, mcd.h,
miniport.h, minitape.h, mountdev.h, mountmgr.h, ndis.h,
ndisquid.h, ndistapi.h, ndisvan.h, netevent.h, netpnp.h,
netdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h,
ntddcdvd.h, ntddchgr.h, ntdddisk.h, ntddk.h, ntddkbd.h,
ntddmou.h, ntddndis.h, ntddpar.h, ntddpcm.h, ntddscsi.h,
ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h, ntddvdeo.h,
ntddvol.h, ntifs.h, ntpoapi.h, ntstatus.h, parallel.h, pfhook.h,
poclass.h, scsi.h, scsiscan.h, scsiwmi.h, smbus.h, srb.h,
storport.h, tdi.h, tdiinfo.h, tdikrnl.h, tdistat.h, tvout.h,
upssvc.h, usb.h, usb100.h, usbcamdi.h, usbdi.h, usbioctl.h,
usbiodef.h, usbscan.h, usbuser.h, video.h, videoagp.h, win2k.h,
winddi.h, winddk.h, winnt4.h, winxp.h, ws2san.h,
xfilter.h): New files.
* lib/ddk/(Makefile.in, apcups.def, cfgmgr32.def, dxapi.def,
hal.def, hid.def, hidparse.def, mcd.def, ndis.def, ntoskrnl.def,
scsiport.def, tdi.def, usbcamd.def, usbcamd2.def, videoprt.def,
win32k.def): Ditto.
2002-10-07 00:18:26 +02:00
|
|
|
/*
|
|
|
|
* scsiwmi.h
|
|
|
|
*
|
|
|
|
* SCSI WMILIB interface.
|
|
|
|
*
|
* include/ddk/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, hidusage.h, mcd.h,
miniport.h, minitape.h, mountdev.h, mountmgr.h, ndis.h,
ndisquid.h, ndistapi.h, ndisvan.h, netevent.h, netpnp.h,
netdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h,
ntddcdvd.h, ntddchgr.h, ntdddisk.h, ntddk.h, ntddkbd.h,
ntddmou.h, ntddndis.h, ntddpar.h, ntddpcm.h, ntddscsi.h,
ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h, ntddvdeo.h,
ntddvol.h, ntifs.h, ntpoapi.h, ntstatus.h, parallel.h, pfhook.h,
poclass.h, scsi.h, scsiscan.h, scsiwmi.h, smbus.h, srb.h,
storport.h, tdi.h, tdiinfo.h, tdikrnl.h, tdistat.h, tvout.h,
upssvc.h, usb.h, usb100.h, usbcamdi.h, usbdi.h, usbioctl.h,
usbiodef.h, usbscan.h, usbuser.h, video.h, videoagp.h, win2k.h,
winddi.h, winddk.h, winnt4.h, winxp.h, ws2san.h,
xfilter.h): Change comment to refer w32api package, not MinGW.
2002-11-15 02:08:17 +01:00
|
|
|
* This file is part of the w32api package.
|
2002-10-06 Casper Hornstrup <chorns@it.dk>
* include/ddk: New subdir.
* lib/ddk: Ditto.
* include/ddk/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, hidusage.h, mcd.h,
miniport.h, minitape.h, mountdev.h, mountmgr.h, ndis.h,
ndisquid.h, ndistapi.h, ndisvan.h, netevent.h, netpnp.h,
netdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h,
ntddcdvd.h, ntddchgr.h, ntdddisk.h, ntddk.h, ntddkbd.h,
ntddmou.h, ntddndis.h, ntddpar.h, ntddpcm.h, ntddscsi.h,
ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h, ntddvdeo.h,
ntddvol.h, ntifs.h, ntpoapi.h, ntstatus.h, parallel.h, pfhook.h,
poclass.h, scsi.h, scsiscan.h, scsiwmi.h, smbus.h, srb.h,
storport.h, tdi.h, tdiinfo.h, tdikrnl.h, tdistat.h, tvout.h,
upssvc.h, usb.h, usb100.h, usbcamdi.h, usbdi.h, usbioctl.h,
usbiodef.h, usbscan.h, usbuser.h, video.h, videoagp.h, win2k.h,
winddi.h, winddk.h, winnt4.h, winxp.h, ws2san.h,
xfilter.h): New files.
* lib/ddk/(Makefile.in, apcups.def, cfgmgr32.def, dxapi.def,
hal.def, hid.def, hidparse.def, mcd.def, ndis.def, ntoskrnl.def,
scsiport.def, tdi.def, usbcamd.def, usbcamd2.def, videoprt.def,
win32k.def): Ditto.
2002-10-07 00:18:26 +02:00
|
|
|
*
|
|
|
|
* Contributors:
|
|
|
|
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS NOT COPYRIGHTED
|
|
|
|
*
|
|
|
|
* This source code is offered for use in the public domain. You may
|
|
|
|
* use, modify or distribute it freely.
|
|
|
|
*
|
|
|
|
* This code is distributed in the hope that it will be useful but
|
|
|
|
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
* include/ddk/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, hidusage.h, mcd.h,
miniport.h, minitape.h, mountdev.h, mountmgr.h, ndis.h,
ndisquid.h, ndistapi.h, ndisvan.h, netevent.h, netpnp.h,
netdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h,
ntddcdvd.h, ntddchgr.h, ntdddisk.h, ntddk.h, ntddkbd.h,
ntddmou.h, ntddndis.h, ntddpar.h, ntddpcm.h, ntddscsi.h,
ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h, ntddvdeo.h,
ntddvol.h, ntifs.h, ntpoapi.h, ntstatus.h, parallel.h, pfhook.h,
poclass.h, scsi.h, scsiscan.h, scsiwmi.h, smbus.h, srb.h,
storport.h, tdi.h, tdiinfo.h, tdikrnl.h, tdistat.h, tvout.h,
upssvc.h, usb.h, usb100.h, usbcamdi.h, usbdi.h, usbioctl.h,
usbiodef.h, usbscan.h, usbuser.h, video.h, videoagp.h, win2k.h,
winddi.h, winddk.h, winnt4.h, winxp.h, ws2san.h,
xfilter.h): Fix typo in disclaimer comment.
2002-11-12 22:34:07 +01:00
|
|
|
* DISCLAIMED. This includes but is not limited to warranties of
|
2002-10-06 Casper Hornstrup <chorns@it.dk>
* include/ddk: New subdir.
* lib/ddk: Ditto.
* include/ddk/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, hidusage.h, mcd.h,
miniport.h, minitape.h, mountdev.h, mountmgr.h, ndis.h,
ndisquid.h, ndistapi.h, ndisvan.h, netevent.h, netpnp.h,
netdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h,
ntddcdvd.h, ntddchgr.h, ntdddisk.h, ntddk.h, ntddkbd.h,
ntddmou.h, ntddndis.h, ntddpar.h, ntddpcm.h, ntddscsi.h,
ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h, ntddvdeo.h,
ntddvol.h, ntifs.h, ntpoapi.h, ntstatus.h, parallel.h, pfhook.h,
poclass.h, scsi.h, scsiscan.h, scsiwmi.h, smbus.h, srb.h,
storport.h, tdi.h, tdiinfo.h, tdikrnl.h, tdistat.h, tvout.h,
upssvc.h, usb.h, usb100.h, usbcamdi.h, usbdi.h, usbioctl.h,
usbiodef.h, usbscan.h, usbuser.h, video.h, videoagp.h, win2k.h,
winddi.h, winddk.h, winnt4.h, winxp.h, ws2san.h,
xfilter.h): New files.
* lib/ddk/(Makefile.in, apcups.def, cfgmgr32.def, dxapi.def,
hal.def, hid.def, hidparse.def, mcd.def, ndis.def, ntoskrnl.def,
scsiport.def, tdi.def, usbcamd.def, usbcamd2.def, videoprt.def,
win32k.def): Ditto.
2002-10-07 00:18:26 +02:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __SCSIWMI_H
|
|
|
|
#define __SCSIWMI_H
|
|
|
|
|
|
|
|
#if __GNUC__ >=3
|
|
|
|
#pragma GCC system_header
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#pragma pack(push,4)
|
|
|
|
|
|
|
|
#include "ntddk.h"
|
|
|
|
#include "srb.h"
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _SCSIWMI_REQUEST_CONTEXT {
|
|
|
|
PVOID UserContext;
|
|
|
|
ULONG BufferSize;
|
|
|
|
PUCHAR Buffer;
|
|
|
|
UCHAR MinorFunction;
|
|
|
|
UCHAR ReturnStatus;
|
|
|
|
ULONG ReturnSize;
|
|
|
|
} SCSIWMI_REQUEST_CONTEXT, *PSCSIWMI_REQUEST_CONTEXT;
|
|
|
|
|
2003-02-05 16:51:27 +01:00
|
|
|
#ifdef _GUID_DEFINED
|
|
|
|
# warning _GUID_DEFINED is deprecated, use GUID_DEFINED instead
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if ! (defined _GUID_DEFINED || defined GUID_DEFINED)
|
|
|
|
#define GUID_DEFINED
|
2002-12-19 02:34:26 +01:00
|
|
|
typedef struct _GUID {
|
|
|
|
unsigned long Data1;
|
|
|
|
unsigned short Data2;
|
|
|
|
unsigned short Data3;
|
|
|
|
unsigned char Data4[ 8 ];
|
|
|
|
} GUID;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _LPCGUID_DEFINED
|
|
|
|
#define _LPCGUID_DEFINED
|
|
|
|
typedef const GUID *LPCGUID;
|
|
|
|
#endif
|
|
|
|
|
2002-10-06 Casper Hornstrup <chorns@it.dk>
* include/ddk: New subdir.
* lib/ddk: Ditto.
* include/ddk/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, hidusage.h, mcd.h,
miniport.h, minitape.h, mountdev.h, mountmgr.h, ndis.h,
ndisquid.h, ndistapi.h, ndisvan.h, netevent.h, netpnp.h,
netdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h,
ntddcdvd.h, ntddchgr.h, ntdddisk.h, ntddk.h, ntddkbd.h,
ntddmou.h, ntddndis.h, ntddpar.h, ntddpcm.h, ntddscsi.h,
ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h, ntddvdeo.h,
ntddvol.h, ntifs.h, ntpoapi.h, ntstatus.h, parallel.h, pfhook.h,
poclass.h, scsi.h, scsiscan.h, scsiwmi.h, smbus.h, srb.h,
storport.h, tdi.h, tdiinfo.h, tdikrnl.h, tdistat.h, tvout.h,
upssvc.h, usb.h, usb100.h, usbcamdi.h, usbdi.h, usbioctl.h,
usbiodef.h, usbscan.h, usbuser.h, video.h, videoagp.h, win2k.h,
winddi.h, winddk.h, winnt4.h, winxp.h, ws2san.h,
xfilter.h): New files.
* lib/ddk/(Makefile.in, apcups.def, cfgmgr32.def, dxapi.def,
hal.def, hid.def, hidparse.def, mcd.def, ndis.def, ntoskrnl.def,
scsiport.def, tdi.def, usbcamd.def, usbcamd2.def, videoprt.def,
win32k.def): Ditto.
2002-10-07 00:18:26 +02:00
|
|
|
typedef struct _SCSIWMIGUIDREGINFO {
|
|
|
|
LPCGUID Guid;
|
|
|
|
ULONG InstanceCount;
|
|
|
|
ULONG Flags;
|
|
|
|
} SCSIWMIGUIDREGINFO, *PSCSIWMIGUIDREGINFO;
|
|
|
|
|
|
|
|
typedef UCHAR DDKAPI
|
|
|
|
(*PSCSIWMI_QUERY_REGINFO)(
|
|
|
|
IN PVOID DeviceContext,
|
|
|
|
IN PSCSIWMI_REQUEST_CONTEXT RequestContext,
|
|
|
|
OUT PWCHAR *MofResourceName);
|
|
|
|
|
|
|
|
typedef BOOLEAN DDKAPI
|
|
|
|
(*PSCSIWMI_QUERY_DATABLOCK)(
|
|
|
|
IN PVOID Context,
|
|
|
|
IN PSCSIWMI_REQUEST_CONTEXT DispatchContext,
|
|
|
|
IN ULONG GuidIndex,
|
|
|
|
IN ULONG InstanceIndex,
|
|
|
|
IN ULONG InstanceCount,
|
|
|
|
IN OUT PULONG InstanceLengthArray,
|
|
|
|
IN ULONG BufferAvail,
|
|
|
|
OUT PUCHAR Buffer);
|
|
|
|
|
|
|
|
typedef BOOLEAN DDKAPI
|
|
|
|
(*PSCSIWMI_SET_DATABLOCK)(
|
|
|
|
IN PVOID DeviceContext,
|
|
|
|
IN PSCSIWMI_REQUEST_CONTEXT RequestContext,
|
|
|
|
IN ULONG GuidIndex,
|
|
|
|
IN ULONG InstanceIndex,
|
|
|
|
IN ULONG BufferSize,
|
|
|
|
IN PUCHAR Buffer);
|
|
|
|
|
|
|
|
typedef BOOLEAN DDKAPI
|
|
|
|
(*PSCSIWMI_SET_DATAITEM)(
|
|
|
|
IN PVOID DeviceContext,
|
|
|
|
IN PSCSIWMI_REQUEST_CONTEXT RequestContext,
|
|
|
|
IN ULONG GuidIndex,
|
|
|
|
IN ULONG InstanceIndex,
|
|
|
|
IN ULONG DataItemId,
|
|
|
|
IN ULONG BufferSize,
|
|
|
|
IN PUCHAR Buffer);
|
|
|
|
|
|
|
|
typedef BOOLEAN DDKAPI
|
|
|
|
(*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,
|
|
|
|
IN OUT PUCHAR Buffer);
|
|
|
|
|
|
|
|
typedef enum _SCSIWMI_ENABLE_DISABLE_CONTROL {
|
|
|
|
ScsiWmiEventControl,
|
|
|
|
ScsiWmiDataBlockControl
|
|
|
|
} SCSIWMI_ENABLE_DISABLE_CONTROL;
|
|
|
|
|
|
|
|
typedef BOOLEAN DDKAPI
|
|
|
|
(*PSCSIWMI_FUNCTION_CONTROL)(
|
|
|
|
IN PVOID DeviceContext,
|
|
|
|
IN PSCSIWMI_REQUEST_CONTEXT RequestContext,
|
|
|
|
IN ULONG GuidIndex,
|
|
|
|
IN SCSIWMI_ENABLE_DISABLE_CONTROL Function,
|
|
|
|
IN BOOLEAN Enable);
|
|
|
|
|
|
|
|
typedef struct _SCSIWMILIB_CONTEXT {
|
|
|
|
ULONG GuidCount;
|
|
|
|
PSCSIWMIGUIDREGINFO GuidList;
|
|
|
|
PSCSIWMI_QUERY_REGINFO QueryWmiRegInfo;
|
|
|
|
PSCSIWMI_QUERY_DATABLOCK QueryWmiDataBlock;
|
|
|
|
PSCSIWMI_SET_DATABLOCK SetWmiDataBlock;
|
|
|
|
PSCSIWMI_SET_DATAITEM SetWmiDataItem;
|
|
|
|
PSCSIWMI_EXECUTE_METHOD ExecuteWmiMethod;
|
|
|
|
PSCSIWMI_FUNCTION_CONTROL WmiFunctionControl;
|
|
|
|
} SCSI_WMILIB_CONTEXT, *PSCSI_WMILIB_CONTEXT;
|
|
|
|
|
|
|
|
SCSIPORTAPI
|
|
|
|
BOOLEAN
|
|
|
|
DDKAPI
|
|
|
|
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);
|
|
|
|
|
|
|
|
#define ScsiPortWmiFireAdapterEvent( \
|
|
|
|
HwDeviceExtension, \
|
|
|
|
Guid, \
|
|
|
|
InstanceIndex, \
|
|
|
|
EventDataSize, \
|
|
|
|
EventData) \
|
|
|
|
ScsiPortWmiFireLogicalUnitEvent( \
|
|
|
|
HwDeviceExtension, \
|
|
|
|
0xff, \
|
|
|
|
0, \
|
|
|
|
0, \
|
|
|
|
Guid, \
|
|
|
|
InstanceIndex, \
|
|
|
|
EventDataSize, \
|
|
|
|
EventData)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* ULONG
|
|
|
|
* ScsiPortWmiGetReturnSize(
|
|
|
|
* PSCSIWMI_REQUEST_CONTEXT RequestContext);
|
|
|
|
*/
|
|
|
|
#define ScsiPortWmiGetReturnSize(RequestContext) \
|
|
|
|
((RequestContext)->ReturnSize)
|
|
|
|
|
|
|
|
/* UCHAR
|
|
|
|
* ScsiPortWmiGetReturnStatus(
|
|
|
|
* PSCSIWMI_REQUEST_CONTEXT RequestContext);
|
|
|
|
*/
|
|
|
|
#define ScsiPortWmiGetReturnStatus(RequestContext) \
|
|
|
|
((RequestContext)->ReturnStatus)
|
|
|
|
|
|
|
|
SCSIPORTAPI
|
|
|
|
VOID
|
|
|
|
DDKAPI
|
|
|
|
ScsiPortWmiPostProcess(
|
|
|
|
IN PSCSIWMI_REQUEST_CONTEXT RequestContext,
|
|
|
|
IN UCHAR SrbStatus,
|
|
|
|
IN ULONG BufferUsed);
|
|
|
|
|
|
|
|
SCSIPORTAPI
|
|
|
|
VOID
|
|
|
|
DDKAPI
|
|
|
|
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);
|
|
|
|
|
|
|
|
#pragma pack(pop)
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __SCSIWMI_H */
|