DIB Engine: Implement Polygon
[wine/hacks.git] / include / wine / winaspi.h
blob39dc63f67a1fea498a881c84d19a2cfdc5467870
1 /*
2 * This file should be source compatible with the Adaptec winaspi.h
3 * All DOS ASPI structures are the same as WINASPI
5 * Copyright (C) 2000 Alexandre Julliard
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #ifndef __WINASPI_H__
23 #define __WINASPI_H__
25 /* Include base aspi defs */
26 #include <wnaspi32.h>
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* #ifdef __cplusplus */
32 /* WINE SCSI Stuff */
33 #define ASPI_DOS 1
34 #define ASPI_WIN16 2
36 #include <pshpack1.h>
38 /* SRB HA_INQUIRY */
40 typedef struct tagSRB16_HaInquiry {
41 BYTE SRB_Cmd;
42 BYTE SRB_Status;
43 BYTE SRB_HaId;
44 BYTE SRB_Flags;
45 WORD SRB_55AASignature;
46 WORD SRB_ExtBufferSize;
47 BYTE HA_Count;
48 BYTE HA_SCSI_ID;
49 BYTE HA_ManagerId[16];
50 BYTE HA_Identifier[16];
51 BYTE HA_Unique[16];
52 BYTE HA_ExtBuffer[4];
53 } SRB_HaInquiry16, *PSRB_HaInquiry16, *LPSRB_HaInquiry16;
55 typedef struct tagSRB16_GDEVBlock {
56 BYTE SRB_Cmd; /* ASPI command code = SC_GET_DEV_TYPE */
57 BYTE SRB_Status; /* ASPI command status byte */
58 BYTE SRB_HaId; /* ASPI host adapter number */
59 BYTE SRB_Flags; /* ASPI request flags */
60 DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 */
61 BYTE SRB_Target; /* Target's SCSI ID */
62 BYTE SRB_Lun; /* Target's LUN number */
63 BYTE SRB_DeviceType; /* Target's peripheral device type */
64 } SRB_GDEVBlock16, *PSRB_GDEVBlock16, *LPSRB_GDEVBlock16;
67 typedef struct tagSRB16_ExecSCSICmd {
68 BYTE SRB_Cmd; /* ASPI command code (W) */
69 BYTE SRB_Status; /* ASPI command status byte (R) */
70 BYTE SRB_HaId; /* ASPI host adapter number (W) */
71 BYTE SRB_Flags; /* ASPI request flags (W) */
72 DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 (-) */
73 BYTE SRB_Target; /* Target's SCSI ID (W) */
74 BYTE SRB_Lun; /* Target's LUN number (W) */
75 DWORD SRB_BufLen; /* Data Allocation LengthPG (W/R)*/
76 BYTE SRB_SenseLen; /* Sense Allocation Length (W) */
77 SEGPTR SRB_BufPointer; /* Data Buffer Pointer (W) */
78 DWORD SRB_Rsvd1; /* Reserved, MUST = 0 (-/W)*/
79 BYTE SRB_CDBLen; /* CDB Length = 6 (W) */
80 BYTE SRB_HaStat; /* Host Adapter Status (R) */
81 BYTE SRB_TargStat; /* Target Status (R) */
82 FARPROC16 SRB_PostProc; /* Post routine (W) */
83 BYTE SRB_Rsvd2[34]; /* Reserved, MUST = 0 */
84 BYTE CDBByte[1]; /* SCSI CBD - variable length (W) */
85 /* variable example for 6 byte cbd
86 * BYTE CDBByte[6]; * SCSI CDB (W) *
87 * BYTE SenseArea6[SENSE_LEN]; * Request Sense buffer (R) *
89 } SRB_ExecSCSICmd16, *PSRB_ExecSCSICmd16, *LPSRB_ExecSCSICmd16;
91 typedef struct tagSRB16_Abort {
92 BYTE SRB_Cmd; /* ASPI command code = SC_ABORT_SRB */
93 BYTE SRB_Status; /* ASPI command status byte */
94 BYTE SRB_HaId; /* ASPI host adapter number */
95 BYTE SRB_Flags; /* ASPI request flags */
96 DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 */
97 SEGPTR SRB_ToAbort; /* Pointer to SRB to abort */
98 } SRB_Abort16, *PSRB_Abort16, *LPSRB_Abort16;
101 typedef struct tagSRB16_BusDeviceReset {
102 BYTE SRB_Cmd; /* ASPI command code = SC_RESET_DEV */
103 BYTE SRB_Status; /* ASPI command status byte */
104 BYTE SRB_HaId; /* ASPI host adapter number */
105 BYTE SRB_Flags; /* ASPI request flags */
106 DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 */
107 BYTE SRB_Target; /* Target's SCSI ID */
108 BYTE SRB_Lun; /* Target's LUN number */
109 BYTE SRB_ResetRsvd1[14]; /* Reserved, MUST = 0 */
110 BYTE SRB_HaStat; /* Host Adapter Status */
111 BYTE SRB_TargStat; /* Target Status */
112 FARPROC16 SRB_PostProc; /* Post routine */
113 BYTE SRB_ResetRsvd2[34]; /* Reserved, MUST = 0 */
114 } SRB_BusDeviceReset16, *PSRB_BusDeviceReset16, *LPSRB_BusDeviceReset16;
117 typedef struct tagSRB16_Common {
118 BYTE SRB_Cmd; /* ASPI command code = SC_ABORT_SRB */
119 BYTE SRB_Status; /* ASPI command status byte */
120 BYTE SRB_HaId; /* ASPI host adapter number */
121 BYTE SRB_Flags; /* ASPI request flags */
122 DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 */
123 } SRB_Common16, *PSRB_Common16, *LPSRB_Common16;
125 typedef union tagSRB16 {
126 SRB_Common16 common;
127 SRB_HaInquiry16 inquiry;
128 SRB_ExecSCSICmd16 cmd;
129 SRB_Abort16 abort;
130 SRB_BusDeviceReset16 reset;
131 SRB_GDEVBlock16 devtype;
132 } SRB16, *LPSRB16;
134 #include <poppack.h>
136 extern WORD WINAPI SendASPICommand16(SEGPTR);
137 extern WORD WINAPI GetASPISupportInfo16(void);
139 #ifdef __cplusplus
141 #endif /* #ifdef __cplusplus */
143 #endif /* __WINE_WINASPI_H */