Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

fs_rec.h

Go to the documentation of this file.
00001 /*++ 00002 00003 Copyright (c) 1992 Microsoft Corporation 00004 00005 Module Name: 00006 00007 fs_rec.h 00008 00009 Abstract: 00010 00011 This module contains the main header file for the mini-file system 00012 recognizer driver. 00013 00014 Author: 00015 00016 Darryl E. Havens (darrylh) 22-nov-1993 00017 00018 Environment: 00019 00020 Kernel mode, local to I/O system 00021 00022 Revision History: 00023 00024 00025 --*/ 00026 00027 #include "ntifs.h" 00028 #include "ntdddisk.h" 00029 #include "ntddcdrm.h" 00030 00031 // 00032 // Define the debug trace levels. 00033 // 00034 00035 #define FSREC_DEBUG_LEVEL_FSREC 0x00000001 00036 #define FSREC_DEBUG_LEVEL_NTFS 0x00000002 00037 #define FSREC_DEBUG_LEVEL_CDFS 0x00000004 00038 #define FSREC_DEBUG_LEVEL_UDFS 0x00000008 00039 #define FSREC_DEBUG_LEVEL_FAT 0x00000010 00040 00041 #define FSREC_POOL_TAG 'crsF' 00042 00043 #define SetFlag(Flags,SingleFlag) ( \ 00044 (Flags) |= (SingleFlag) \ 00045 ) 00046 00047 #define ClearFlag(Flags,SingleFlag) ( \ 00048 (Flags) &= ~(SingleFlag) \ 00049 ) 00050 00051 // 00052 // Define the file system types for the device extension. 00053 // 00054 00055 typedef enum _FILE_SYSTEM_TYPE { 00056 CdfsFileSystem = 1, 00057 FatFileSystem, 00058 HpfsFileSystem, 00059 NtfsFileSystem, 00060 UdfsFileSystem 00061 } FILE_SYSTEM_TYPE, *PFILE_SYSTEM_TYPE; 00062 00063 // 00064 // Define the device extension for this driver. 00065 // 00066 00067 typedef enum _RECOGNIZER_STATE { 00068 Active, 00069 Transparent, 00070 FastUnload 00071 } RECOGNIZER_STATE, *PRECOGNIZER_STATE; 00072 00073 typedef struct _DEVICE_EXTENSION { 00074 PDEVICE_OBJECT CoRecognizer; 00075 FILE_SYSTEM_TYPE FileSystemType; 00076 RECOGNIZER_STATE State; 00077 } DEVICE_EXTENSION, *PDEVICE_EXTENSION; 00078 00079 // 00080 // Define the functions provided by this driver. 00081 // 00082 00083 NTSTATUS 00084 DriverEntry( 00085 IN PDRIVER_OBJECT DriverObject, 00086 IN PUNICODE_STRING RegistryPath 00087 ); 00088 00089 NTSTATUS 00090 FsRecCleanupClose( 00091 IN PDEVICE_OBJECT DeviceObject, 00092 IN PIRP Irp 00093 ); 00094 00095 NTSTATUS 00096 FsRecCreate( 00097 IN PDEVICE_OBJECT DeviceObject, 00098 IN PIRP Irp 00099 ); 00100 00101 NTSTATUS 00102 FsRecCreateAndRegisterDO( 00103 IN PDRIVER_OBJECT DriverObject, 00104 IN PDEVICE_OBJECT HeadRecognizer OPTIONAL, 00105 OUT PDEVICE_OBJECT *NewRecognizer OPTIONAL, 00106 IN PWCHAR RecFileSystem, 00107 IN PWCHAR FileSystemName, 00108 IN FILE_SYSTEM_TYPE FileSystemType, 00109 IN DEVICE_TYPE DeviceType 00110 ); 00111 00112 NTSTATUS 00113 FsRecFsControl( 00114 IN PDEVICE_OBJECT DeviceObject, 00115 IN PIRP Irp 00116 ); 00117 00118 VOID 00119 FsRecUnload( 00120 IN PDRIVER_OBJECT DriverObject 00121 ); 00122 00123 NTSTATUS 00124 FsRecLoadFileSystem ( 00125 IN PDEVICE_OBJECT DeviceObject, 00126 IN PWCHAR DriverServiceKey 00127 ); 00128 00129 BOOLEAN 00130 FsRecGetDeviceSectorSize ( 00131 IN PDEVICE_OBJECT DeviceObject, 00132 OUT PULONG BytesPerSector 00133 ); 00134 00135 BOOLEAN 00136 FsRecGetDeviceSectors ( 00137 IN PDEVICE_OBJECT DeviceObject, 00138 IN ULONG BytesPerSector, 00139 OUT PLARGE_INTEGER NumberOfSectors 00140 ); 00141 00142 BOOLEAN 00143 FsRecReadBlock( 00144 IN PDEVICE_OBJECT DeviceObject, 00145 IN PLARGE_INTEGER ByteOffset, 00146 IN ULONG MinimumBytes, 00147 IN ULONG BytesPerSector, 00148 OUT PVOID *Buffer, 00149 OUT PBOOLEAN IsDeviceFailure OPTIONAL 00150 ); 00151 00152 #if DBG 00153 00154 extern LONG FsRecDebugTraceLevel; 00155 extern LONG FsRecDebugTraceIndent; 00156 00157 BOOLEAN 00158 FsRecDebugTrace ( 00159 LONG IndentIncrement, 00160 ULONG TraceMask, 00161 PCHAR Format, 00162 ... 00163 ); 00164 00165 #define DebugTrace(M) FsRecDebugTrace M 00166 00167 #else 00168 00169 #define DebugTrace(M) TRUE 00170 00171 #endif 00172 00173 00174 // 00175 // Define the per-type recognizers. 00176 // 00177 00178 NTSTATUS 00179 CdfsRecFsControl( 00180 IN PDEVICE_OBJECT DeviceObject, 00181 IN PIRP Irp 00182 ); 00183 00184 NTSTATUS 00185 UdfsRecFsControl( 00186 IN PDEVICE_OBJECT DeviceObject, 00187 IN PIRP Irp 00188 ); 00189 00190 NTSTATUS 00191 FatRecFsControl( 00192 IN PDEVICE_OBJECT DeviceObject, 00193 IN PIRP Irp 00194 ); 00195 00196 NTSTATUS 00197 NtfsRecFsControl( 00198 IN PDEVICE_OBJECT DeviceObject, 00199 IN PIRP Irp 00200 ); 00201 00202 // 00203 // Define external functions. 00204 // 00205 00206 NTSTATUS 00207 ZwLoadDriver( 00208 IN PUNICODE_STRING DriverServiceName 00209 );

Generated on Sat May 15 19:40:04 2004 for test by doxygen 1.3.7