Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenmsfs.c
Go to the documentation of this file.
00001 /* 00002 * COPYRIGHT: See COPYING in the top level directory 00003 * PROJECT: ReactOS kernel 00004 * FILE: drivers/filesystems/msfs/msfs.c 00005 * PURPOSE: Mailslot filesystem 00006 * PROGRAMMER: Eric Kohl 00007 */ 00008 00009 /* INCLUDES ******************************************************************/ 00010 00011 #include "msfs.h" 00012 00013 #define NDEBUG 00014 #include <debug.h> 00015 00016 00017 /* FUNCTIONS *****************************************************************/ 00018 00019 NTSTATUS NTAPI 00020 DriverEntry(PDRIVER_OBJECT DriverObject, 00021 PUNICODE_STRING RegistryPath) 00022 { 00023 PMSFS_DEVICE_EXTENSION DeviceExtension; 00024 PDEVICE_OBJECT DeviceObject; 00025 UNICODE_STRING DeviceName; 00026 NTSTATUS Status; 00027 00028 DPRINT("Mailslot FSD 0.0.1\n"); 00029 00030 DriverObject->Flags = 0; 00031 DriverObject->MajorFunction[IRP_MJ_CREATE] = MsfsCreate; 00032 DriverObject->MajorFunction[IRP_MJ_CREATE_MAILSLOT] = 00033 MsfsCreateMailslot; 00034 DriverObject->MajorFunction[IRP_MJ_CLOSE] = MsfsClose; 00035 DriverObject->MajorFunction[IRP_MJ_READ] = MsfsRead; 00036 DriverObject->MajorFunction[IRP_MJ_WRITE] = MsfsWrite; 00037 DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = 00038 MsfsQueryInformation; 00039 DriverObject->MajorFunction[IRP_MJ_SET_INFORMATION] = 00040 MsfsSetInformation; 00041 // DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] = 00042 // MsfsDirectoryControl; 00043 // DriverObject->MajorFunction[IRP_MJ_FLUSH_BUFFERS] = MsfsFlushBuffers; 00044 // DriverObject->MajorFunction[IRP_MJ_SHUTDOWN] = MsfsShutdown; 00045 // DriverObject->MajorFunction[IRP_MJ_QUERY_SECURITY] = 00046 // MsfsQuerySecurity; 00047 // DriverObject->MajorFunction[IRP_MJ_SET_SECURITY] = 00048 // MsfsSetSecurity; 00049 DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = 00050 MsfsFileSystemControl; 00051 00052 DriverObject->DriverUnload = NULL; 00053 00054 RtlInitUnicodeString(&DeviceName, 00055 L"\\Device\\MailSlot"); 00056 Status = IoCreateDevice(DriverObject, 00057 sizeof(MSFS_DEVICE_EXTENSION), 00058 &DeviceName, 00059 FILE_DEVICE_MAILSLOT, 00060 0, 00061 FALSE, 00062 &DeviceObject); 00063 if (!NT_SUCCESS(Status)) 00064 { 00065 return Status; 00066 } 00067 00068 /* initialize the device object */ 00069 DeviceObject->Flags |= DO_DIRECT_IO; 00070 00071 /* initialize device extension */ 00072 DeviceExtension = DeviceObject->DeviceExtension; 00073 InitializeListHead(&DeviceExtension->FcbListHead); 00074 KeInitializeMutex(&DeviceExtension->FcbListLock, 00075 0); 00076 00077 return STATUS_SUCCESS; 00078 } 00079 00080 /* EOF */ Generated on Sun May 27 2012 04:27:47 for ReactOS by
1.7.6.1
|