source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/ddk/mcd.h@ 1166

Last change on this file since 1166 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 3.0 KB
Line 
1/*
2 * mcd.h
3 *
4 * Media changer driver 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#ifndef __MCD_H
24#define __MCD_H
25
26#include "srb.h"
27#include "scsi.h"
28#include "ntddchgr.h"
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34#if defined(_MCD_)
35#define CHANGERAPI
36#else
37#define CHANGERAPI DECLSPEC_IMPORT
38#endif
39
40#ifdef DebugPrint
41#undef DebugPrint
42#endif
43
44#if DBG
45#define DebugPrint(x) ChangerClassDebugPrint x
46#else
47#define DebugPrint(x)
48#endif
49
50#define MAXIMUM_CHANGER_INQUIRY_DATA 252
51
52CHANGERAPI
53PVOID
54NTAPI
55ChangerClassAllocatePool(
56 IN POOL_TYPE PoolType,
57 IN ULONG NumberOfBytes);
58
59VOID
60ChangerClassDebugPrint(
61 ULONG DebugPrintLevel,
62 PCCHAR DebugMessage,
63 ...);
64
65CHANGERAPI
66PVOID
67NTAPI
68ChangerClassFreePool(
69 IN PVOID PoolToFree);
70
71CHANGERAPI
72NTSTATUS
73NTAPI
74ChangerClassSendSrbSynchronous(
75 IN PDEVICE_OBJECT DeviceObject,
76 IN PSCSI_REQUEST_BLOCK Srb,
77 IN PVOID Buffer,
78 IN ULONG BufferSize,
79 IN BOOLEAN WriteToDevice);
80
81
82typedef NTSTATUS NTAPI
83(*CHANGER_INITIALIZE)(
84 IN PDEVICE_OBJECT DeviceObject);
85
86typedef ULONG NTAPI
87(*CHANGER_EXTENSION_SIZE)(
88 VOID);
89
90typedef VOID NTAPI
91(*CHANGER_ERROR_ROUTINE)(
92 PDEVICE_OBJECT DeviceObject,
93 PSCSI_REQUEST_BLOCK Srb,
94 NTSTATUS *Status,
95 BOOLEAN *Retry);
96
97typedef NTSTATUS NTAPI
98(*CHANGER_COMMAND_ROUTINE)(
99 IN PDEVICE_OBJECT DeviceObject,
100 IN PIRP Irp);
101
102typedef NTSTATUS NTAPI
103(*CHANGER_PERFORM_DIAGNOSTICS)(
104 IN PDEVICE_OBJECT DeviceObject,
105 OUT PWMI_CHANGER_PROBLEM_DEVICE_ERROR ChangerDeviceError);
106
107typedef struct _MCD_INIT_DATA {
108 ULONG InitDataSize;
109 CHANGER_EXTENSION_SIZE ChangerAdditionalExtensionSize;
110 CHANGER_INITIALIZE ChangerInitialize;
111 CHANGER_ERROR_ROUTINE ChangerError;
112 CHANGER_PERFORM_DIAGNOSTICS ChangerPerformDiagnostics;
113 CHANGER_COMMAND_ROUTINE ChangerGetParameters;
114 CHANGER_COMMAND_ROUTINE ChangerGetStatus;
115 CHANGER_COMMAND_ROUTINE ChangerGetProductData;
116 CHANGER_COMMAND_ROUTINE ChangerSetAccess;
117 CHANGER_COMMAND_ROUTINE ChangerGetElementStatus;
118 CHANGER_COMMAND_ROUTINE ChangerInitializeElementStatus;
119 CHANGER_COMMAND_ROUTINE ChangerSetPosition;
120 CHANGER_COMMAND_ROUTINE ChangerExchangeMedium;
121 CHANGER_COMMAND_ROUTINE ChangerMoveMedium;
122 CHANGER_COMMAND_ROUTINE ChangerReinitializeUnit;
123 CHANGER_COMMAND_ROUTINE ChangerQueryVolumeTags;
124} MCD_INIT_DATA, *PMCD_INIT_DATA;
125
126CHANGERAPI
127NTSTATUS
128NTAPI
129ChangerClassInitialize(
130 IN PDRIVER_OBJECT DriverObject,
131 IN PUNICODE_STRING RegistryPath,
132 IN PMCD_INIT_DATA MCDInitData);
133
134#ifdef __cplusplus
135}
136#endif
137
138#endif /* __MCD_H */
Note: See TracBrowser for help on using the repository browser.