ReactOS  0.4.15-dev-489-g75a0787
mcd.h
Go to the documentation of this file.
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
31 extern "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 
53 PVOID
54 NTAPI
58 
59 VOID
61  ULONG DebugPrintLevel,
62  PCCHAR DebugMessage,
63  ...);
64 
66 PVOID
67 NTAPI
69  IN PVOID PoolToFree);
70 
73 NTAPI
77  IN PVOID Buffer,
79  IN BOOLEAN WriteToDevice);
80 
81 
82 typedef NTSTATUS NTAPI
85 
86 typedef ULONG NTAPI
88  VOID);
89 
90 typedef VOID NTAPI
95  BOOLEAN *Retry);
96 
97 typedef NTSTATUS NTAPI
100  IN PIRP Irp);
101 
102 typedef NTSTATUS NTAPI
105  OUT PWMI_CHANGER_PROBLEM_DEVICE_ERROR ChangerDeviceError);
106 
107 typedef struct _MCD_INIT_DATA {
125 
127 NTSTATUS
128 NTAPI
132  IN PMCD_INIT_DATA MCDInitData);
133 
134 #ifdef __cplusplus
135 }
136 #endif
137 
138 #endif /* __MCD_H */
#define IN
Definition: typedefs.h:39
CHANGER_INITIALIZE ChangerInitialize
Definition: mcd.h:110
CHANGER_COMMAND_ROUTINE ChangerReinitializeUnit
Definition: mcd.h:122
_In_ PIRP Irp
Definition: csq.h:116
VOID NTAPI(* CHANGER_ERROR_ROUTINE)(PDEVICE_OBJECT DeviceObject, PSCSI_REQUEST_BLOCK Srb, NTSTATUS *Status, BOOLEAN *Retry)
Definition: mcd.h:91
CHANGER_PERFORM_DIAGNOSTICS ChangerPerformDiagnostics
Definition: mcd.h:112
LONG NTSTATUS
Definition: precomp.h:26
CHANGERAPI PVOID NTAPI ChangerClassFreePool(IN PVOID PoolToFree)
NTSTATUS NTAPI(* CHANGER_INITIALIZE)(IN PDEVICE_OBJECT DeviceObject)
Definition: mcd.h:83
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
CHANGER_COMMAND_ROUTINE ChangerExchangeMedium
Definition: mcd.h:120
CHANGER_COMMAND_ROUTINE ChangerMoveMedium
Definition: mcd.h:121
unsigned char BOOLEAN
NTSTATUS NTAPI(* CHANGER_COMMAND_ROUTINE)(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: mcd.h:98
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
IN PSCSI_REQUEST_BLOCK IN OUT NTSTATUS IN OUT BOOLEAN * Retry
Definition: class2.h:49
Definition: bufpool.h:45
CHANGER_COMMAND_ROUTINE ChangerGetElementStatus
Definition: mcd.h:117
VOID ChangerClassDebugPrint(ULONG DebugPrintLevel, PCCHAR DebugMessage,...)
struct _MCD_INIT_DATA MCD_INIT_DATA
NTSTATUS NTAPI(* CHANGER_PERFORM_DIAGNOSTICS)(IN PDEVICE_OBJECT DeviceObject, OUT PWMI_CHANGER_PROBLEM_DEVICE_ERROR ChangerDeviceError)
Definition: mcd.h:103
struct _MCD_INIT_DATA * PMCD_INIT_DATA
INT POOL_TYPE
Definition: typedefs.h:77
CHANGER_COMMAND_ROUTINE ChangerGetStatus
Definition: mcd.h:114
#define BufferSize
Definition: classpnp.h:419
CHANGER_ERROR_ROUTINE ChangerError
Definition: mcd.h:111
ULONG InitDataSize
Definition: mcd.h:108
CHANGERAPI PVOID NTAPI ChangerClassAllocatePool(IN POOL_TYPE PoolType, IN ULONG NumberOfBytes)
CHANGER_COMMAND_ROUTINE ChangerSetPosition
Definition: mcd.h:119
ULONG NTAPI(* CHANGER_EXTENSION_SIZE)(VOID)
Definition: mcd.h:87
CHANGER_COMMAND_ROUTINE ChangerGetParameters
Definition: mcd.h:113
#define VOID
Definition: acefi.h:82
Status
Definition: gdiplustypes.h:24
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1569
CHANGER_COMMAND_ROUTINE ChangerQueryVolumeTags
Definition: mcd.h:123
CHANGER_COMMAND_ROUTINE ChangerSetAccess
Definition: mcd.h:116
#define CHANGERAPI
Definition: mcd.h:37
CHANGER_COMMAND_ROUTINE ChangerGetProductData
Definition: mcd.h:115
#define OUT
Definition: typedefs.h:40
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:1000
unsigned int ULONG
Definition: retypes.h:1
_In_ PUNICODE_STRING RegistryPath
Definition: wmip.h:28
CHANGER_COMMAND_ROUTINE ChangerInitializeElementStatus
Definition: mcd.h:118
CHANGERAPI NTSTATUS NTAPI ChangerClassSendSrbSynchronous(IN PDEVICE_OBJECT DeviceObject, IN PSCSI_REQUEST_BLOCK Srb, IN PVOID Buffer, IN ULONG BufferSize, IN BOOLEAN WriteToDevice)
CHANGER_EXTENSION_SIZE ChangerAdditionalExtensionSize
Definition: mcd.h:109
IN PSCSI_REQUEST_BLOCK Srb
Definition: class2.h:49
_Must_inspect_result_ _In_ FLT_CONTEXT_TYPE _In_ SIZE_T _In_ POOL_TYPE PoolType
Definition: fltkernel.h:1444
CHANGERAPI NTSTATUS NTAPI ChangerClassInitialize(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath, IN PMCD_INIT_DATA MCDInitData)