4 * Media changer driver 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 #define CHANGERAPI DECLSPEC_EXPORT
42 #define CHANGERAPI DECLSPEC_IMPORT
50 #define DebugPrint(x) ChangerClassDebugPrint x
55 #define MAXIMUM_CHANGER_INQUIRY_DATA 252
60 ChangerClassAllocatePool(
61 /*IN*/ POOL_TYPE PoolType
,
62 /*IN*/ ULONG NumberOfBytes
);
65 ChangerClassDebugPrint(
66 ULONG DebugPrintLevel
,
74 /*IN*/ PVOID PoolToFree
);
79 ChangerClassSendSrbSynchronous(
80 /*IN*/ PDEVICE_OBJECT DeviceObject
,
81 /*IN*/ PSCSI_REQUEST_BLOCK Srb
,
83 /*IN*/ ULONG BufferSize
,
84 /*IN*/ BOOLEAN WriteToDevice
);
87 typedef NTSTATUS DDKAPI
88 (*CHANGER_INITIALIZE
)(
89 /*IN*/ PDEVICE_OBJECT DeviceObject
);
92 (*CHANGER_EXTENSION_SIZE
)(
96 (*CHANGER_ERROR_ROUTINE
)(
97 PDEVICE_OBJECT DeviceObject
,
98 PSCSI_REQUEST_BLOCK Srb
,
102 typedef NTSTATUS DDKAPI
103 (*CHANGER_COMMAND_ROUTINE
)(
104 /*IN*/ PDEVICE_OBJECT DeviceObject
,
107 typedef NTSTATUS DDKAPI
108 (*CHANGER_PERFORM_DIAGNOSTICS
)(
109 /*IN*/ PDEVICE_OBJECT DeviceObject
,
110 /*OUT*/ PWMI_CHANGER_PROBLEM_DEVICE_ERROR ChangerDeviceError
);
112 typedef struct _MCD_INIT_DATA
{
114 CHANGER_EXTENSION_SIZE ChangerAdditionalExtensionSize
;
115 CHANGER_INITIALIZE ChangerInitialize
;
116 CHANGER_ERROR_ROUTINE ChangerError
;
117 CHANGER_PERFORM_DIAGNOSTICS ChangerPerformDiagnostics
;
118 CHANGER_COMMAND_ROUTINE ChangerGetParameters
;
119 CHANGER_COMMAND_ROUTINE ChangerGetStatus
;
120 CHANGER_COMMAND_ROUTINE ChangerGetProductData
;
121 CHANGER_COMMAND_ROUTINE ChangerSetAccess
;
122 CHANGER_COMMAND_ROUTINE ChangerGetElementStatus
;
123 CHANGER_COMMAND_ROUTINE ChangerInitializeElementStatus
;
124 CHANGER_COMMAND_ROUTINE ChangerSetPosition
;
125 CHANGER_COMMAND_ROUTINE ChangerExchangeMedium
;
126 CHANGER_COMMAND_ROUTINE ChangerMoveMedium
;
127 CHANGER_COMMAND_ROUTINE ChangerReinitializeUnit
;
128 CHANGER_COMMAND_ROUTINE ChangerQueryVolumeTags
;
129 } MCD_INIT_DATA
, *PMCD_INIT_DATA
;
134 ChangerClassInitialize(
135 /*IN*/ PDRIVER_OBJECT DriverObject
,
136 /*IN*/ PUNICODE_STRING RegistryPath
,
137 /*IN*/ PMCD_INIT_DATA MCDInitData
);