Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenmup.c
Go to the documentation of this file.
00001 /* 00002 * ReactOS kernel 00003 * Copyright (C) 2002 ReactOS Team 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License along 00016 * with this program; if not, write to the Free Software Foundation, Inc., 00017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00018 */ 00019 /* $Id: mup.c 53683 2011-09-11 08:52:59Z ekohl $ 00020 * 00021 * COPYRIGHT: See COPYING in the top level directory 00022 * PROJECT: ReactOS kernel 00023 * FILE: drivers/fs/mup/mup.c 00024 * PURPOSE: Multi UNC Provider 00025 * PROGRAMMER: Eric Kohl 00026 */ 00027 00028 /* INCLUDES *****************************************************************/ 00029 00030 #include "mup.h" 00031 00032 #define NDEBUG 00033 #include <debug.h> 00034 00035 /* GLOBALS *****************************************************************/ 00036 00037 00038 /* FUNCTIONS ****************************************************************/ 00039 00040 /* 00041 * FUNCTION: Called by the system to initalize the driver 00042 * ARGUMENTS: 00043 * DriverObject = object describing this driver 00044 * RegistryPath = path to our configuration entries 00045 * RETURNS: Success or failure 00046 */ 00047 NTSTATUS NTAPI 00048 DriverEntry(PDRIVER_OBJECT DriverObject, 00049 PUNICODE_STRING RegistryPath) 00050 { 00051 PDEVICE_OBJECT DeviceObject; 00052 NTSTATUS Status; 00053 UNICODE_STRING DeviceName; 00054 00055 DPRINT("MUP 0.0.1\n"); 00056 00057 RtlInitUnicodeString(&DeviceName, 00058 L"\\Device\\Mup"); 00059 Status = IoCreateDevice(DriverObject, 00060 sizeof(DEVICE_EXTENSION), 00061 &DeviceName, 00062 FILE_DEVICE_MULTI_UNC_PROVIDER, 00063 0, 00064 FALSE, 00065 &DeviceObject); 00066 if (!NT_SUCCESS(Status)) 00067 { 00068 return Status; 00069 } 00070 00071 /* Initialize driver data */ 00072 DeviceObject->Flags |= DO_DIRECT_IO; 00073 // DriverObject->MajorFunction[IRP_MJ_CLOSE] = NtfsClose; 00074 DriverObject->MajorFunction[IRP_MJ_CREATE] = MupCreate; 00075 DriverObject->MajorFunction[IRP_MJ_CREATE_NAMED_PIPE] = MupCreate; 00076 DriverObject->MajorFunction[IRP_MJ_CREATE_MAILSLOT] = MupCreate; 00077 // DriverObject->MajorFunction[IRP_MJ_READ] = NtfsRead; 00078 // DriverObject->MajorFunction[IRP_MJ_WRITE] = NtfsWrite; 00079 // DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = 00080 // NtfsFileSystemControl; 00081 // DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] = 00082 // NtfsDirectoryControl; 00083 // DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = 00084 // NtfsQueryInformation; 00085 // DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] = 00086 // NtfsQueryVolumeInformation; 00087 // DriverObject->MajorFunction[IRP_MJ_SET_VOLUME_INFORMATION] = 00088 // NtfsSetVolumeInformation; 00089 00090 DriverObject->DriverUnload = NULL; 00091 00092 00093 /* Initialize global data */ 00094 // DeviceExtensionNtfsGlobalData = DeviceObject->DeviceExtension; 00095 // RtlZeroMemory(NtfsGlobalData, 00096 // sizeof(NTFS_GLOBAL_DATA)); 00097 // NtfsGlobalData->DriverObject = DriverObject; 00098 // NtfsGlobalData->DeviceObject = DeviceObject; 00099 00100 return STATUS_SUCCESS; 00101 } 00102 Generated on Sun May 27 2012 04:27:47 for ReactOS by
1.7.6.1
|