From aebff275f5197d65c6ba4622f386ac4bdaafb718 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Tue, 10 Feb 2004 16:22:57 +0000 Subject: [PATCH] - Eliminate function pointer typecasts svn path=/trunk/; revision=8130 --- reactos/drivers/bus/isapnp/isapnp.c | 14 +++++------ reactos/drivers/bus/pci/pci.c | 8 +++--- reactos/drivers/dd/beep/beep.c | 21 ++++++++-------- reactos/drivers/dd/blue/blue.c | 12 ++++----- reactos/drivers/dd/bootvid/bootvid.c | 11 ++++----- reactos/drivers/dd/debugout/debugout.c | 19 +++++++------- reactos/drivers/dd/floppy/floppy.c | 11 ++++----- reactos/drivers/dd/ide/ide.c | 6 ++--- reactos/drivers/dd/mpu401/mpu401.c | 13 +++++----- reactos/drivers/dd/mpu401/mpu401.h | 4 +-- reactos/drivers/dd/mpu401/settings.c | 4 +-- reactos/drivers/dd/null/null.c | 17 ++++++------- reactos/drivers/dd/parallel/parallel.c | 8 +++--- reactos/drivers/dd/ramdrv/ramdrv.c | 10 ++++---- reactos/drivers/dd/sdisk/sdisk.c | 3 ++- reactos/drivers/dd/sndblst/dma.c | 2 +- reactos/drivers/dd/sndblst/settings.c | 4 +-- reactos/drivers/dd/sndblst/sndblst.c | 15 ++++++------ reactos/drivers/dd/sndblst/sndblst.h | 4 +-- reactos/drivers/dd/sound/sound.c | 2 +- reactos/drivers/dd/test/test.c | 4 +-- reactos/drivers/fs/cdfs/cdfs.c | 24 +++++++++--------- reactos/drivers/fs/fs_rec/fs_rec.c | 12 ++++----- reactos/drivers/fs/ms/msfs.c | 28 ++++++++++----------- reactos/drivers/fs/mup/mup.c | 24 +++++++++--------- reactos/drivers/fs/np/npfs.c | 30 +++++++++++------------ reactos/drivers/fs/ntfs/ntfs.c | 20 +++++++-------- reactos/drivers/fs/template/template.c | 12 ++++----- reactos/drivers/fs/vfat/iface.c | 30 +++++++++++------------ reactos/drivers/input/keyboard/keyboard.c | 10 ++++---- reactos/drivers/input/mouclass/mouclass.c | 14 +++++------ reactos/drivers/input/psaux/psaux.c | 6 ++--- reactos/drivers/input/sermouse/sermouse.c | 6 ++--- reactos/drivers/net/ndis/ndis/main.c | 4 +-- reactos/drivers/storage/class2/class2.c | 18 +++++++------- reactos/drivers/video/videoprt/videoprt.c | 8 +++--- reactos/include/afd/shared.h | 14 +++++++++++ reactos/include/ddk/i386/pagesize.h | 1 + reactos/include/ddk/mmfuncs.h | 5 ++-- reactos/include/ntos/haltypes.h | 15 ++++++------ reactos/include/ntos/rtltypes.h | 11 +++------ reactos/include/ntos/types.h | 10 +++----- reactos/ntoskrnl/dbg/profile.c | 4 +-- 43 files changed, 250 insertions(+), 248 deletions(-) diff --git a/reactos/drivers/bus/isapnp/isapnp.c b/reactos/drivers/bus/isapnp/isapnp.c index 32847348898..e6ba40a0418 100644 --- a/reactos/drivers/bus/isapnp/isapnp.c +++ b/reactos/drivers/bus/isapnp/isapnp.c @@ -1,4 +1,4 @@ -/* $Id: isapnp.c,v 1.8 2003/11/14 17:13:24 weiden Exp $ +/* $Id: isapnp.c,v 1.9 2004/02/10 16:22:54 navaraf Exp $ * * PROJECT: ReactOS ISA PnP Bus driver * FILE: isapnp.c @@ -1726,12 +1726,12 @@ DriverEntry( { DbgPrint("ISA Plug and Play Bus Driver\n"); - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)ISAPNPDispatchOpenClose; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH)ISAPNPDispatchOpenClose; - DriverObject->MajorFunction[IRP_MJ_READ] = (PDRIVER_DISPATCH)ISAPNPDispatchReadWrite; - DriverObject->MajorFunction[IRP_MJ_WRITE] = (PDRIVER_DISPATCH)ISAPNPDispatchReadWrite; - DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = (PDRIVER_DISPATCH)ISAPNPDispatchDeviceControl; - DriverObject->MajorFunction[IRP_MJ_PNP] = (PDRIVER_DISPATCH)ISAPNPControl; + DriverObject->MajorFunction[IRP_MJ_CREATE] = ISAPNPDispatchOpenClose; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = ISAPNPDispatchOpenClose; + DriverObject->MajorFunction[IRP_MJ_READ] = ISAPNPDispatchReadWrite; + DriverObject->MajorFunction[IRP_MJ_WRITE] = ISAPNPDispatchReadWrite; + DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = ISAPNPDispatchDeviceControl; + DriverObject->MajorFunction[IRP_MJ_PNP] = ISAPNPControl; DriverObject->DriverExtension->AddDevice = ISAPNPAddDevice; return STATUS_SUCCESS; diff --git a/reactos/drivers/bus/pci/pci.c b/reactos/drivers/bus/pci/pci.c index 58b2f2d6c6d..a5ee0be59e7 100644 --- a/reactos/drivers/bus/pci/pci.c +++ b/reactos/drivers/bus/pci/pci.c @@ -1,4 +1,4 @@ -/* $Id: pci.c,v 1.5 2003/12/12 21:54:42 ekohl Exp $ +/* $Id: pci.c,v 1.6 2004/02/10 16:22:55 navaraf Exp $ * * PROJECT: ReactOS PCI Bus driver * FILE: pci.c @@ -174,9 +174,9 @@ DriverEntry( { DbgPrint("Peripheral Component Interconnect Bus Driver\n"); - DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = (PDRIVER_DISPATCH) PciDispatchDeviceControl; - DriverObject->MajorFunction[IRP_MJ_PNP] = (PDRIVER_DISPATCH) PciPnpControl; - DriverObject->MajorFunction[IRP_MJ_POWER] = (PDRIVER_DISPATCH) PciPowerControl; + DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = PciDispatchDeviceControl; + DriverObject->MajorFunction[IRP_MJ_PNP] = PciPnpControl; + DriverObject->MajorFunction[IRP_MJ_POWER] = PciPowerControl; DriverObject->DriverExtension->AddDevice = PciAddDevice; return STATUS_SUCCESS; diff --git a/reactos/drivers/dd/beep/beep.c b/reactos/drivers/dd/beep/beep.c index a91b2552cec..5e66149193c 100644 --- a/reactos/drivers/dd/beep/beep.c +++ b/reactos/drivers/dd/beep/beep.c @@ -1,4 +1,4 @@ -/* $Id: beep.c,v 1.17 2003/11/17 02:12:48 hyperion Exp $ +/* $Id: beep.c,v 1.18 2004/02/10 16:22:55 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -19,7 +19,6 @@ #define NDEBUG #include - /* TYEPEDEFS ***************************************************************/ typedef struct _BEEP_DEVICE_EXTENSION @@ -54,8 +53,9 @@ BeepDPC(PKDPC Dpc, static NTSTATUS STDCALL -BeepCreate(PDEVICE_OBJECT DeviceObject, - PIRP Irp) +BeepCreate( + PDEVICE_OBJECT DeviceObject, + PIRP Irp) /* * FUNCTION: Handles user mode requests * ARGUMENTS: @@ -220,11 +220,10 @@ BeepDeviceControl(PDEVICE_OBJECT DeviceObject, } -static NTSTATUS STDCALL +static VOID STDCALL BeepUnload(PDRIVER_OBJECT DriverObject) { DPRINT("BeepUnload() called!\n"); - return(STATUS_SUCCESS); } @@ -248,11 +247,11 @@ DriverEntry(PDRIVER_OBJECT DriverObject, DPRINT("Beep Device Driver 0.0.3\n"); DriverObject->Flags = 0; - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)BeepCreate; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH)BeepClose; - DriverObject->MajorFunction[IRP_MJ_CLEANUP] = (PDRIVER_DISPATCH)BeepCleanup; - DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = (PDRIVER_DISPATCH)BeepDeviceControl; - DriverObject->DriverUnload = (PDRIVER_UNLOAD)BeepUnload; + DriverObject->MajorFunction[IRP_MJ_CREATE] = BeepCreate; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = BeepClose; + DriverObject->MajorFunction[IRP_MJ_CLEANUP] = BeepCleanup; + DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = BeepDeviceControl; + DriverObject->DriverUnload = BeepUnload; Status = IoCreateDevice(DriverObject, sizeof(DEVICE_EXTENSION), diff --git a/reactos/drivers/dd/blue/blue.c b/reactos/drivers/dd/blue/blue.c index 34ce37264d2..6960f51757f 100644 --- a/reactos/drivers/dd/blue/blue.c +++ b/reactos/drivers/dd/blue/blue.c @@ -1,4 +1,4 @@ -/* $Id: blue.c,v 1.43 2004/01/28 20:51:44 ekohl Exp $ +/* $Id: blue.c,v 1.44 2004/02/10 16:22:55 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -665,11 +665,11 @@ DriverEntry (PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) DPRINT ("Screen Driver 0.0.6\n"); - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH) ScrCreate; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH) ScrDispatch; - DriverObject->MajorFunction[IRP_MJ_READ] = (PDRIVER_DISPATCH) ScrDispatch; - DriverObject->MajorFunction[IRP_MJ_WRITE] = (PDRIVER_DISPATCH) ScrWrite; - DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL ] = (PDRIVER_DISPATCH) ScrIoControl; + DriverObject->MajorFunction[IRP_MJ_CREATE] = ScrCreate; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = ScrDispatch; + DriverObject->MajorFunction[IRP_MJ_READ] = ScrDispatch; + DriverObject->MajorFunction[IRP_MJ_WRITE] = ScrWrite; + DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL ] = ScrIoControl; IoCreateDevice (DriverObject, sizeof(DEVICE_EXTENSION), diff --git a/reactos/drivers/dd/bootvid/bootvid.c b/reactos/drivers/dd/bootvid/bootvid.c index fad19993ebf..0cf803914e4 100644 --- a/reactos/drivers/dd/bootvid/bootvid.c +++ b/reactos/drivers/dd/bootvid/bootvid.c @@ -1,4 +1,4 @@ -/* $Id: bootvid.c,v 1.5 2003/11/17 02:12:48 hyperion Exp $ +/* $Id: bootvid.c,v 1.6 2004/02/10 16:22:55 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -738,7 +738,7 @@ VidInitialize(VOID) return TRUE; } -NTSTATUS STDCALL_FUNC +NTSTATUS STDCALL VidDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { PIO_STACK_LOCATION piosStack = IoGetCurrentIrpStackLocation(Irp); @@ -794,10 +794,9 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) BootVidDriverObject = DriverObject; /* register driver routines */ - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH)VidDispatch; - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)VidDispatch; - DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = - (PDRIVER_DISPATCH)VidDispatch; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = VidDispatch; + DriverObject->MajorFunction[IRP_MJ_CREATE] = VidDispatch; + DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = VidDispatch; DriverObject->DriverUnload = NULL; /* create device */ diff --git a/reactos/drivers/dd/debugout/debugout.c b/reactos/drivers/dd/debugout/debugout.c index d766d60749a..f83ae56ae72 100644 --- a/reactos/drivers/dd/debugout/debugout.c +++ b/reactos/drivers/dd/debugout/debugout.c @@ -1,4 +1,4 @@ -/* $Id: debugout.c,v 1.2 2003/11/17 02:12:49 hyperion Exp $ +/* $Id: debugout.c,v 1.3 2004/02/10 16:22:55 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -26,7 +26,7 @@ #include /* FUNCTIONS */ -NTSTATUS STDCALL_FUNC +NTSTATUS STDCALL DebugOutDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { PIO_STACK_LOCATION piosStack = IoGetCurrentIrpStackLocation(Irp); @@ -83,10 +83,9 @@ DebugOutDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) return nErrCode; } -NTSTATUS STDCALL +VOID STDCALL DebugOutUnload(PDRIVER_OBJECT DriverObject) { - return STATUS_SUCCESS; } NTSTATUS STDCALL @@ -98,12 +97,12 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) NTSTATUS Status; /* register driver routines */ - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH) DebugOutDispatch; - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH) DebugOutDispatch; - DriverObject->MajorFunction[IRP_MJ_WRITE] = (PDRIVER_DISPATCH) DebugOutDispatch; - DriverObject->MajorFunction[IRP_MJ_READ] = (PDRIVER_DISPATCH) DebugOutDispatch; - /* DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = (PDRIVER_DISPATCH) DebugOutDispatch; */ - DriverObject->DriverUnload = (PDRIVER_UNLOAD) DebugOutUnload; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = DebugOutDispatch; + DriverObject->MajorFunction[IRP_MJ_CREATE] = DebugOutDispatch; + DriverObject->MajorFunction[IRP_MJ_WRITE] = DebugOutDispatch; + DriverObject->MajorFunction[IRP_MJ_READ] = DebugOutDispatch; + /* DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = DebugOutDispatch; */ + DriverObject->DriverUnload = DebugOutUnload; /* create device */ RtlRosInitUnicodeStringFromLiteral(&DeviceName, L"\\Device\\DebugOut"); diff --git a/reactos/drivers/dd/floppy/floppy.c b/reactos/drivers/dd/floppy/floppy.c index 72b227ff85e..17ca0f6b2be 100644 --- a/reactos/drivers/dd/floppy/floppy.c +++ b/reactos/drivers/dd/floppy/floppy.c @@ -588,12 +588,11 @@ DriverEntry (IN PDRIVER_OBJECT DriverObject, DPRINT ("Floppy driver\n"); /* Export other driver entry points... */ - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)FloppyDispatchOpenClose; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH)FloppyDispatchOpenClose; - DriverObject->MajorFunction[IRP_MJ_READ] = (PDRIVER_DISPATCH)FloppyDispatchReadWrite; - DriverObject->MajorFunction[IRP_MJ_WRITE] = (PDRIVER_DISPATCH)FloppyDispatchReadWrite; - DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = - (PDRIVER_DISPATCH)FloppyDispatchDeviceControl; + DriverObject->MajorFunction[IRP_MJ_CREATE] = FloppyDispatchOpenClose; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = FloppyDispatchOpenClose; + DriverObject->MajorFunction[IRP_MJ_READ] = FloppyDispatchReadWrite; + DriverObject->MajorFunction[IRP_MJ_WRITE] = FloppyDispatchReadWrite; + DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = FloppyDispatchDeviceControl; /* Try to detect controller and abort if it fails */ if (!FloppyCreateController (DriverObject, diff --git a/reactos/drivers/dd/ide/ide.c b/reactos/drivers/dd/ide/ide.c index 97b12c3f80c..69945a163c1 100644 --- a/reactos/drivers/dd/ide/ide.c +++ b/reactos/drivers/dd/ide/ide.c @@ -1,4 +1,4 @@ -/* $Id: ide.c,v 1.59 2003/09/20 20:12:43 weiden Exp $ +/* $Id: ide.c,v 1.60 2004/02/10 16:22:55 navaraf Exp $ * * IDE.C - IDE Disk driver * written by Rex Jolliff @@ -268,7 +268,6 @@ IdeFindControllers(IN PDRIVER_OBJECT DriverObject) ULONG Bus; ULONG Slot; ULONG Size; - ULONG i; NTSTATUS ReturnedStatus = STATUS_NO_SUCH_DEVICE; NTSTATUS Status; INT ControllerIdx = 0; @@ -661,7 +660,6 @@ IDECreateDevices(IN PDRIVER_OBJECT DriverObject, IDE_DRIVE_IDENTIFY DrvParms; PDEVICE_OBJECT DiskDeviceObject; PDEVICE_OBJECT PartitionDeviceObject; - PIDE_DEVICE_EXTENSION DiskDeviceExtension; UNICODE_STRING UnicodeDeviceDirName; OBJECT_ATTRIBUTES DeviceDirAttributes; HANDLE Handle; @@ -1578,7 +1576,7 @@ STDCALL IDEStartIo(IN PDEVICE_OBJECT DeviceObject, default: Irp->IoStatus.Status = STATUS_NOT_SUPPORTED; Irp->IoStatus.Information = 0; - KEBUGCHECK((ULONG)Irp); + KeBugCheck((ULONG)Irp); IoCompleteRequest(Irp, IO_NO_INCREMENT); IoStartNextPacket(DeviceObject, FALSE); break; diff --git a/reactos/drivers/dd/mpu401/mpu401.c b/reactos/drivers/dd/mpu401/mpu401.c index 705beb47366..5792ddcfbae 100644 --- a/reactos/drivers/dd/mpu401/mpu401.c +++ b/reactos/drivers/dd/mpu401/mpu401.c @@ -348,11 +348,10 @@ MPU401DeviceControl(PDEVICE_OBJECT DeviceObject, } -static NTSTATUS STDCALL +static VOID STDCALL MPU401Unload(PDRIVER_OBJECT DriverObject) { DPRINT("MPU401Unload() called!\n"); - return(STATUS_SUCCESS); } @@ -382,11 +381,11 @@ DriverEntry(PDRIVER_OBJECT DriverObject, // DeviceExtension->RegistryPath = RegistryPath; DriverObject->Flags = 0; - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)MPU401Create; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH)MPU401Close; - DriverObject->MajorFunction[IRP_MJ_CLEANUP] = (PDRIVER_DISPATCH)MPU401Cleanup; - DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = (PDRIVER_DISPATCH)MPU401DeviceControl; - DriverObject->DriverUnload = (PDRIVER_UNLOAD)MPU401Unload; + DriverObject->MajorFunction[IRP_MJ_CREATE] = MPU401Create; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = MPU401Close; + DriverObject->MajorFunction[IRP_MJ_CLEANUP] = MPU401Cleanup; + DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = MPU401DeviceControl; + DriverObject->DriverUnload = MPU401Unload; // Major hack to just get this damn thing working: Status = InitDevice(RegistryPath, DriverObject); // ???? diff --git a/reactos/drivers/dd/mpu401/mpu401.h b/reactos/drivers/dd/mpu401/mpu401.h index 454750c229e..048efffded5 100644 --- a/reactos/drivers/dd/mpu401/mpu401.h +++ b/reactos/drivers/dd/mpu401/mpu401.h @@ -128,13 +128,13 @@ BOOLEAN InitUARTMode(UINT BasePort); Prototypes for functions in settings.c : */ -NTSTATUS EnumDeviceKeys( +NTSTATUS STDCALL EnumDeviceKeys( IN PUNICODE_STRING RegistryPath, IN PWSTR SubKey, IN PREGISTRY_CALLBACK_ROUTINE Callback, IN PVOID Context); -NTSTATUS LoadSettings( +NTSTATUS STDCALL LoadSettings( IN PWSTR ValueName, IN ULONG ValueType, IN PVOID ValueData, diff --git a/reactos/drivers/dd/mpu401/settings.c b/reactos/drivers/dd/mpu401/settings.c index 0625489b88a..6724a8bc4ab 100644 --- a/reactos/drivers/dd/mpu401/settings.c +++ b/reactos/drivers/dd/mpu401/settings.c @@ -71,7 +71,7 @@ OpenDevicesKey( -NTSTATUS EnumDeviceKeys( +NTSTATUS STDCALL EnumDeviceKeys( IN PUNICODE_STRING RegistryPath, IN PWSTR SubKey, IN PREGISTRY_CALLBACK_ROUTINE Callback, @@ -231,7 +231,7 @@ NTSTATUS EnumDeviceKeys( -NTSTATUS LoadSettings( +NTSTATUS STDCALL LoadSettings( IN PWSTR ValueName, IN ULONG ValueType, IN PVOID ValueData, diff --git a/reactos/drivers/dd/null/null.c b/reactos/drivers/dd/null/null.c index 61400516f31..d5575508882 100644 --- a/reactos/drivers/dd/null/null.c +++ b/reactos/drivers/dd/null/null.c @@ -1,4 +1,4 @@ -/* $Id: null.c,v 1.12 2003/11/17 02:12:49 hyperion Exp $ +/* $Id: null.c,v 1.13 2004/02/10 16:22:55 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -91,10 +91,9 @@ NullDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) return (nErrCode); } -NTSTATUS STDCALL +VOID STDCALL NullUnload(PDRIVER_OBJECT DriverObject) { - return(STATUS_SUCCESS); } NTSTATUS STDCALL @@ -106,12 +105,12 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) NTSTATUS nErrCode; /* register driver routines */ - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH)NullDispatch; - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)NullDispatch; - DriverObject->MajorFunction[IRP_MJ_WRITE] = (PDRIVER_DISPATCH)NullDispatch; - DriverObject->MajorFunction[IRP_MJ_READ] = (PDRIVER_DISPATCH)NullDispatch; - /* DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = (PDRIVER_DISPATCH)NullDispatch; */ - DriverObject->DriverUnload = (PDRIVER_UNLOAD)NullUnload; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = NullDispatch; + DriverObject->MajorFunction[IRP_MJ_CREATE] = NullDispatch; + DriverObject->MajorFunction[IRP_MJ_WRITE] = NullDispatch; + DriverObject->MajorFunction[IRP_MJ_READ] = NullDispatch; + /* DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = NullDispatch; */ + DriverObject->DriverUnload = NullUnload; /* create null device */ RtlRosInitUnicodeStringFromLiteral(&wstrDeviceName, L"\\Device\\Null"); diff --git a/reactos/drivers/dd/parallel/parallel.c b/reactos/drivers/dd/parallel/parallel.c index 23925a15f41..3d346cc6e00 100644 --- a/reactos/drivers/dd/parallel/parallel.c +++ b/reactos/drivers/dd/parallel/parallel.c @@ -1,4 +1,4 @@ -/* $Id: parallel.c,v 1.10 2003/11/17 02:12:49 hyperion Exp $ +/* $Id: parallel.c,v 1.11 2004/02/10 16:22:55 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -146,9 +146,9 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) } DeviceObject->Flags=0; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH)Dispatch; - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)Dispatch; - DriverObject->MajorFunction[IRP_MJ_WRITE] = (PDRIVER_DISPATCH)Dispatch; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = Dispatch; + DriverObject->MajorFunction[IRP_MJ_CREATE] = Dispatch; + DriverObject->MajorFunction[IRP_MJ_WRITE] = Dispatch; DriverObject->DriverUnload = NULL; return(STATUS_SUCCESS); diff --git a/reactos/drivers/dd/ramdrv/ramdrv.c b/reactos/drivers/dd/ramdrv/ramdrv.c index 37be0bb5dc9..66b798c4af9 100644 --- a/reactos/drivers/dd/ramdrv/ramdrv.c +++ b/reactos/drivers/dd/ramdrv/ramdrv.c @@ -102,11 +102,11 @@ NTSTATUS STDCALL DriverEntry(IN PDRIVER_OBJECT DriverObject, DPRINT("Ramdisk driver\n"); /* Export other driver entry points... */ - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)RamdrvDispatchOpenClose; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH)RamdrvDispatchOpenClose; - DriverObject->MajorFunction[IRP_MJ_READ] = (PDRIVER_DISPATCH)RamdrvDispatchReadWrite; - DriverObject->MajorFunction[IRP_MJ_WRITE] = (PDRIVER_DISPATCH)RamdrvDispatchReadWrite; - DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = (PDRIVER_DISPATCH)RamdrvDispatchDeviceControl; + DriverObject->MajorFunction[IRP_MJ_CREATE] = RamdrvDispatchOpenClose; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = RamdrvDispatchOpenClose; + DriverObject->MajorFunction[IRP_MJ_READ] = RamdrvDispatchReadWrite; + DriverObject->MajorFunction[IRP_MJ_WRITE] = RamdrvDispatchReadWrite; + DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = RamdrvDispatchDeviceControl; // create device and symbolic link diff --git a/reactos/drivers/dd/sdisk/sdisk.c b/reactos/drivers/dd/sdisk/sdisk.c index c077f2dfa70..d9635ffc515 100644 --- a/reactos/drivers/dd/sdisk/sdisk.c +++ b/reactos/drivers/dd/sdisk/sdisk.c @@ -24,7 +24,8 @@ static VOID SdWriteOffset(ULONG Offset) outl_p(PORT,Offset); } -NTSTATUS Dispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) +NTSTATUS STDCALL +Dispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) /* * FUNCTION: Handles user mode requests * ARGUMENTS: diff --git a/reactos/drivers/dd/sndblst/dma.c b/reactos/drivers/dd/sndblst/dma.c index fe1c8b0fe61..3638f4fb308 100644 --- a/reactos/drivers/dd/sndblst/dma.c +++ b/reactos/drivers/dd/sndblst/dma.c @@ -36,7 +36,7 @@ BOOLEAN CheckDMA(PDEVICE_EXTENSION Device) } -IO_ALLOCATION_ACTION SoundProgramDMA( +IO_ALLOCATION_ACTION STDCALL SoundProgramDMA( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID MapRegisterBase, diff --git a/reactos/drivers/dd/sndblst/settings.c b/reactos/drivers/dd/sndblst/settings.c index fbccc5cfdf5..e6783fd6118 100644 --- a/reactos/drivers/dd/sndblst/settings.c +++ b/reactos/drivers/dd/sndblst/settings.c @@ -71,7 +71,7 @@ OpenDevicesKey( -NTSTATUS EnumDeviceKeys( +NTSTATUS STDCALL EnumDeviceKeys( IN PUNICODE_STRING RegistryPath, IN PWSTR SubKey, IN PREGISTRY_CALLBACK_ROUTINE Callback, @@ -231,7 +231,7 @@ NTSTATUS EnumDeviceKeys( -NTSTATUS LoadSettings( +NTSTATUS STDCALL LoadSettings( IN PWSTR ValueName, IN ULONG ValueType, IN PVOID ValueData, diff --git a/reactos/drivers/dd/sndblst/sndblst.c b/reactos/drivers/dd/sndblst/sndblst.c index c4ec5f6cf24..1d4c8407c2f 100644 --- a/reactos/drivers/dd/sndblst/sndblst.c +++ b/reactos/drivers/dd/sndblst/sndblst.c @@ -368,11 +368,10 @@ BlasterDeviceControl(PDEVICE_OBJECT DeviceObject, } -static NTSTATUS STDCALL +static VOID STDCALL BlasterUnload(PDRIVER_OBJECT DriverObject) { DPRINT("BlasterUnload() called!\n"); - return(STATUS_SUCCESS); } @@ -401,14 +400,14 @@ DriverEntry(PDRIVER_OBJECT DriverObject, // DeviceExtension->RegistryPath = RegistryPath; DriverObject->Flags = 0; - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)BlasterCreate; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH)BlasterClose; - DriverObject->MajorFunction[IRP_MJ_CLEANUP] = (PDRIVER_DISPATCH)BlasterCleanup; - DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = (PDRIVER_DISPATCH)BlasterDeviceControl; - DriverObject->DriverUnload = (PDRIVER_UNLOAD)BlasterUnload; + DriverObject->MajorFunction[IRP_MJ_CREATE] = BlasterCreate; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = BlasterClose; + DriverObject->MajorFunction[IRP_MJ_CLEANUP] = BlasterCleanup; + DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = BlasterDeviceControl; + DriverObject->DriverUnload = BlasterUnload; // Major hack to just get this damn thing working: - Status = InitDevice(RegistryPath, DriverObject); // ???? + Status = InitDevice(RegistryPath->Buffer, DriverObject); // ???? // DPRINT("Enumerating devices at %wZ\n", RegistryPath); diff --git a/reactos/drivers/dd/sndblst/sndblst.h b/reactos/drivers/dd/sndblst/sndblst.h index 50a7cc36058..d3a0a267299 100644 --- a/reactos/drivers/dd/sndblst/sndblst.h +++ b/reactos/drivers/dd/sndblst/sndblst.h @@ -144,13 +144,13 @@ WORD InitSoundCard(UINT BasePort); Prototypes for functions in settings.c : */ -NTSTATUS EnumDeviceKeys( +NTSTATUS STDCALL EnumDeviceKeys( IN PUNICODE_STRING RegistryPath, IN PWSTR SubKey, IN PREGISTRY_CALLBACK_ROUTINE Callback, IN PVOID Context); -NTSTATUS LoadSettings( +NTSTATUS STDCALL LoadSettings( IN PWSTR ValueName, IN ULONG ValueType, IN PVOID ValueData, diff --git a/reactos/drivers/dd/sound/sound.c b/reactos/drivers/dd/sound/sound.c index 886e5790d1f..051e14a3791 100644 --- a/reactos/drivers/dd/sound/sound.c +++ b/reactos/drivers/dd/sound/sound.c @@ -26,7 +26,7 @@ SB16 sb16; sb_status sb16_getenvironment(void); -NTSTATUS Dispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) +NTSTATUS STDCALL Dispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) /* * FUNCTION: Handles user mode requests * ARGUMENTS: diff --git a/reactos/drivers/dd/test/test.c b/reactos/drivers/dd/test/test.c index 85398a1af29..3285267bfd2 100644 --- a/reactos/drivers/dd/test/test.c +++ b/reactos/drivers/dd/test/test.c @@ -17,7 +17,7 @@ #if 0 -NTSTATUS TestWrite(PIRP Irp, PIO_STACK_LOCATION Stk) +NTSTATUS STDCALL TestWrite(PIRP Irp, PIO_STACK_LOCATION Stk) { PVOID Address; @@ -26,7 +26,7 @@ NTSTATUS TestWrite(PIRP Irp, PIO_STACK_LOCATION Stk) return(STATUS_SUCCESS); } -NTSTATUS TestDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) +NTSTATUS STDCALL TestDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) /* * FUNCTION: Handles user mode requests * ARGUMENTS: diff --git a/reactos/drivers/fs/cdfs/cdfs.c b/reactos/drivers/fs/cdfs/cdfs.c index 346047c01e9..6a3f379ad0e 100644 --- a/reactos/drivers/fs/cdfs/cdfs.c +++ b/reactos/drivers/fs/cdfs/cdfs.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: cdfs.c,v 1.11 2003/11/17 02:12:49 hyperion Exp $ +/* $Id: cdfs.c,v 1.12 2004/02/10 16:22:55 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -82,23 +82,23 @@ DriverEntry(PDRIVER_OBJECT DriverObject, /* Initialize driver data */ DeviceObject->Flags = DO_DIRECT_IO; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH)CdfsClose; - DriverObject->MajorFunction[IRP_MJ_CLEANUP] = (PDRIVER_DISPATCH)CdfsCleanup; - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)CdfsCreate; - DriverObject->MajorFunction[IRP_MJ_READ] = (PDRIVER_DISPATCH)CdfsRead; - DriverObject->MajorFunction[IRP_MJ_WRITE] = (PDRIVER_DISPATCH)CdfsWrite; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = CdfsClose; + DriverObject->MajorFunction[IRP_MJ_CLEANUP] = CdfsCleanup; + DriverObject->MajorFunction[IRP_MJ_CREATE] = CdfsCreate; + DriverObject->MajorFunction[IRP_MJ_READ] = CdfsRead; + DriverObject->MajorFunction[IRP_MJ_WRITE] = CdfsWrite; DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = - (PDRIVER_DISPATCH)CdfsFileSystemControl; + CdfsFileSystemControl; DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] = - (PDRIVER_DISPATCH)CdfsDirectoryControl; + CdfsDirectoryControl; DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = - (PDRIVER_DISPATCH)CdfsQueryInformation; + CdfsQueryInformation; DriverObject->MajorFunction[IRP_MJ_SET_INFORMATION] = - (PDRIVER_DISPATCH)CdfsSetInformation; + CdfsSetInformation; DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] = - (PDRIVER_DISPATCH)CdfsQueryVolumeInformation; + CdfsQueryVolumeInformation; DriverObject->MajorFunction[IRP_MJ_SET_VOLUME_INFORMATION] = - (PDRIVER_DISPATCH)CdfsSetVolumeInformation; + CdfsSetVolumeInformation; DriverObject->DriverUnload = NULL; diff --git a/reactos/drivers/fs/fs_rec/fs_rec.c b/reactos/drivers/fs/fs_rec/fs_rec.c index d01cd2849b1..26d08e2afa9 100644 --- a/reactos/drivers/fs/fs_rec/fs_rec.c +++ b/reactos/drivers/fs/fs_rec/fs_rec.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: fs_rec.c,v 1.7 2003/09/20 20:31:57 weiden Exp $ +/* $Id: fs_rec.c,v 1.8 2004/02/10 16:22:56 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -200,11 +200,11 @@ DriverEntry(PDRIVER_OBJECT DriverObject, DeviceCount = 0; - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)FsRecCreate; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH)FsRecClose; - DriverObject->MajorFunction[IRP_MJ_CLEANUP] = (PDRIVER_DISPATCH)FsRecClose; - DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = (PDRIVER_DISPATCH)FsRecFsControl; - DriverObject->DriverUnload = (PDRIVER_UNLOAD)FsRecUnload; + DriverObject->MajorFunction[IRP_MJ_CREATE] = FsRecCreate; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = FsRecClose; + DriverObject->MajorFunction[IRP_MJ_CLEANUP] = FsRecClose; + DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = FsRecFsControl; + DriverObject->DriverUnload = FsRecUnload; ConfigInfo = IoGetConfigurationInformation(); diff --git a/reactos/drivers/fs/ms/msfs.c b/reactos/drivers/fs/ms/msfs.c index 16bbb999628..8ca52639ba5 100644 --- a/reactos/drivers/fs/ms/msfs.c +++ b/reactos/drivers/fs/ms/msfs.c @@ -1,4 +1,4 @@ -/* $Id: msfs.c,v 1.6 2003/09/20 20:31:57 weiden Exp $ +/* $Id: msfs.c,v 1.7 2004/02/10 16:22:56 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -30,26 +30,26 @@ DriverEntry(PDRIVER_OBJECT DriverObject, DbgPrint("Mailslot FSD 0.0.1\n"); DriverObject->Flags = 0; - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)MsfsCreate; + DriverObject->MajorFunction[IRP_MJ_CREATE] = MsfsCreate; DriverObject->MajorFunction[IRP_MJ_CREATE_MAILSLOT] = - (PDRIVER_DISPATCH)MsfsCreateMailslot; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH)MsfsClose; - DriverObject->MajorFunction[IRP_MJ_READ] = (PDRIVER_DISPATCH)MsfsRead; - DriverObject->MajorFunction[IRP_MJ_WRITE] = (PDRIVER_DISPATCH)MsfsWrite; + MsfsCreateMailslot; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = MsfsClose; + DriverObject->MajorFunction[IRP_MJ_READ] = MsfsRead; + DriverObject->MajorFunction[IRP_MJ_WRITE] = MsfsWrite; DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = - (PDRIVER_DISPATCH)MsfsQueryInformation; + MsfsQueryInformation; DriverObject->MajorFunction[IRP_MJ_SET_INFORMATION] = - (PDRIVER_DISPATCH)MsfsSetInformation; + MsfsSetInformation; // DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] = -// (PDRIVER_DISPATCH)MsfsDirectoryControl; -// DriverObject->MajorFunction[IRP_MJ_FLUSH_BUFFERS] = (PDRIVER_DISPATCH)MsfsFlushBuffers; -// DriverObject->MajorFunction[IRP_MJ_SHUTDOWN] = (PDRIVER_DISPATCH)MsfsShutdown; +// MsfsDirectoryControl; +// DriverObject->MajorFunction[IRP_MJ_FLUSH_BUFFERS] = MsfsFlushBuffers; +// DriverObject->MajorFunction[IRP_MJ_SHUTDOWN] = MsfsShutdown; // DriverObject->MajorFunction[IRP_MJ_QUERY_SECURITY] = -// (PDRIVER_DISPATCH)MsfsQuerySecurity; +// MsfsQuerySecurity; // DriverObject->MajorFunction[IRP_MJ_SET_SECURITY] = -// (PDRIVER_DISPATCH)MsfsSetSecurity; +// MsfsSetSecurity; DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = - (PDRIVER_DISPATCH)MsfsFileSystemControl; + MsfsFileSystemControl; DriverObject->DriverUnload = NULL; diff --git a/reactos/drivers/fs/mup/mup.c b/reactos/drivers/fs/mup/mup.c index b0875567bd4..1342001cff9 100644 --- a/reactos/drivers/fs/mup/mup.c +++ b/reactos/drivers/fs/mup/mup.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: mup.c,v 1.2 2003/09/20 22:44:21 weiden Exp $ +/* $Id: mup.c,v 1.3 2004/02/10 16:22:56 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -73,22 +73,22 @@ DriverEntry(PDRIVER_OBJECT DriverObject, /* Initialize driver data */ DeviceObject->Flags = DO_DIRECT_IO; -// DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH)NtfsClose; - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)MupCreate; - DriverObject->MajorFunction[IRP_MJ_CREATE_NAMED_PIPE] = (PDRIVER_DISPATCH)MupCreate; - DriverObject->MajorFunction[IRP_MJ_CREATE_MAILSLOT] = (PDRIVER_DISPATCH)MupCreate; -// DriverObject->MajorFunction[IRP_MJ_READ] = (PDRIVER_DISPATCH)NtfsRead; -// DriverObject->MajorFunction[IRP_MJ_WRITE] = (PDRIVER_DISPATCH)NtfsWrite; +// DriverObject->MajorFunction[IRP_MJ_CLOSE] = NtfsClose; + DriverObject->MajorFunction[IRP_MJ_CREATE] = MupCreate; + DriverObject->MajorFunction[IRP_MJ_CREATE_NAMED_PIPE] = MupCreate; + DriverObject->MajorFunction[IRP_MJ_CREATE_MAILSLOT] = MupCreate; +// DriverObject->MajorFunction[IRP_MJ_READ] = NtfsRead; +// DriverObject->MajorFunction[IRP_MJ_WRITE] = NtfsWrite; // DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = -// (PDRIVER_DISPATCH)NtfsFileSystemControl; +// NtfsFileSystemControl; // DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] = -// (PDRIVER_DISPATCH)NtfsDirectoryControl; +// NtfsDirectoryControl; // DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = -// (PDRIVER_DISPATCH)NtfsQueryInformation; +// NtfsQueryInformation; // DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] = -// (PDRIVER_DISPATCH)NtfsQueryVolumeInformation; +// NtfsQueryVolumeInformation; // DriverObject->MajorFunction[IRP_MJ_SET_VOLUME_INFORMATION] = -// (PDRIVER_DISPATCH)NtfsSetVolumeInformation; +// NtfsSetVolumeInformation; DriverObject->DriverUnload = NULL; diff --git a/reactos/drivers/fs/np/npfs.c b/reactos/drivers/fs/np/npfs.c index dc4122333e3..ebfceb7ce3f 100644 --- a/reactos/drivers/fs/np/npfs.c +++ b/reactos/drivers/fs/np/npfs.c @@ -1,4 +1,4 @@ -/* $Id: npfs.c,v 1.7 2003/09/20 20:31:57 weiden Exp $ +/* $Id: npfs.c,v 1.8 2004/02/10 16:22:56 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -28,28 +28,28 @@ DriverEntry(PDRIVER_OBJECT DriverObject, DbgPrint("Named Pipe FSD 0.0.2\n"); - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)NpfsCreate; + DriverObject->MajorFunction[IRP_MJ_CREATE] = NpfsCreate; DriverObject->MajorFunction[IRP_MJ_CREATE_NAMED_PIPE] = - (PDRIVER_DISPATCH)NpfsCreateNamedPipe; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH)NpfsClose; - DriverObject->MajorFunction[IRP_MJ_READ] = (PDRIVER_DISPATCH)NpfsRead; - DriverObject->MajorFunction[IRP_MJ_WRITE] = (PDRIVER_DISPATCH)NpfsWrite; + NpfsCreateNamedPipe; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = NpfsClose; + DriverObject->MajorFunction[IRP_MJ_READ] = NpfsRead; + DriverObject->MajorFunction[IRP_MJ_WRITE] = NpfsWrite; DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = - (PDRIVER_DISPATCH)NpfsQueryInformation; + NpfsQueryInformation; DriverObject->MajorFunction[IRP_MJ_SET_INFORMATION] = - (PDRIVER_DISPATCH)NpfsSetInformation; + NpfsSetInformation; DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] = - (PDRIVER_DISPATCH)NpfsQueryVolumeInformation; -// DriverObject->MajorFunction[IRP_MJ_CLEANUP] = (PDRIVER_DISPATCH)NpfsCleanup; -// DriverObject->MajorFunction[IRP_MJ_FLUSH_BUFFERS] = (PDRIVER_DISPATCH)NpfsFlushBuffers; + NpfsQueryVolumeInformation; +// DriverObject->MajorFunction[IRP_MJ_CLEANUP] = NpfsCleanup; +// DriverObject->MajorFunction[IRP_MJ_FLUSH_BUFFERS] = NpfsFlushBuffers; // DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] = -// (PDRIVER_DISPATCH)NpfsDirectoryControl; +// NpfsDirectoryControl; DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = - (PDRIVER_DISPATCH)NpfsFileSystemControl; + NpfsFileSystemControl; // DriverObject->MajorFunction[IRP_MJ_QUERY_SECURITY] = -// (PDRIVER_DISPATCH)NpfsQuerySecurity; +// NpfsQuerySecurity; // DriverObject->MajorFunction[IRP_MJ_SET_SECURITY] = -// (PDRIVER_DISPATCH)NpfsSetSecurity; +// NpfsSetSecurity; DriverObject->DriverUnload = NULL; diff --git a/reactos/drivers/fs/ntfs/ntfs.c b/reactos/drivers/fs/ntfs/ntfs.c index bfdc305457b..dea8bec382a 100644 --- a/reactos/drivers/fs/ntfs/ntfs.c +++ b/reactos/drivers/fs/ntfs/ntfs.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: ntfs.c,v 1.4 2003/11/17 02:12:49 hyperion Exp $ +/* $Id: ntfs.c,v 1.5 2004/02/10 16:22:56 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -81,20 +81,20 @@ DriverEntry(PDRIVER_OBJECT DriverObject, /* Initialize driver data */ DeviceObject->Flags = DO_DIRECT_IO; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH) NtfsClose; - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH) NtfsCreate; - DriverObject->MajorFunction[IRP_MJ_READ] = (PDRIVER_DISPATCH) NtfsRead; - DriverObject->MajorFunction[IRP_MJ_WRITE] = (PDRIVER_DISPATCH) NtfsWrite; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = NtfsClose; + DriverObject->MajorFunction[IRP_MJ_CREATE] = NtfsCreate; + DriverObject->MajorFunction[IRP_MJ_READ] = NtfsRead; + DriverObject->MajorFunction[IRP_MJ_WRITE] = NtfsWrite; DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = - (PDRIVER_DISPATCH) NtfsFileSystemControl; + NtfsFileSystemControl; DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] = - (PDRIVER_DISPATCH) NtfsDirectoryControl; + NtfsDirectoryControl; DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = - (PDRIVER_DISPATCH) NtfsQueryInformation; + NtfsQueryInformation; DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] = - (PDRIVER_DISPATCH) NtfsQueryVolumeInformation; + NtfsQueryVolumeInformation; DriverObject->MajorFunction[IRP_MJ_SET_VOLUME_INFORMATION] = - (PDRIVER_DISPATCH) NtfsSetVolumeInformation; + NtfsSetVolumeInformation; DriverObject->DriverUnload = NULL; diff --git a/reactos/drivers/fs/template/template.c b/reactos/drivers/fs/template/template.c index 71dbb52e668..1abb42c16fe 100644 --- a/reactos/drivers/fs/template/template.c +++ b/reactos/drivers/fs/template/template.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: template.c,v 1.5 2003/11/17 02:12:49 hyperion Exp $ +/* $Id: template.c,v 1.6 2004/02/10 16:22:56 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -45,7 +45,7 @@ static PDRIVER_OBJECT DriverObject; /* FUNCTIONS ****************************************************************/ -NTSTATUS +NTSTATUS STDCALL FsdCloseFile(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject) /* @@ -56,7 +56,7 @@ FsdCloseFile(PDEVICE_EXTENSION DeviceExt, } -NTSTATUS +NTSTATUS STDCALL FsdOpenFile(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject, PWSTR FileName) @@ -68,7 +68,7 @@ FsdOpenFile(PDEVICE_EXTENSION DeviceExt, } -BOOLEAN +BOOLEAN STDCALL FsdHasFileSystem(PDEVICE_OBJECT DeviceToMount) /* * FUNCTION: Tests if the device contains a filesystem that can be mounted @@ -79,7 +79,7 @@ FsdHasFileSystem(PDEVICE_OBJECT DeviceToMount) } -NTSTATUS +NTSTATUS STDCALL FsdMountDevice(PDEVICE_EXTENSION DeviceExt, PDEVICE_OBJECT DeviceToMount) /* @@ -90,7 +90,7 @@ FsdMountDevice(PDEVICE_EXTENSION DeviceExt, } -NTSTATUS +NTSTATUS STDCALL FsdReadFile(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject, PVOID Buffer, diff --git a/reactos/drivers/fs/vfat/iface.c b/reactos/drivers/fs/vfat/iface.c index f1a2b4c769f..7c6ddcb8cbb 100644 --- a/reactos/drivers/fs/vfat/iface.c +++ b/reactos/drivers/fs/vfat/iface.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: iface.c,v 1.73 2003/11/17 02:12:49 hyperion Exp $ +/* $Id: iface.c,v 1.74 2004/02/10 16:22:56 navaraf Exp $ * * PROJECT: ReactOS kernel * FILE: drivers/fs/vfat/iface.c @@ -73,22 +73,22 @@ DriverEntry(PDRIVER_OBJECT DriverObject, VfatGlobalData->DeviceObject = DeviceObject; DeviceObject->Flags = DO_DIRECT_IO; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH)VfatBuildRequest; - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)VfatBuildRequest; - DriverObject->MajorFunction[IRP_MJ_READ] = (PDRIVER_DISPATCH)VfatBuildRequest; - DriverObject->MajorFunction[IRP_MJ_WRITE] = (PDRIVER_DISPATCH)VfatBuildRequest; - DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = (PDRIVER_DISPATCH)VfatBuildRequest; - DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = (PDRIVER_DISPATCH)VfatBuildRequest; - DriverObject->MajorFunction[IRP_MJ_SET_INFORMATION] = (PDRIVER_DISPATCH)VfatBuildRequest; - DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] = (PDRIVER_DISPATCH)VfatBuildRequest; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = VfatBuildRequest; + DriverObject->MajorFunction[IRP_MJ_CREATE] = VfatBuildRequest; + DriverObject->MajorFunction[IRP_MJ_READ] = VfatBuildRequest; + DriverObject->MajorFunction[IRP_MJ_WRITE] = VfatBuildRequest; + DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = VfatBuildRequest; + DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = VfatBuildRequest; + DriverObject->MajorFunction[IRP_MJ_SET_INFORMATION] = VfatBuildRequest; + DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] = VfatBuildRequest; DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] = - (PDRIVER_DISPATCH)VfatBuildRequest; + VfatBuildRequest; DriverObject->MajorFunction[IRP_MJ_SET_VOLUME_INFORMATION] = - (PDRIVER_DISPATCH)VfatBuildRequest; - DriverObject->MajorFunction[IRP_MJ_SHUTDOWN] = (PDRIVER_DISPATCH)VfatShutdown; - DriverObject->MajorFunction[IRP_MJ_LOCK_CONTROL] = (PDRIVER_DISPATCH)VfatBuildRequest; - DriverObject->MajorFunction[IRP_MJ_CLEANUP] = (PDRIVER_DISPATCH)VfatBuildRequest; - DriverObject->MajorFunction[IRP_MJ_FLUSH_BUFFERS] = (PDRIVER_DISPATCH)VfatBuildRequest; + VfatBuildRequest; + DriverObject->MajorFunction[IRP_MJ_SHUTDOWN] = VfatShutdown; + DriverObject->MajorFunction[IRP_MJ_LOCK_CONTROL] = VfatBuildRequest; + DriverObject->MajorFunction[IRP_MJ_CLEANUP] = VfatBuildRequest; + DriverObject->MajorFunction[IRP_MJ_FLUSH_BUFFERS] = VfatBuildRequest; DriverObject->DriverUnload = NULL; diff --git a/reactos/drivers/input/keyboard/keyboard.c b/reactos/drivers/input/keyboard/keyboard.c index c9da120a250..d87d14201c5 100644 --- a/reactos/drivers/input/keyboard/keyboard.c +++ b/reactos/drivers/input/keyboard/keyboard.c @@ -730,7 +730,7 @@ VOID STDCALL KbdStartIo(PDEVICE_OBJECT DeviceObject, PIRP Irp) DPRINT("KeysRequired %d\n",KeysRequired); } -NTSTATUS KbdInternalDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) +NTSTATUS STDCALL KbdInternalDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { PIO_STACK_LOCATION stk; PINTERNAL_I8042_HOOK_KEYBOARD hookKeyboard; @@ -848,11 +848,11 @@ NTSTATUS STDCALL DriverEntry(PDRIVER_OBJECT DriverObject, DPRINT("Keyboard Driver 0.0.4\n"); - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)KbdDispatch; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH)KbdDispatch; - DriverObject->MajorFunction[IRP_MJ_READ] = (PDRIVER_DISPATCH)KbdDispatch; + DriverObject->MajorFunction[IRP_MJ_CREATE] = KbdDispatch; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = KbdDispatch; + DriverObject->MajorFunction[IRP_MJ_READ] = KbdDispatch; DriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = - (PDRIVER_DISPATCH)KbdInternalDeviceControl; + KbdInternalDeviceControl; DriverObject->DriverStartIo = KbdStartIo; diff --git a/reactos/drivers/input/mouclass/mouclass.c b/reactos/drivers/input/mouclass/mouclass.c index 59ea47ee711..23359018176 100644 --- a/reactos/drivers/input/mouclass/mouclass.c +++ b/reactos/drivers/input/mouclass/mouclass.c @@ -189,7 +189,7 @@ NTSTATUS ConnectMousePortDriver(PDEVICE_OBJECT ClassDeviceObject) return ioStatus.Status; } -NTSTATUS STDCALL_FUNC MouseClassDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) +NTSTATUS STDCALL MouseClassDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) { PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp); NTSTATUS Status; @@ -280,7 +280,7 @@ VOID MouseClassStartIo(PDEVICE_OBJECT DeviceObject, PIRP Irp) } } -NTSTATUS STDCALL_FUNC MouseClassInternalDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) +NTSTATUS STDCALL MouseClassInternalDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { // Retrieve GDI's callback @@ -331,11 +331,11 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) UNICODE_STRING SymlinkName = ROS_STRING_INITIALIZER(L"\\??\\MouseClass"); NTSTATUS Status; - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)MouseClassDispatch; -// DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH)MouseClassDispatch; -// DriverObject->MajorFunction[IRP_MJ_READ] = (PDRIVER_DISPATCH)MouseClassDispatch; - DriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = (PDRIVER_DISPATCH)MouseClassInternalDeviceControl; // to get GDI callback -// DriverObject->DriverStartIo = (PDRIVER_STARTIO)MouseClassStartIo; + DriverObject->MajorFunction[IRP_MJ_CREATE] = MouseClassDispatch; +// DriverObject->MajorFunction[IRP_MJ_CLOSE] = MouseClassDispatch; +// DriverObject->MajorFunction[IRP_MJ_READ] = MouseClassDispatch; + DriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = MouseClassInternalDeviceControl; // to get GDI callback +// DriverObject->DriverStartIo = MouseClassStartIo; Status = IoCreateDevice(DriverObject, sizeof(DEVICE_EXTENSION), diff --git a/reactos/drivers/input/psaux/psaux.c b/reactos/drivers/input/psaux/psaux.c index f467d905253..655a6d3f327 100644 --- a/reactos/drivers/input/psaux/psaux.c +++ b/reactos/drivers/input/psaux/psaux.c @@ -250,9 +250,9 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) return STATUS_UNSUCCESSFUL; } - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)PS2MouseDispatch; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH)PS2MouseDispatch; - DriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = (PDRIVER_DISPATCH)PS2MouseInternalDeviceControl; + DriverObject->MajorFunction[IRP_MJ_CREATE] = PS2MouseDispatch; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = PS2MouseDispatch; + DriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = PS2MouseInternalDeviceControl; DriverObject->DriverStartIo = PS2MouseStartIo; DeviceObject = AllocatePointerDevice(DriverObject); diff --git a/reactos/drivers/input/sermouse/sermouse.c b/reactos/drivers/input/sermouse/sermouse.c index 8dbb3374051..46b0bc58908 100644 --- a/reactos/drivers/input/sermouse/sermouse.c +++ b/reactos/drivers/input/sermouse/sermouse.c @@ -625,9 +625,9 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) return STATUS_UNSUCCESSFUL; } - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)SerialMouseDispatch; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH)SerialMouseDispatch; - DriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = (PDRIVER_DISPATCH)SerialMouseInternalDeviceControl; + DriverObject->MajorFunction[IRP_MJ_CREATE] = SerialMouseDispatch; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = SerialMouseDispatch; + DriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = SerialMouseInternalDeviceControl; DriverObject->DriverStartIo = SerialMouseStartIo; return STATUS_SUCCESS; diff --git a/reactos/drivers/net/ndis/ndis/main.c b/reactos/drivers/net/ndis/ndis/main.c index 5abe4f209f7..ff0d94b8938 100644 --- a/reactos/drivers/net/ndis/ndis/main.c +++ b/reactos/drivers/net/ndis/ndis/main.c @@ -27,7 +27,7 @@ extern KSPIN_LOCK OrphanAdapterListLock; extern LIST_ENTRY OrphanAdapterListHead; -VOID MainUnload( +VOID STDCALL MainUnload( PDRIVER_OBJECT DriverObject) /* * FUNCTION: Unloads the driver @@ -67,7 +67,7 @@ DriverEntry( InitializeListHead(&OrphanAdapterListHead); KeInitializeSpinLock(&OrphanAdapterListLock); - DriverObject->DriverUnload = (PDRIVER_UNLOAD)MainUnload; + DriverObject->DriverUnload = MainUnload; /* * until we have PNP support, query the enum key and NdisFindDevice() each one diff --git a/reactos/drivers/storage/class2/class2.c b/reactos/drivers/storage/class2/class2.c index 2610e9ff86e..707611d4e0a 100644 --- a/reactos/drivers/storage/class2/class2.c +++ b/reactos/drivers/storage/class2/class2.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: class2.c,v 1.47 2004/02/07 21:36:56 gvg Exp $ +/* $Id: class2.c,v 1.48 2004/02/10 16:22:56 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -900,14 +900,14 @@ ScsiClassInitialize(IN PVOID Argument1, DPRINT("ScsiClassInitialize() called!\n"); - DriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH)ScsiClassCreateClose; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH)ScsiClassCreateClose; - DriverObject->MajorFunction[IRP_MJ_READ] = (PDRIVER_DISPATCH)ScsiClassReadWrite; - DriverObject->MajorFunction[IRP_MJ_WRITE] = (PDRIVER_DISPATCH)ScsiClassReadWrite; - DriverObject->MajorFunction[IRP_MJ_SCSI] = (PDRIVER_DISPATCH)ScsiClassInternalIoControl; - DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = (PDRIVER_DISPATCH)ScsiClassDeviceDispatch; - DriverObject->MajorFunction[IRP_MJ_SHUTDOWN] = (PDRIVER_DISPATCH)ScsiClassShutdownFlush; - DriverObject->MajorFunction[IRP_MJ_FLUSH_BUFFERS] = (PDRIVER_DISPATCH)ScsiClassShutdownFlush; + DriverObject->MajorFunction[IRP_MJ_CREATE] = ScsiClassCreateClose; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = ScsiClassCreateClose; + DriverObject->MajorFunction[IRP_MJ_READ] = ScsiClassReadWrite; + DriverObject->MajorFunction[IRP_MJ_WRITE] = ScsiClassReadWrite; + DriverObject->MajorFunction[IRP_MJ_SCSI] = ScsiClassInternalIoControl; + DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = ScsiClassDeviceDispatch; + DriverObject->MajorFunction[IRP_MJ_SHUTDOWN] = ScsiClassShutdownFlush; + DriverObject->MajorFunction[IRP_MJ_FLUSH_BUFFERS] = ScsiClassShutdownFlush; if (InitializationData->ClassStartIo) { DriverObject->DriverStartIo = InitializationData->ClassStartIo; diff --git a/reactos/drivers/video/videoprt/videoprt.c b/reactos/drivers/video/videoprt/videoprt.c index 13e109017a3..0a22b17d1f3 100644 --- a/reactos/drivers/video/videoprt/videoprt.c +++ b/reactos/drivers/video/videoprt/videoprt.c @@ -18,7 +18,7 @@ * If not, write to the Free Software Foundation, * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * $Id: videoprt.c,v 1.1 2004/01/19 15:56:53 navaraf Exp $ + * $Id: videoprt.c,v 1.2 2004/02/10 16:22:56 navaraf Exp $ */ #include "videoprt.h" @@ -492,9 +492,9 @@ VideoPortInitialize(IN PVOID Context1, MPDriverObject->DeviceObject = MPDeviceObject; /* Initialize the miniport drivers dispatch table */ - MPDriverObject->MajorFunction[IRP_MJ_CREATE] = (PDRIVER_DISPATCH) VidDispatchOpen; - MPDriverObject->MajorFunction[IRP_MJ_CLOSE] = (PDRIVER_DISPATCH) VidDispatchClose; - MPDriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = (PDRIVER_DISPATCH) VidDispatchDeviceControl; + MPDriverObject->MajorFunction[IRP_MJ_CREATE] = VidDispatchOpen; + MPDriverObject->MajorFunction[IRP_MJ_CLOSE] = VidDispatchClose; + MPDriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = VidDispatchDeviceControl; /* Initialize our device extension */ DeviceExtension = diff --git a/reactos/include/afd/shared.h b/reactos/include/afd/shared.h index 953964b5d50..4cf68b107f1 100644 --- a/reactos/include/afd/shared.h +++ b/reactos/include/afd/shared.h @@ -65,6 +65,9 @@ typedef struct _AFD_SOCKET_INFORMATION { #define IOCTL_AFD_CONNECT \ AFD_CTL_CODE(10, METHOD_BUFFERED, FILE_ANY_ACCESS) +#define IOCTL_AFD_GETNAME \ + AFD_CTL_CODE(11, METHOD_BUFFERED, FILE_ANY_ACCESS) + typedef struct _FILE_REQUEST_BIND { SOCKADDR Name; @@ -197,6 +200,17 @@ typedef struct _FILE_REPLY_CONNECT { INT Status; } FILE_REPLY_CONNECT, *PFILE_REPLY_CONNECT; + +typedef struct _FILE_REQUEST_GETNAME { + BOOL Peer; +} FILE_REQUEST_GETNAME, *PFILE_REQUEST_GETNAME; + +typedef struct _FILE_REPLY_GETNAME { + INT Status; + SOCKADDR Name; + INT NameSize; +} FILE_REPLY_GETNAME, *PFILE_REPLY_GETNAME; + #include #endif /*__AFD_SHARED_H */ diff --git a/reactos/include/ddk/i386/pagesize.h b/reactos/include/ddk/i386/pagesize.h index 29787378e6c..5b0c14e2bf3 100644 --- a/reactos/include/ddk/i386/pagesize.h +++ b/reactos/include/ddk/i386/pagesize.h @@ -2,5 +2,6 @@ #define __INCLUDE_DDK_I386_PAGESIZE_H #define PAGE_SIZE (4096) +#define PAGE_SHIFT 12L #endif /* __INCLUDE_DDK_I386_PAGESIZE_H */ diff --git a/reactos/include/ddk/mmfuncs.h b/reactos/include/ddk/mmfuncs.h index 44f6930e431..21c2a33073d 100644 --- a/reactos/include/ddk/mmfuncs.h +++ b/reactos/include/ddk/mmfuncs.h @@ -1,6 +1,6 @@ #ifndef _INCLUDE_DDK_MMFUNCS_H #define _INCLUDE_DDK_MMFUNCS_H -/* $Id: mmfuncs.h,v 1.19 2003/12/31 05:33:03 jfilby Exp $ */ +/* $Id: mmfuncs.h,v 1.20 2004/02/10 16:22:56 navaraf Exp $ */ /* MEMORY MANAGMENT ******************************************************/ @@ -56,7 +56,8 @@ extern inline unsigned int ADDRESS_AND_SIZE_TO_SPAN_PAGES(PVOID Va, * FUNCTION: Takes a count in bytes and returns the number of pages * required to hold it */ -#define BYTES_TO_PAGES(size) (?) +#define BYTES_TO_PAGES(Size) \ + ((ULONG) ((ULONG_PTR) (Size) >> PAGE_SHIFT) + (((ULONG) (Size) & (PAGE_SIZE - 1)) != 0)) DWORD STDCALL diff --git a/reactos/include/ntos/haltypes.h b/reactos/include/ntos/haltypes.h index e467fd08653..4cfe4f951d9 100755 --- a/reactos/include/ntos/haltypes.h +++ b/reactos/include/ntos/haltypes.h @@ -1,4 +1,4 @@ -/* $Id: haltypes.h,v 1.5 2003/12/30 18:34:58 fireball Exp $ +/* $Id: haltypes.h,v 1.6 2004/02/10 16:22:56 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -13,13 +13,12 @@ #ifndef __INCLUDE_NTOS_HALTYPES_H #define __INCLUDE_NTOS_HALTYPES_H -#ifdef __GNUC__ -#define STDCALL_FUNC STDCALL -#define FASTCALL_FUNC FASTCALL -#else -#define STDCALL_FUNC(a) (__stdcall a ) -#define FASTCALL_FUNC(a) (__fastcall a ) -#endif /*__GNUC__*/ +#ifndef STDCALL_FUNC +#define STDCALL_FUNC(a) (STDCALL a) +#endif +#ifndef FASTCALL_FUNC +#define FASTCALL_FUNC(a) (FASTCALL a) +#endif #include "types.h" diff --git a/reactos/include/ntos/rtltypes.h b/reactos/include/ntos/rtltypes.h index cdf98872858..fc9723d9934 100755 --- a/reactos/include/ntos/rtltypes.h +++ b/reactos/include/ntos/rtltypes.h @@ -1,4 +1,4 @@ -/* $Id: rtltypes.h,v 1.12 2004/02/01 20:45:18 ekohl Exp $ +/* $Id: rtltypes.h,v 1.13 2004/02/10 16:22:56 navaraf Exp $ * */ @@ -73,12 +73,9 @@ typedef struct _RTL_BITMAP_RUN ULONG NumberOfBits; } RTL_BITMAP_RUN, *PRTL_BITMAP_RUN; -#ifdef __GNUC__ -#define STDCALL_FUNC STDCALL -#else -#define STDCALL_FUNC(a) (__stdcall a ) -#endif /*__GNUC__*/ - +#ifndef STDCALL_FUNC +#define STDCALL_FUNC(a) (STDCALL a) +#endif typedef NTSTATUS STDCALL_FUNC (*PRTL_QUERY_REGISTRY_ROUTINE) (PWSTR ValueName, diff --git a/reactos/include/ntos/types.h b/reactos/include/ntos/types.h index 5a968fb4474..95b73f3f5d8 100644 --- a/reactos/include/ntos/types.h +++ b/reactos/include/ntos/types.h @@ -19,11 +19,9 @@ #include -#ifdef __GNUC__ -#define STDCALL_FUNC STDCALL -#else -#define STDCALL_FUNC(a) (__stdcall a ) -#endif /*__GNUC__*/ +#ifndef STDCALL_FUNC +#define STDCALL_FUNC(a) (STDCALL a) +#endif /* Fixed precision types */ typedef signed char INT8, *PINT8; @@ -51,7 +49,7 @@ typedef short SHORT; #define STDCALL __stdcall #define CDECL __cdecl #endif -#define CALLBACK STDCALL_FUNC +#define CALLBACK STDCALL #define PASCAL WINAPI #else diff --git a/reactos/ntoskrnl/dbg/profile.c b/reactos/ntoskrnl/dbg/profile.c index b6e183547d6..3b7490c1d16 100755 --- a/reactos/ntoskrnl/dbg/profile.c +++ b/reactos/ntoskrnl/dbg/profile.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: profile.c,v 1.6 2003/10/12 17:05:44 hbirr Exp $ +/* $Id: profile.c,v 1.7 2004/02/10 16:22:57 navaraf Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/dbg/profile.c @@ -364,7 +364,7 @@ KdbProfilerAnalyzeSamples() return STATUS_SUCCESS; } -VOID STDCALL_FUNC +VOID STDCALL KdbProfilerThreadMain(PVOID Context) { for (;;)