diff --git a/reactos/boot.bat b/reactos/boot.bat index 79da34fa5d9..d3a4000be4c 100644 --- a/reactos/boot.bat +++ b/reactos/boot.bat @@ -1 +1 @@ -loadros ntoskrnl.exe ide.sys vfatfs.sys +loadros ntoskrnl.exe ide.sys vfatfs.sys diff --git a/reactos/drivers/dd/blue/blue.c b/reactos/drivers/dd/blue/blue.c index 875a23de39c..88ced919a47 100644 --- a/reactos/drivers/dd/blue/blue.c +++ b/reactos/drivers/dd/blue/blue.c @@ -1,4 +1,4 @@ -/* $Id: blue.c,v 1.26 2000/07/11 04:08:43 phreak Exp $ +/* $Id: blue.c,v 1.27 2000/09/12 10:12:12 jean Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -68,7 +68,7 @@ typedef struct _DEVICE_EXTENSION /* FUNCTIONS **************************************************************/ NTSTATUS -ScrCreate (PDEVICE_OBJECT DeviceObject, PIRP Irp) +STDCALL ScrCreate (PDEVICE_OBJECT DeviceObject, PIRP Irp) { PDEVICE_EXTENSION DeviceExtension; PHYSICAL_ADDRESS BaseAddress; @@ -120,6 +120,9 @@ ScrCreate (PDEVICE_OBJECT DeviceObject, PIRP Irp) /* calculate number of text rows */ DeviceExtension->Rows = DeviceExtension->Rows / DeviceExtension->ScanLines; +#ifdef BOCHS_30ROWS + DeviceExtension->Rows = 25; +#endif DPRINT ("%d Columns %d Rows %d Scanlines\n", DeviceExtension->Columns, @@ -154,7 +157,7 @@ ScrCreate (PDEVICE_OBJECT DeviceObject, PIRP Irp) NTSTATUS -ScrWrite (PDEVICE_OBJECT DeviceObject, PIRP Irp) +STDCALL ScrWrite (PDEVICE_OBJECT DeviceObject, PIRP Irp) { PIO_STACK_LOCATION stk = IoGetCurrentIrpStackLocation (Irp); PDEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension; @@ -278,7 +281,7 @@ ScrWrite (PDEVICE_OBJECT DeviceObject, PIRP Irp) NTSTATUS -ScrIoControl (PDEVICE_OBJECT DeviceObject, PIRP Irp) +STDCALL ScrIoControl (PDEVICE_OBJECT DeviceObject, PIRP Irp) { PIO_STACK_LOCATION stk = IoGetCurrentIrpStackLocation (Irp); PDEVICE_EXTENSION DeviceExtension; @@ -574,7 +577,7 @@ ScrIoControl (PDEVICE_OBJECT DeviceObject, PIRP Irp) NTSTATUS -ScrDispatch (PDEVICE_OBJECT DeviceObject, PIRP Irp) +STDCALL ScrDispatch (PDEVICE_OBJECT DeviceObject, PIRP Irp) { PIO_STACK_LOCATION stk = IoGetCurrentIrpStackLocation(Irp); NTSTATUS Status; diff --git a/reactos/drivers/dd/blue/makefile b/reactos/drivers/dd/blue/makefile index 8cd7831af32..b2722794cdd 100644 --- a/reactos/drivers/dd/blue/makefile +++ b/reactos/drivers/dd/blue/makefile @@ -1,4 +1,4 @@ -# $Id: makefile,v 1.14 2000/08/20 17:02:09 dwelch Exp $ +# $Id: makefile,v 1.15 2000/09/12 10:12:12 jean Exp $ # # PATH_TO_TOP = ../../.. @@ -36,4 +36,5 @@ dist: ../../../$(DIST_DIR)/drivers/$(TARGET).sys $(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) +WARNINGS_ARE_ERRORS = yes include ../../../rules.mak diff --git a/reactos/drivers/dd/ide/ide.c b/reactos/drivers/dd/ide/ide.c index d78586c0015..7d90ba303db 100644 --- a/reactos/drivers/dd/ide/ide.c +++ b/reactos/drivers/dd/ide/ide.c @@ -1,4 +1,4 @@ -/* $Id: ide.c,v 1.34 2000/08/25 15:56:24 ekohl Exp $ +/* $Id: ide.c,v 1.35 2000/09/12 10:12:12 jean Exp $ * * IDE.C - IDE Disk driver * written by Rex Jolliff @@ -168,10 +168,10 @@ static int IDEPolledRead(IN WORD Address, IN BYTE DrvHead, IN BYTE Command, OUT BYTE *Buffer); -static NTSTATUS IDEDispatchOpenClose(IN PDEVICE_OBJECT pDO, IN PIRP Irp); -static NTSTATUS IDEDispatchReadWrite(IN PDEVICE_OBJECT pDO, IN PIRP Irp); -static NTSTATUS IDEDispatchDeviceControl(IN PDEVICE_OBJECT pDO, IN PIRP Irp); -static VOID IDEStartIo(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp); +static NTSTATUS STDCALL IDEDispatchOpenClose(IN PDEVICE_OBJECT pDO, IN PIRP Irp); +static NTSTATUS STDCALL IDEDispatchReadWrite(IN PDEVICE_OBJECT pDO, IN PIRP Irp); +static NTSTATUS STDCALL IDEDispatchDeviceControl(IN PDEVICE_OBJECT pDO, IN PIRP Irp); +static VOID STDCALL IDEStartIo(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp); static IO_ALLOCATION_ACTION IDEAllocateController(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID MapRegisterBase, @@ -1101,7 +1101,7 @@ IDEPolledRead(IN WORD Address, // static NTSTATUS -IDEDispatchOpenClose(IN PDEVICE_OBJECT pDO, +STDCALL IDEDispatchOpenClose(IN PDEVICE_OBJECT pDO, IN PIRP Irp) { Irp->IoStatus.Status = STATUS_SUCCESS; @@ -1127,7 +1127,7 @@ IDEDispatchOpenClose(IN PDEVICE_OBJECT pDO, // static NTSTATUS -IDEDispatchReadWrite(IN PDEVICE_OBJECT pDO, +STDCALL IDEDispatchReadWrite(IN PDEVICE_OBJECT pDO, IN PIRP Irp) { ULONG IrpInsertKey; @@ -1212,7 +1212,7 @@ DPRINT("AdjOffset:%ld:%ld + Length:%ld = AdjExtent:%ld:%ld\n", // static NTSTATUS -IDEDispatchDeviceControl(IN PDEVICE_OBJECT DeviceObject, +STDCALL IDEDispatchDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { NTSTATUS RC; @@ -1299,7 +1299,7 @@ IDEDispatchDeviceControl(IN PDEVICE_OBJECT DeviceObject, // static VOID -IDEStartIo(IN PDEVICE_OBJECT DeviceObject, +STDCALL IDEStartIo(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { LARGE_INTEGER SectorLI; diff --git a/reactos/drivers/dd/ide/makefile b/reactos/drivers/dd/ide/makefile index b9ca0b72d50..0a1e0d57980 100644 --- a/reactos/drivers/dd/ide/makefile +++ b/reactos/drivers/dd/ide/makefile @@ -1,4 +1,4 @@ -# $Id: makefile,v 1.17 2000/08/21 00:15:54 ekohl Exp $ +# $Id: makefile,v 1.18 2000/09/12 10:12:12 jean Exp $ # # PATH_TO_TOP = ../../.. @@ -45,4 +45,5 @@ endif $(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) WITH_DEBUGGING=yes +WARNINGS_ARE_ERRORS = yes include ../../../rules.mak diff --git a/reactos/drivers/dd/keyboard/keyboard.c b/reactos/drivers/dd/keyboard/keyboard.c index 490b7443eab..b09d2f51588 100644 --- a/reactos/drivers/dd/keyboard/keyboard.c +++ b/reactos/drivers/dd/keyboard/keyboard.c @@ -616,7 +616,7 @@ BOOLEAN KbdSynchronizeRoutine(PVOID Context) return(FALSE); } -VOID KbdStartIo(PDEVICE_OBJECT DeviceObject, PIRP Irp) +VOID STDCALL KbdStartIo(PDEVICE_OBJECT DeviceObject, PIRP Irp) { #ifndef NDEBUG PIO_STACK_LOCATION stk = IoGetCurrentIrpStackLocation(Irp); @@ -636,7 +636,7 @@ VOID KbdStartIo(PDEVICE_OBJECT DeviceObject, PIRP Irp) DPRINT("KeysRequired %d\n",KeysRequired); } -NTSTATUS KbdDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) +NTSTATUS STDCALL KbdDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) { PIO_STACK_LOCATION stk = IoGetCurrentIrpStackLocation(Irp); NTSTATUS Status; diff --git a/reactos/drivers/dd/keyboard/makefile b/reactos/drivers/dd/keyboard/makefile index 3c3827ccaae..b80f0b7075f 100644 --- a/reactos/drivers/dd/keyboard/makefile +++ b/reactos/drivers/dd/keyboard/makefile @@ -1,4 +1,4 @@ -# $Id: makefile,v 1.12 2000/08/20 17:02:10 dwelch Exp $ +# $Id: makefile,v 1.13 2000/09/12 10:12:12 jean Exp $ # # PATH_TO_TOP = ../../.. @@ -44,4 +44,5 @@ endif $(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) +WARNINGS_ARE_ERRORS = yes include ../../../rules.mak diff --git a/reactos/drivers/dd/vidport/vidport.c b/reactos/drivers/dd/vidport/vidport.c index f68ab8db539..8775522c6ae 100644 --- a/reactos/drivers/dd/vidport/vidport.c +++ b/reactos/drivers/dd/vidport/vidport.c @@ -1,4 +1,4 @@ -/* $Id: vidport.c,v 1.14 2000/07/07 11:56:04 ekohl Exp $ +/* $Id: vidport.c,v 1.15 2000/09/12 10:12:13 jean Exp $ * * VideoPort driver * Written by Rex Jolliff @@ -13,9 +13,9 @@ #define VERSION "0.0.0" -static VOID VidStartIo(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp); -static NTSTATUS VidDispatchOpenClose(IN PDEVICE_OBJECT pDO, IN PIRP Irp); -static NTSTATUS VidDispatchDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp); +static VOID STDCALL VidStartIo(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp); +static NTSTATUS STDCALL VidDispatchOpenClose(IN PDEVICE_OBJECT pDO, IN PIRP Irp); +static NTSTATUS STDCALL VidDispatchDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp); // ------------------------------------------------------- Public Interface @@ -716,6 +716,7 @@ VideoPortZeroDeviceMemory(OUT PVOID Destination, // static NTSTATUS +STDCALL VidDispatchOpenClose(IN PDEVICE_OBJECT pDO, IN PIRP Irp) { @@ -742,6 +743,7 @@ VidDispatchOpenClose(IN PDEVICE_OBJECT pDO, // static VOID +STDCALL VidStartIo(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { @@ -764,6 +766,7 @@ VidStartIo(IN PDEVICE_OBJECT DeviceObject, // static NTSTATUS +STDCALL VidDispatchDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { diff --git a/reactos/drivers/fs/vfat/close.c b/reactos/drivers/fs/vfat/close.c index e2d76afb6ce..391f9557fc9 100644 --- a/reactos/drivers/fs/vfat/close.c +++ b/reactos/drivers/fs/vfat/close.c @@ -1,4 +1,4 @@ -/* $Id: close.c,v 1.1 2000/07/07 02:14:14 ekohl Exp $ +/* $Id: close.c,v 1.2 2000/09/12 10:12:13 jean Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -53,7 +53,7 @@ NTSTATUS FsdCloseFile(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject) return STATUS_SUCCESS; } -NTSTATUS FsdClose(PDEVICE_OBJECT DeviceObject, PIRP Irp) +NTSTATUS STDCALL FsdClose(PDEVICE_OBJECT DeviceObject, PIRP Irp) /* * FUNCTION: Closes a file */ diff --git a/reactos/drivers/fs/vfat/create.c b/reactos/drivers/fs/vfat/create.c index 65a865c316a..afd255f746a 100644 --- a/reactos/drivers/fs/vfat/create.c +++ b/reactos/drivers/fs/vfat/create.c @@ -1,4 +1,4 @@ -/* $Id: create.c,v 1.6 2000/07/07 02:14:14 ekohl Exp $ +/* $Id: create.c,v 1.7 2000/09/12 10:12:13 jean Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -640,7 +640,7 @@ CHECKPOINT; } -NTSTATUS FsdCreate(PDEVICE_OBJECT DeviceObject, PIRP Irp) +NTSTATUS STDCALL FsdCreate(PDEVICE_OBJECT DeviceObject, PIRP Irp) /* * FUNCTION: Create or open a file */ diff --git a/reactos/drivers/fs/vfat/dir.c b/reactos/drivers/fs/vfat/dir.c index 9d26b05a8d5..6a9ee9863ce 100644 --- a/reactos/drivers/fs/vfat/dir.c +++ b/reactos/drivers/fs/vfat/dir.c @@ -309,7 +309,7 @@ DPRINT("Found %S,RC=%x, sector %x entry %x\n",tmpFcb.ObjectName,RC } -NTSTATUS FsdDirectoryControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) +NTSTATUS STDCALL FsdDirectoryControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) /* * FUNCTION: directory control : read/write directory informations */ diff --git a/reactos/drivers/fs/vfat/finfo.c b/reactos/drivers/fs/vfat/finfo.c index f7a2ce551c8..cd4e8b0d033 100644 --- a/reactos/drivers/fs/vfat/finfo.c +++ b/reactos/drivers/fs/vfat/finfo.c @@ -1,4 +1,4 @@ -/* $Id: finfo.c,v 1.3 2000/06/29 23:35:50 dwelch Exp $ +/* $Id: finfo.c,v 1.4 2000/09/12 10:12:13 jean Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -122,7 +122,7 @@ NTSTATUS FsdSetDispositionInformation(PFILE_OBJECT FileObject, } -NTSTATUS FsdQueryInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp) +NTSTATUS STDCALL FsdQueryInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp) /* * FUNCTION: Retrieve the specified file information */ @@ -183,7 +183,7 @@ NTSTATUS FsdQueryInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp) return RC; } -NTSTATUS VfatSetInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp) +NTSTATUS STDCALL VfatSetInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp) /* * FUNCTION: Retrieve the specified file information */ diff --git a/reactos/drivers/fs/vfat/iface.c b/reactos/drivers/fs/vfat/iface.c index 013d8fd935c..cc206199400 100644 --- a/reactos/drivers/fs/vfat/iface.c +++ b/reactos/drivers/fs/vfat/iface.c @@ -1,4 +1,4 @@ -/* $Id: iface.c,v 1.42 2000/06/29 23:35:50 dwelch Exp $ +/* $Id: iface.c,v 1.43 2000/09/12 10:12:13 jean Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -156,7 +156,7 @@ NTSTATUS FsdMount(PDEVICE_OBJECT DeviceToMount) return(STATUS_SUCCESS); } -NTSTATUS FsdFileSystemControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) +NTSTATUS STDCALL FsdFileSystemControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) /* * FUNCTION: File system control */ diff --git a/reactos/drivers/fs/vfat/rw.c b/reactos/drivers/fs/vfat/rw.c index 6b1eb3a4b0c..f6664d2cfc8 100644 --- a/reactos/drivers/fs/vfat/rw.c +++ b/reactos/drivers/fs/vfat/rw.c @@ -1,4 +1,4 @@ -/* $Id: rw.c,v 1.7 2000/06/29 23:35:51 dwelch Exp $ +/* $Id: rw.c,v 1.8 2000/09/12 10:12:13 jean Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -364,7 +364,7 @@ NTSTATUS FsdWriteFile(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject, return (STATUS_SUCCESS); } -NTSTATUS FsdWrite(PDEVICE_OBJECT DeviceObject, PIRP Irp) +NTSTATUS STDCALL FsdWrite(PDEVICE_OBJECT DeviceObject, PIRP Irp) /* * FUNCTION: Write to a file */ @@ -392,7 +392,7 @@ NTSTATUS FsdWrite(PDEVICE_OBJECT DeviceObject, PIRP Irp) return(Status); } -NTSTATUS FsdRead(PDEVICE_OBJECT DeviceObject, PIRP Irp) +NTSTATUS STDCALL FsdRead(PDEVICE_OBJECT DeviceObject, PIRP Irp) /* * FUNCTION: Read from a file */ diff --git a/reactos/drivers/fs/vfat/vfat.h b/reactos/drivers/fs/vfat/vfat.h index c4bba3d71fe..8c686742b89 100644 --- a/reactos/drivers/fs/vfat/vfat.h +++ b/reactos/drivers/fs/vfat/vfat.h @@ -1,4 +1,4 @@ -/* $Id: vfat.h,v 1.16 1999/12/16 23:08:17 ekohl Exp $ */ +/* $Id: vfat.h,v 1.17 2000/09/12 10:12:13 jean Exp $ */ struct _BootSector { unsigned char magic0, res0, magic1; @@ -149,13 +149,13 @@ typedef struct __DOSDATE // functions called by i/o manager : NTSTATUS STDCALL DriverEntry(PDRIVER_OBJECT _DriverObject,PUNICODE_STRING RegistryPath); -NTSTATUS FsdDirectoryControl(PDEVICE_OBJECT DeviceObject, PIRP Irp); -NTSTATUS FsdRead(PDEVICE_OBJECT DeviceObject, PIRP Irp); -NTSTATUS FsdWrite(PDEVICE_OBJECT DeviceObject, PIRP Irp); -NTSTATUS FsdCreate(PDEVICE_OBJECT DeviceObject, PIRP Irp); -NTSTATUS FsdClose(PDEVICE_OBJECT DeviceObject, PIRP Irp); -NTSTATUS FsdFileSystemControl(PDEVICE_OBJECT DeviceObject, PIRP Irp); -NTSTATUS FsdQueryInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp); +NTSTATUS STDCALL FsdDirectoryControl(PDEVICE_OBJECT DeviceObject, PIRP Irp); +NTSTATUS STDCALL FsdRead(PDEVICE_OBJECT DeviceObject, PIRP Irp); +NTSTATUS STDCALL FsdWrite(PDEVICE_OBJECT DeviceObject, PIRP Irp); +NTSTATUS STDCALL FsdCreate(PDEVICE_OBJECT DeviceObject, PIRP Irp); +NTSTATUS STDCALL FsdClose(PDEVICE_OBJECT DeviceObject, PIRP Irp); +NTSTATUS STDCALL FsdFileSystemControl(PDEVICE_OBJECT DeviceObject, PIRP Irp); +NTSTATUS STDCALL FsdQueryInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp); // internal functions in blockdev.c @@ -225,12 +225,12 @@ ULONG FAT32CountAvailableClusters(PDEVICE_EXTENSION DeviceExt); /* * functions from volume.c */ -NTSTATUS VfatQueryVolumeInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp); +NTSTATUS STDCALL VfatQueryVolumeInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp); /* * functions from finfo.c */ -NTSTATUS VfatSetInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp); +NTSTATUS STDCALL VfatSetInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp); /* * From create.c diff --git a/reactos/drivers/fs/vfat/volume.c b/reactos/drivers/fs/vfat/volume.c index 6e5c4ee3960..1cfe8001d71 100644 --- a/reactos/drivers/fs/vfat/volume.c +++ b/reactos/drivers/fs/vfat/volume.c @@ -1,4 +1,4 @@ -/* $Id: volume.c,v 1.3 2000/06/29 23:35:51 dwelch Exp $ +/* $Id: volume.c,v 1.4 2000/09/12 10:12:13 jean Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -117,7 +117,7 @@ NTSTATUS FsdGetFsSizeInformation(PDEVICE_OBJECT DeviceObject, } -NTSTATUS VfatQueryVolumeInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp) +NTSTATUS STDCALL VfatQueryVolumeInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp) /* * FUNCTION: Retrieve the specified file information */ diff --git a/reactos/include/ddk/iodef.h b/reactos/include/ddk/iodef.h index 0aaf4042078..e51e288d348 100644 --- a/reactos/include/ddk/iodef.h +++ b/reactos/include/ddk/iodef.h @@ -218,12 +218,12 @@ enum IRP_MJ_CREATE_MAILSLOT, IRP_MJ_QUERY_SECURITY, IRP_MJ_SET_SECURITY, - IRP_MJ_QUERY_POWER, - IRP_MJ_SET_POWER, + IRP_MJ_QUERY_POWER,//IRP_MJ_POWER ? + IRP_MJ_SET_POWER,//IRP_MJ_SYSTEM_CONTROL ? IRP_MJ_DEVICE_CHANGE, IRP_MJ_QUERY_QUOTA, IRP_MJ_SET_QUOTA, - IRP_MJ_PNP_POWER, + IRP_MJ_PNP_POWER,//=IRP_MJ_PNP IRP_MJ_MAXIMUM_FUNCTION, }; diff --git a/reactos/include/ddk/iotypes.h b/reactos/include/ddk/iotypes.h index 8b3f6dd8688..5da0dd7629f 100644 --- a/reactos/include/ddk/iotypes.h +++ b/reactos/include/ddk/iotypes.h @@ -1,4 +1,4 @@ -/* $Id: iotypes.h,v 1.18 2000/06/29 23:35:11 dwelch Exp $ +/* $Id: iotypes.h,v 1.19 2000/09/12 10:12:10 jean Exp $ * */ @@ -189,6 +189,7 @@ typedef struct _IO_STACK_LOCATION FILE_INFORMATION_CLASS FileInformationClass; ULONG FileIndex; } QueryDirectory; +/* struct { ULONG CreateDisposition; @@ -202,14 +203,15 @@ typedef struct _IO_STACK_LOCATION ULONG OutBufferSize; LARGE_INTEGER TimeOut; } CreateNamedPipe; +*/ } Parameters; + struct _DEVICE_OBJECT* DeviceObject; + struct _FILE_OBJECT* FileObject; + PIO_COMPLETION_ROUTINE CompletionRoutine; PVOID CompletionContext; - struct _DEVICE_OBJECT* DeviceObject; - - struct _FILE_OBJECT* FileObject; } IO_STACK_LOCATION, *PIO_STACK_LOCATION; typedef struct _IO_STATUS_BLOCK @@ -313,12 +315,12 @@ typedef struct _IRP IO_STATUS_BLOCK IoStatus; KPROCESSOR_MODE RequestorMode; BOOLEAN PendingReturned; + CHAR StackCount; + CHAR CurrentLocation; BOOLEAN Cancel; KIRQL CancelIrql; - PDRIVER_CANCEL CancelRoutine; - PVOID UserBuffer; - PVOID ApcEnvironment; - ULONG AllocationFlags; + CCHAR ApcEnvironment;// CCHAR or PVOID? + UCHAR AllocationFlags;//UCHAR or ULONG? PIO_STATUS_BLOCK UserIosb; PKEVENT UserEvent; union @@ -330,6 +332,8 @@ typedef struct _IRP } AsynchronousParameters; LARGE_INTEGER AllocationSize; } Overlay; + PDRIVER_CANCEL CancelRoutine; + PVOID UserBuffer; union { struct @@ -344,8 +348,6 @@ typedef struct _IRP KAPC Apc; ULONG CompletionKey; } Tail; - CHAR StackCount; - CHAR CurrentLocation; IO_STACK_LOCATION Stack[1]; } IRP, *PIRP; @@ -404,17 +406,60 @@ typedef struct _DEVICE_OBJECT /* * Dispatch routine type declaration */ -typedef NTSTATUS (*PDRIVER_DISPATCH)(struct _DEVICE_OBJECT*, IRP*); +typedef NTSTATUS STDCALL (*PDRIVER_DISPATCH)(struct _DEVICE_OBJECT*, IRP*); + /* * Fast i/o routine type declaration */ -typedef NTSTATUS (*PFAST_IO_DISPATCH)(struct _DEVICE_OBJECT*, IRP*); +//typedef NTSTATUS (*PFAST_IO_DISPATCH)(struct _DEVICE_OBJECT*, IRP*); +//FIXME : this type is ok for read and write, but not for all routines +typedef BOOLEAN STDCALL (*PFAST_IO_ROUTINE) ( + IN struct _FILE_OBJECT *FileObject, + IN PLARGE_INTEGER FileOffset, + IN ULONG Length, + IN BOOLEAN Wait, + IN ULONG LockKey, + OUT PVOID Buffer, + OUT PIO_STATUS_BLOCK IoStatus, + IN struct _DEVICE_OBJECT *DeviceObject + ); + +typedef struct _FAST_IO_DISPATCH { + ULONG SizeOfFastIoDispatch; + PFAST_IO_ROUTINE FastIoCheckIfPossible; + PFAST_IO_ROUTINE FastIoRead; + PFAST_IO_ROUTINE FastIoWrite; + PFAST_IO_ROUTINE FastIoQueryBasicInfo; + PFAST_IO_ROUTINE FastIoQueryStandardInfo; + PFAST_IO_ROUTINE FastIoLock; + PFAST_IO_ROUTINE FastIoUnlockSingle; + PFAST_IO_ROUTINE FastIoUnlockAll; + PFAST_IO_ROUTINE FastIoUnlockAllByKey; + PFAST_IO_ROUTINE FastIoDeviceControl; + PFAST_IO_ROUTINE AcquireFileForNtCreateSection; + PFAST_IO_ROUTINE ReleaseFileForNtCreateSection; + PFAST_IO_ROUTINE FastIoDetachDevice; + PFAST_IO_ROUTINE FastIoQueryNetworkOpenInfo; + PFAST_IO_ROUTINE AcquireForModWrite; + PFAST_IO_ROUTINE MdlRead; + PFAST_IO_ROUTINE MdlReadComplete; + PFAST_IO_ROUTINE PrepareMdlWrite; + PFAST_IO_ROUTINE MdlWriteComplete; + PFAST_IO_ROUTINE FastIoReadCompressed; + PFAST_IO_ROUTINE FastIoWriteCompressed; + PFAST_IO_ROUTINE MdlReadCompleteCompressed; + PFAST_IO_ROUTINE MdlWriteCompleteCompressed; + PFAST_IO_ROUTINE FastIoQueryOpen; + PFAST_IO_ROUTINE ReleaseForModWrite; + PFAST_IO_ROUTINE AcquireForCcFlush; + PFAST_IO_ROUTINE ReleaseForCcFlush; +} FAST_IO_DISPATCH, *PFAST_IO_DISPATCH; /* * Dispatch routine type declaration */ -typedef VOID (*PDRIVER_STARTIO)(struct _DEVICE_OBJECT*, IRP*); +typedef VOID STDCALL (*PDRIVER_STARTIO)(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp); /* * Dispatch routine type declaration diff --git a/reactos/include/ddk/ketypes.h b/reactos/include/ddk/ketypes.h index 42da152572c..b27afcebb73 100644 --- a/reactos/include/ddk/ketypes.h +++ b/reactos/include/ddk/ketypes.h @@ -231,6 +231,7 @@ typedef struct _KDEVICE_QUEUE_ENTRY { LIST_ENTRY Entry; ULONG Key; + BOOLEAN Inserted; } KDEVICE_QUEUE_ENTRY, *PKDEVICE_QUEUE_ENTRY; typedef struct _WAIT_CONTEXT_BLOCK diff --git a/reactos/include/ddk/types.h b/reactos/include/ddk/types.h index 94efe87b7c9..908a47764be 100644 --- a/reactos/include/ddk/types.h +++ b/reactos/include/ddk/types.h @@ -14,7 +14,7 @@ typedef ULONG KAFFINITY, *PKAFFINITY; /* * Various other types (all quite pointless) */ -typedef ULONG KPROCESSOR_MODE; +typedef CCHAR KPROCESSOR_MODE; typedef UCHAR KIRQL; typedef KIRQL* PKIRQL; typedef ULONG IO_ALLOCATION_ACTION; diff --git a/reactos/ntoskrnl/cm/registry.c b/reactos/ntoskrnl/cm/registry.c index ef10346143a..7e590734b66 100644 --- a/reactos/ntoskrnl/cm/registry.c +++ b/reactos/ntoskrnl/cm/registry.c @@ -1,4 +1,4 @@ -/* $Id: registry.c,v 1.29 2000/09/08 22:55:14 ekohl Exp $ +/* $Id: registry.c,v 1.30 2000/09/12 10:12:10 jean Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -16,7 +16,7 @@ #include #include -#define NDEBUG +//#define NDEBUG #include #define PROTO_REG 1 /* Comment out to disable */ @@ -227,10 +227,6 @@ static NTSTATUS CmiScanKeyForValue(IN PREGISTRY_FILE RegistryFile, IN PKEY_BLOCK KeyBlock, IN PWSTR ValueName, OUT PVALUE_BLOCK *ValueBlock); -static NTSTATUS CmiGetValueFromKeyByIndex(IN PREGISTRY_FILE RegistryFile, - IN PKEY_BLOCK KeyBlock, - IN ULONG Index, - OUT PVALUE_BLOCK *ValueBlock); static NTSTATUS CmiAddValueToKey(IN PREGISTRY_FILE RegistryFile, IN PKEY_BLOCK KeyBlock, IN PWSTR ValueNameBuf, @@ -368,6 +364,7 @@ CmInitializeRegistry(VOID) { return; } +CHECKPOINT; CmiReleaseBlock(CmiVolatileFile, KeyBlock); /* FIXME: create remaining structure needed for default handles */ @@ -376,21 +373,19 @@ CmInitializeRegistry(VOID) #endif } - -VOID +VOID CmImportHive(PCHAR Chunk) { /* FIXME: implemement this */ - return; + return; } - -NTSTATUS +NTSTATUS STDCALL NtCreateKey ( OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, - IN POBJECT_ATTRIBUTES ObjectAttributes, + IN POBJECT_ATTRIBUTES ObjectAttributes, IN ULONG TitleIndex, IN PUNICODE_STRING Class, IN ULONG CreateOptions, @@ -433,10 +428,7 @@ NtCreateKey ( FALSE, KeyHandle); ExFreePool(KeyNameBuf); - if (NT_SUCCESS(Status)) - { - *Disposition = REG_OPENED_EXISTING_KEY; - } + return Status; } @@ -445,9 +437,9 @@ NtCreateKey ( KeyNameBuf, &KeyBlock, DesiredAccess, - TitleIndex, - Class, - CreateOptions, + TitleIndex, + Class, + CreateOptions, Disposition); if (!NT_SUCCESS(Status)) { @@ -457,9 +449,9 @@ NtCreateKey ( } /* Create new key object and put into linked list */ - NewKey = ObCreateObject(KeyHandle, - DesiredAccess, - NULL, + NewKey = ObCreateObject(KeyHandle, + DesiredAccess, + NULL, CmiKeyType); if (NewKey == NULL) { @@ -471,16 +463,11 @@ NtCreateKey ( NewKey->RegistryFile = FileToUse; CmiAddKeyToList(NewKey); Status = ObCreateHandle(PsGetCurrentProcess(), - NewKey, + CurKey, DesiredAccess, FALSE, KeyHandle); - if (NT_SUCCESS(Status)) - { - *Disposition = REG_CREATED_NEW_KEY; - } - return Status; #else UNIMPLEMENTED; @@ -488,7 +475,7 @@ NtCreateKey ( } -NTSTATUS +NTSTATUS STDCALL NtDeleteKey ( IN HANDLE KeyHandle @@ -525,48 +512,7 @@ NtDeleteKey ( } -NTSTATUS -STDCALL -NtDeleteValueKey ( - IN HANDLE KeyHandle, - IN PUNICODE_STRING ValueName - ) -{ -#ifdef PROTO_REG - NTSTATUS Status; - PKEY_OBJECT KeyObject; - PREGISTRY_FILE RegistryFile; - PKEY_BLOCK KeyBlock; - - /* Verify that the handle is valid and is a registry key */ - Status = ObReferenceObjectByHandle(KeyHandle, - KEY_QUERY_VALUE, - CmiKeyType, - UserMode, - (PVOID *)&KeyObject, - NULL); - if (!NT_SUCCESS(Status)) - { - return Status; - } - - /* Get pointer to KeyBlock */ - KeyBlock = KeyObject->KeyBlock; - RegistryFile = KeyObject->RegistryFile; - Status = CmiDeleteValueFromKey(RegistryFile, - KeyBlock, - ValueName->Buffer); - - ObDereferenceObject(KeyObject); - - return Status; -#else - UNIMPLEMENTED; -#endif -} - - -NTSTATUS +NTSTATUS STDCALL NtEnumerateKey ( IN HANDLE KeyHandle, @@ -586,7 +532,7 @@ NtEnumerateKey ( PKEY_BASIC_INFORMATION BasicInformation; PKEY_NODE_INFORMATION NodeInformation; PKEY_FULL_INFORMATION FullInformation; - + /* Verify that the handle is valid and is a registry key */ Status = ObReferenceObjectByHandle(KeyHandle, KEY_ENUMERATE_SUB_KEYS, @@ -602,11 +548,11 @@ NtEnumerateKey ( /* Get pointer to KeyBlock */ KeyBlock = KeyObject->KeyBlock; RegistryFile = KeyObject->RegistryFile; - + /* Get pointer to SubKey */ HashTableBlock = CmiGetHashTableBlock(RegistryFile, KeyBlock->HashTableOffset); - SubKeyBlock = CmiGetKeyFromHashByIndex(RegistryFile, - HashTableBlock, + SubKeyBlock = CmiGetKeyFromHashByIndex(RegistryFile, + HashTableBlock, Index); if (SubKeyBlock == NULL) { @@ -619,7 +565,7 @@ NtEnumerateKey ( case KeyBasicInformation: /* Check size of buffer */ if (Length < sizeof(KEY_BASIC_INFORMATION) + - (SubKeyBlock->NameSize + 1) * sizeof(WCHAR)) + SubKeyBlock->NameSize * sizeof(WCHAR)) { Status = STATUS_BUFFER_OVERFLOW; } @@ -629,7 +575,7 @@ NtEnumerateKey ( BasicInformation = (PKEY_BASIC_INFORMATION) KeyInformation; BasicInformation->LastWriteTime = SubKeyBlock->LastWriteTime; BasicInformation->TitleIndex = Index; - BasicInformation->NameLength = (SubKeyBlock->NameSize + 1) * sizeof(WCHAR); + BasicInformation->NameLength = SubKeyBlock->NameSize; wcsncpy(BasicInformation->Name, SubKeyBlock->Name, SubKeyBlock->NameSize); @@ -642,7 +588,7 @@ NtEnumerateKey ( case KeyNodeInformation: /* Check size of buffer */ if (Length < sizeof(KEY_NODE_INFORMATION) + - (SubKeyBlock->NameSize + 1) * sizeof(WCHAR) + + SubKeyBlock->NameSize * sizeof(WCHAR) + (SubKeyBlock->ClassSize + 1) * sizeof(WCHAR)) { Status = STATUS_BUFFER_OVERFLOW; @@ -656,7 +602,7 @@ NtEnumerateKey ( NodeInformation->ClassOffset = sizeof(KEY_NODE_INFORMATION) + SubKeyBlock->NameSize * sizeof(WCHAR); NodeInformation->ClassLength = SubKeyBlock->ClassSize; - NodeInformation->NameLength = (SubKeyBlock->NameSize + 1) * sizeof(WCHAR); + NodeInformation->NameLength = SubKeyBlock->NameSize; wcsncpy(NodeInformation->Name, SubKeyBlock->Name, SubKeyBlock->NameSize); @@ -711,7 +657,6 @@ NtEnumerateKey ( break; } CmiReleaseBlock(RegistryFile, SubKeyBlock); - ObDereferenceObject (KeyObject); return Status; #else @@ -720,141 +665,26 @@ NtEnumerateKey ( } -NTSTATUS +NTSTATUS STDCALL NtEnumerateValueKey ( IN HANDLE KeyHandle, IN ULONG Index, - IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, - OUT PVOID KeyValueInformation, + IN KEY_VALUE_INFORMATION_CLASS KeyInformationClass, + OUT PVOID KeyInformation, IN ULONG Length, OUT PULONG ResultLength ) { #ifdef PROTO_REG - NTSTATUS Status; - PKEY_OBJECT KeyObject; - PREGISTRY_FILE RegistryFile; - PKEY_BLOCK KeyBlock; - PVALUE_BLOCK ValueBlock; - PVOID DataBlock; - PKEY_VALUE_BASIC_INFORMATION ValueBasicInformation; - PKEY_VALUE_PARTIAL_INFORMATION ValuePartialInformation; - PKEY_VALUE_FULL_INFORMATION ValueFullInformation; - - /* Verify that the handle is valid and is a registry key */ - Status = ObReferenceObjectByHandle(KeyHandle, - KEY_QUERY_VALUE, - CmiKeyType, - UserMode, - (PVOID *)&KeyObject, - NULL); - if (!NT_SUCCESS(Status)) - { - return Status; - } - - /* Get pointer to KeyBlock */ - KeyBlock = KeyObject->KeyBlock; - RegistryFile = KeyObject->RegistryFile; - - /* Get Value block of interest */ - Status = CmiGetValueFromKeyByIndex(RegistryFile, - KeyBlock, - Index, - &ValueBlock); - if (!NT_SUCCESS(Status)) - { - return Status; - } - else if (ValueBlock != NULL) - { - switch (KeyValueInformationClass) - { - case KeyValueBasicInformation: - *ResultLength = sizeof(KEY_VALUE_BASIC_INFORMATION) + - (ValueBlock->NameSize + 1) * sizeof(WCHAR); - if (Length < *ResultLength) - { - Status = STATUS_BUFFER_OVERFLOW; - } - else - { - ValueBasicInformation = (PKEY_VALUE_BASIC_INFORMATION) - KeyValueInformation; - ValueBasicInformation->TitleIndex = 0; - ValueBasicInformation->Type = ValueBlock->DataType; - ValueBasicInformation->NameLength = - (ValueBlock->NameSize + 1) * sizeof(WCHAR); - wcscpy(ValueBasicInformation->Name, ValueBlock->Name); - } - break; - - case KeyValuePartialInformation: - *ResultLength = sizeof(KEY_VALUE_PARTIAL_INFORMATION) + - ValueBlock->DataSize; - if (Length < *ResultLength) - { - Status = STATUS_BUFFER_OVERFLOW; - } - else - { - ValuePartialInformation = (PKEY_VALUE_PARTIAL_INFORMATION) - KeyValueInformation; - ValuePartialInformation->TitleIndex = 0; - ValuePartialInformation->Type = ValueBlock->DataType; - ValuePartialInformation->DataLength = ValueBlock->DataSize; - DataBlock = CmiGetBlock(RegistryFile, ValueBlock->DataOffset); - RtlCopyMemory(ValuePartialInformation->Data, - DataBlock, - ValueBlock->DataSize); - CmiReleaseBlock(RegistryFile, DataBlock); - } - break; - - case KeyValueFullInformation: - *ResultLength = sizeof(KEY_VALUE_FULL_INFORMATION) + - (ValueBlock->NameSize + 1) * sizeof(WCHAR) + ValueBlock->DataSize; - if (Length < *ResultLength) - { - Status = STATUS_BUFFER_OVERFLOW; - } - else - { - ValueFullInformation = (PKEY_VALUE_FULL_INFORMATION) - KeyValueInformation; - ValueFullInformation->TitleIndex = 0; - ValueFullInformation->Type = ValueBlock->DataType; - ValueFullInformation->DataOffset = - sizeof(KEY_VALUE_FULL_INFORMATION) + - ValueBlock->NameSize * sizeof(WCHAR); - ValueFullInformation->DataLength = ValueBlock->DataSize; - ValueFullInformation->NameLength = - (ValueBlock->NameSize + 1) * sizeof(WCHAR); - wcscpy(ValueFullInformation->Name, ValueBlock->Name); - DataBlock = CmiGetBlock(RegistryFile, ValueBlock->DataOffset); - RtlCopyMemory(&ValueFullInformation->Name[ValueBlock->NameSize + 1], - DataBlock, - ValueBlock->DataSize); - CmiReleaseBlock(RegistryFile, DataBlock); - } - break; - } - } - else - { - Status = STATUS_UNSUCCESSFUL; - } - ObDereferenceObject(KeyObject); - - return Status; + UNIMPLEMENTED; #else UNIMPLEMENTED; #endif } -NTSTATUS +NTSTATUS STDCALL NtFlushKey ( IN HANDLE KeyHandle @@ -868,10 +698,10 @@ NtFlushKey ( } -NTSTATUS +NTSTATUS STDCALL NtOpenKey ( - OUT PHANDLE KeyHandle, + OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes ) @@ -939,9 +769,9 @@ NtOpenKey ( } /* Create new key object and put into linked list */ - NewKey = ObCreateObject(KeyHandle, - DesiredAccess, - NULL, + NewKey = ObCreateObject(KeyHandle, + DesiredAccess, + NULL, CmiKeyType); if (NewKey == NULL) { @@ -952,9 +782,8 @@ NtOpenKey ( NewKey->RegistryFile = FileToUse; NewKey->KeyBlock = KeyBlock; CmiAddKeyToList(NewKey); - Status = ObCreateHandle(PsGetCurrentProcess(), - NewKey, + CurKey, DesiredAccess, FALSE, KeyHandle); @@ -966,10 +795,10 @@ NtOpenKey ( } -NTSTATUS +NTSTATUS STDCALL NtQueryKey ( - IN HANDLE KeyHandle, + IN HANDLE KeyHandle, IN KEY_INFORMATION_CLASS KeyInformationClass, OUT PVOID KeyInformation, IN ULONG Length, @@ -984,7 +813,7 @@ NtQueryKey ( PKEY_BASIC_INFORMATION BasicInformation; PKEY_NODE_INFORMATION NodeInformation; PKEY_FULL_INFORMATION FullInformation; - + /* Verify that the handle is valid and is a registry key */ Status = ObReferenceObjectByHandle(KeyHandle, KEY_READ, @@ -1000,13 +829,13 @@ NtQueryKey ( /* Get pointer to KeyBlock */ KeyBlock = KeyObject->KeyBlock; RegistryFile = KeyObject->RegistryFile; - + Status = STATUS_SUCCESS; switch (KeyInformationClass) { case KeyBasicInformation: /* Check size of buffer */ - if (Length < sizeof(KEY_BASIC_INFORMATION) + + if (Length < sizeof(KEY_BASIC_INFORMATION) + KeyBlock->NameSize * sizeof(WCHAR)) { Status = STATUS_BUFFER_OVERFLOW; @@ -1018,11 +847,11 @@ NtQueryKey ( BasicInformation->LastWriteTime = KeyBlock->LastWriteTime; BasicInformation->TitleIndex = 0; BasicInformation->NameLength = KeyBlock->NameSize; - wcsncpy(BasicInformation->Name, - KeyBlock->Name, + wcsncpy(BasicInformation->Name, + KeyBlock->Name, KeyBlock->NameSize); BasicInformation->Name[KeyBlock->NameSize] = 0; - *ResultLength = sizeof(KEY_BASIC_INFORMATION) + + *ResultLength = sizeof(KEY_BASIC_INFORMATION) + KeyBlock->NameSize * sizeof(WCHAR); } break; @@ -1041,12 +870,12 @@ NtQueryKey ( NodeInformation = (PKEY_NODE_INFORMATION) KeyInformation; NodeInformation->LastWriteTime = KeyBlock->LastWriteTime; NodeInformation->TitleIndex = 0; - NodeInformation->ClassOffset = sizeof(KEY_NODE_INFORMATION) + + NodeInformation->ClassOffset = sizeof(KEY_NODE_INFORMATION) + KeyBlock->NameSize * sizeof(WCHAR); NodeInformation->ClassLength = KeyBlock->ClassSize; NodeInformation->NameLength = KeyBlock->NameSize; - wcsncpy(NodeInformation->Name, - KeyBlock->Name, + wcsncpy(NodeInformation->Name, + KeyBlock->Name, KeyBlock->NameSize); NodeInformation->Name[KeyBlock->NameSize] = 0; if (KeyBlock->ClassSize != 0) @@ -1076,7 +905,7 @@ NtQueryKey ( FullInformation = (PKEY_FULL_INFORMATION) KeyInformation; FullInformation->LastWriteTime = KeyBlock->LastWriteTime; FullInformation->TitleIndex = 0; - FullInformation->ClassOffset = sizeof(KEY_FULL_INFORMATION) - + FullInformation->ClassOffset = sizeof(KEY_FULL_INFORMATION) - sizeof(WCHAR); FullInformation->ClassLength = KeyBlock->ClassSize; FullInformation->SubKeys = KeyBlock->NumberOfSubKeys; @@ -1098,7 +927,6 @@ NtQueryKey ( } break; } - ObDereferenceObject (KeyObject); return Status; #else @@ -1107,7 +935,7 @@ NtQueryKey ( } -NTSTATUS +NTSTATUS STDCALL NtQueryValueKey ( IN HANDLE KeyHandle, @@ -1146,7 +974,7 @@ NtQueryValueKey ( RegistryFile = KeyObject->RegistryFile; /* Get Value block of interest */ - Status = CmiScanKeyForValue(RegistryFile, + Status = CmiScanKeyForValue(RegistryFile, KeyBlock, ValueName->Buffer, &ValueBlock); @@ -1185,7 +1013,7 @@ NtQueryValueKey ( } else { - ValuePartialInformation = (PKEY_VALUE_PARTIAL_INFORMATION) + ValuePartialInformation = (PKEY_VALUE_PARTIAL_INFORMATION) KeyValueInformation; ValuePartialInformation->TitleIndex = 0; ValuePartialInformation->Type = ValueBlock->DataType; @@ -1230,8 +1058,7 @@ NtQueryValueKey ( { Status = STATUS_UNSUCCESSFUL; } - ObDereferenceObject(KeyObject); - + return Status; #else UNIMPLEMENTED; @@ -1239,13 +1066,13 @@ NtQueryValueKey ( } -NTSTATUS +NTSTATUS STDCALL NtSetValueKey ( - IN HANDLE KeyHandle, + IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName, IN ULONG TitleIndex, - IN ULONG Type, + IN ULONG Type, IN PVOID Data, IN ULONG DataSize ) @@ -1259,7 +1086,7 @@ NtSetValueKey ( /* Verify that the handle is valid and is a registry key */ Status = ObReferenceObjectByHandle(KeyHandle, - KEY_SET_VALUE, + KEY_QUERY_VALUE, CmiKeyType, UserMode, (PVOID *)&KeyObject, @@ -1268,6 +1095,7 @@ NtSetValueKey ( { return Status; } + /* Get pointer to KeyBlock */ KeyBlock = KeyObject->KeyBlock; RegistryFile = KeyObject->RegistryFile; @@ -1277,7 +1105,6 @@ NtSetValueKey ( &ValueBlock); if (!NT_SUCCESS(Status)) { - ObDereferenceObject (KeyObject); return Status; } if (ValueBlock == NULL) @@ -1297,7 +1124,6 @@ NtSetValueKey ( Data, DataSize); } - ObDereferenceObject (KeyObject); return Status; #else @@ -1305,27 +1131,58 @@ NtSetValueKey ( #endif } - NTSTATUS STDCALL +NtDeleteValueKey ( + IN HANDLE KeyHandle, + IN PUNICODE_STRING ValueName + ) +{ +#ifdef PROTO_REG + NTSTATUS Status; + PKEY_OBJECT KeyObject; + PREGISTRY_FILE RegistryFile; + PKEY_BLOCK KeyBlock; + + /* Verify that the handle is valid and is a registry key */ + Status = ObReferenceObjectByHandle(KeyHandle, + KEY_QUERY_VALUE, + CmiKeyType, + UserMode, + (PVOID *)&KeyObject, + NULL); + if (!NT_SUCCESS(Status)) + { + return Status; + } + + /* Get pointer to KeyBlock */ + KeyBlock = KeyObject->KeyBlock; + RegistryFile = KeyObject->RegistryFile; + Status = CmiDeleteValueFromKey(RegistryFile, + KeyBlock, + ValueName->Buffer); + + return Status; +#else + UNIMPLEMENTED; +#endif +} + +NTSTATUS +STDCALL NtLoadKey ( PHANDLE KeyHandle, OBJECT_ATTRIBUTES ObjectAttributes ) { - return NtLoadKey2(KeyHandle, - ObjectAttributes, - 0); + UNIMPLEMENTED; } NTSTATUS STDCALL -NtLoadKey2 ( - PHANDLE KeyHandle, - OBJECT_ATTRIBUTES ObjectAttributes, - ULONG Unknown3 - ) +NtLoadKey2(VOID) { UNIMPLEMENTED; } @@ -1336,11 +1193,11 @@ STDCALL NtNotifyChangeKey ( IN HANDLE KeyHandle, IN HANDLE Event, - IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, - IN PVOID ApcContext OPTIONAL, + IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, + IN PVOID ApcContext OPTIONAL, OUT PIO_STATUS_BLOCK IoStatusBlock, IN ULONG CompletionFilter, - IN BOOLEAN Asynchroneous, + IN BOOLEAN Asynchroneous, OUT PVOID ChangeBuffer, IN ULONG Length, IN BOOLEAN WatchSubtree @@ -1414,7 +1271,7 @@ NtSetInformationKey ( NTSTATUS -STDCALL +STDCALL NtUnloadKey ( HANDLE KeyHandle ) @@ -1424,7 +1281,7 @@ NtUnloadKey ( NTSTATUS -STDCALL +STDCALL NtInitializeRegistry ( BOOLEAN SetUpBoot ) @@ -1535,7 +1392,7 @@ static NTSTATUS CmiObjectParse(PVOID ParsedObject, return Status; } - CurKeyBlock = CmiGetKeyBlock(RegistryFile, + CurKeyBlock = CmiGetKeyBlock(RegistryFile, RegistryFile->HeaderBlock->RootKeyBlock); /* Loop through each key level and find the needed subkey */ @@ -1556,8 +1413,8 @@ static NTSTATUS CmiObjectParse(PVOID ParsedObject, } /* Verify existance of CurKeyName */ - Status = CmiScanForSubKey(RegistryFile, - CurKeyBlock, + Status = CmiScanForSubKey(RegistryFile, + CurKeyBlock, &SubKeyBlock, CurKeyName, STANDARD_RIGHTS_REQUIRED); @@ -1645,7 +1502,7 @@ CmiBuildKeyPath(PWSTR *KeyPath, POBJECT_ATTRIBUTES ObjectAttributes) Status = ObReferenceObjectByHandle(ObjectAttributes->RootDirectory, KEY_READ, NULL, - KernelMode, + UserMode, (PVOID *)&ObjectBody, NULL); if (!NT_SUCCESS(Status)) @@ -1774,7 +1631,7 @@ CmiAddKeyToList(PKEY_OBJECT NewKey) KeReleaseSpinLock(&CmiKeyListLock, OldIrql); } -static VOID +static VOID CmiRemoveKeyFromList(PKEY_OBJECT KeyToRemove) { KIRQL OldIrql; @@ -1817,7 +1674,7 @@ CmiScanKeyList(PWSTR KeyName) return CurKey; } -static PREGISTRY_FILE +static PREGISTRY_FILE CmiCreateRegistry(PWSTR Filename) { PREGISTRY_FILE RegistryFile; @@ -1876,8 +1733,8 @@ CmiCreateKey(IN PREGISTRY_FILE RegistryFile, OUT PKEY_BLOCK *KeyBlock, IN ACCESS_MASK DesiredAccess, IN ULONG TitleIndex, - IN PUNICODE_STRING Class, - IN ULONG CreateOptions, + IN PUNICODE_STRING Class, + IN ULONG CreateOptions, OUT PULONG Disposition) { /* FIXME: this should be allocated based on the largest subkey name */ @@ -1889,11 +1746,13 @@ CmiCreateKey(IN PREGISTRY_FILE RegistryFile, /* FIXME: Should handle search by Class/TitleIndex */ +CHECKPOINT; /* Loop through each key level and find or build the needed subkey */ Status = STATUS_SUCCESS; /* FIXME: this access of RootKeyBlock should be guarded by spinlock */ CurKeyBlock = CmiGetKeyBlock(RegistryFile, RegistryFile->HeaderBlock->RootKeyBlock); +CHECKPOINT; Remainder = KeyNameBuf; while (NT_SUCCESS(Status) && (NextSlash = wcschr(Remainder, L'\\')) != NULL) @@ -1980,7 +1839,7 @@ CmiCreateKey(IN PREGISTRY_FILE RegistryFile, return Status; } -static NTSTATUS +static NTSTATUS CmiFindKey(IN PREGISTRY_FILE RegistryFile, IN PWSTR KeyNameBuf, OUT PKEY_BLOCK *KeyBlock, @@ -1994,9 +1853,6 @@ CmiFindKey(IN PREGISTRY_FILE RegistryFile, PWSTR Remainder, NextSlash; PKEY_BLOCK CurKeyBlock, SubKeyBlock; - if (RegistryFile == NULL) - return STATUS_UNSUCCESSFUL; - /* FIXME: Should handle search by Class/TitleIndex */ /* Loop through each key level and find the needed subkey */ @@ -2004,7 +1860,6 @@ CmiFindKey(IN PREGISTRY_FILE RegistryFile, /* FIXME: this access of RootKeyBlock should be guarded by spinlock */ CurKeyBlock = CmiGetKeyBlock(RegistryFile, RegistryFile->HeaderBlock->RootKeyBlock); Remainder = KeyNameBuf; - wcscpy(CurKeyName, Remainder); while (NT_SUCCESS(Status) && (NextSlash = wcschr(Remainder, L'\\')) != NULL) { @@ -2013,8 +1868,8 @@ CmiFindKey(IN PREGISTRY_FILE RegistryFile, CurKeyName[NextSlash - Remainder] = 0; /* Verify existance of CurKeyName */ - Status = CmiScanForSubKey(RegistryFile, - CurKeyBlock, + Status = CmiScanForSubKey(RegistryFile, + CurKeyBlock, &SubKeyBlock, CurKeyName, DesiredAccess); @@ -2034,8 +1889,8 @@ CmiFindKey(IN PREGISTRY_FILE RegistryFile, } if (NT_SUCCESS(Status)) { - Status = CmiScanForSubKey(RegistryFile, - CurKeyBlock, + Status = CmiScanForSubKey(RegistryFile, + CurKeyBlock, &SubKeyBlock, CurKeyName, DesiredAccess); @@ -2056,7 +1911,7 @@ CmiFindKey(IN PREGISTRY_FILE RegistryFile, return Status; } -static ULONG +static ULONG CmiGetMaxNameLength(PREGISTRY_FILE RegistryFile, PKEY_BLOCK KeyBlock) { @@ -2206,7 +2061,7 @@ CmiScanForSubKey(IN PREGISTRY_FILE RegistryFile, for (Idx = 0; Idx < HashBlock->HashTableSize; Idx++) { if (HashBlock->Table[Idx].KeyOffset != 0 && - !wcsncmp(KeyName, (PWSTR) &HashBlock->Table[Idx].HashValue, 2)) + !wcsncmp(KeyName, (PWSTR) &HashBlock->Table[Idx].HashValue, 4)) { CurSubKeyBlock = CmiGetKeyBlock(RegistryFile, HashBlock->Table[Idx].KeyOffset); @@ -2228,12 +2083,12 @@ CmiScanForSubKey(IN PREGISTRY_FILE RegistryFile, } static NTSTATUS -CmiAddSubKey(PREGISTRY_FILE RegistryFile, +CmiAddSubKey(PREGISTRY_FILE RegistryFile, PKEY_BLOCK KeyBlock, PKEY_BLOCK *SubKeyBlock, PWSTR NewSubKeyName, ULONG TitleIndex, - PWSTR Class, + PWSTR Class, ULONG CreateOptions) { NTSTATUS Status; @@ -2252,7 +2107,7 @@ CmiAddSubKey(PREGISTRY_FILE RegistryFile, } if (KeyBlock->HashTableOffset == 0) { - Status = CmiAllocateHashTableBlock(RegistryFile, + Status = CmiAllocateHashTableBlock(RegistryFile, &HashBlock, REG_INIT_HASH_TABLE_SIZE); if (!NT_SUCCESS(Status)) @@ -2299,7 +2154,7 @@ CmiAddSubKey(PREGISTRY_FILE RegistryFile, return Status; } -static NTSTATUS +static NTSTATUS CmiScanKeyForValue(IN PREGISTRY_FILE RegistryFile, IN PKEY_BLOCK KeyBlock, IN PWSTR ValueName, @@ -2309,10 +2164,10 @@ CmiScanKeyForValue(IN PREGISTRY_FILE RegistryFile, PVALUE_LIST_BLOCK ValueListBlock; PVALUE_BLOCK CurValueBlock; - ValueListBlock = CmiGetBlock(RegistryFile, + ValueListBlock = CmiGetBlock(RegistryFile, KeyBlock->ValuesOffset); *ValueBlock = NULL; - if (ValueListBlock == NULL) + if (ValueListBlock == 0) { return STATUS_SUCCESS; } @@ -2334,45 +2189,11 @@ CmiScanKeyForValue(IN PREGISTRY_FILE RegistryFile, return STATUS_SUCCESS; } - -static NTSTATUS -CmiGetValueFromKeyByIndex(IN PREGISTRY_FILE RegistryFile, - IN PKEY_BLOCK KeyBlock, - IN ULONG Index, - OUT PVALUE_BLOCK *ValueBlock) -{ - PVALUE_LIST_BLOCK ValueListBlock; - PVALUE_BLOCK CurValueBlock; - - ValueListBlock = CmiGetBlock(RegistryFile, - KeyBlock->ValuesOffset); - *ValueBlock = NULL; - if (ValueListBlock == NULL) - { - return STATUS_NO_MORE_ENTRIES; - } - if (Index >= KeyBlock->NumberOfValues) - { - return STATUS_NO_MORE_ENTRIES; - } - CurValueBlock = CmiGetBlock(RegistryFile, - ValueListBlock->Values[Index]); - if (CurValueBlock != NULL) - { - *ValueBlock = CurValueBlock; - } - CmiReleaseBlock(RegistryFile, CurValueBlock); - CmiReleaseBlock(RegistryFile, ValueListBlock); - - return STATUS_SUCCESS; -} - - -static NTSTATUS +static NTSTATUS CmiAddValueToKey(IN PREGISTRY_FILE RegistryFile, IN PKEY_BLOCK KeyBlock, IN PWSTR ValueNameBuf, - IN ULONG Type, + IN ULONG Type, IN PVOID Data, IN ULONG DataSize) { @@ -2390,7 +2211,7 @@ CmiAddValueToKey(IN PREGISTRY_FILE RegistryFile, { return Status; } - ValueListBlock = CmiGetBlock(RegistryFile, + ValueListBlock = CmiGetBlock(RegistryFile, KeyBlock->ValuesOffset); if (ValueListBlock == NULL) { @@ -2404,15 +2225,13 @@ CmiAddValueToKey(IN PREGISTRY_FILE RegistryFile, ValueBlock); return Status; } - KeyBlock->ValuesOffset = CmiGetBlockOffset(RegistryFile, - ValueListBlock); } else if (KeyBlock->NumberOfValues % REG_VALUE_LIST_BLOCK_MULTIPLE) { Status = CmiAllocateBlock(RegistryFile, (PVOID) &NewValueListBlock, sizeof(BLOCK_OFFSET) * - (KeyBlock->NumberOfValues + + (KeyBlock->NumberOfValues + REG_VALUE_LIST_BLOCK_MULTIPLE)); if (!NT_SUCCESS(Status)) { @@ -2420,25 +2239,24 @@ CmiAddValueToKey(IN PREGISTRY_FILE RegistryFile, ValueBlock); return Status; } - RtlCopyMemory(NewValueListBlock, + RtlCopyMemory(NewValueListBlock, ValueListBlock, sizeof(BLOCK_OFFSET) * KeyBlock->NumberOfValues); - KeyBlock->ValuesOffset = CmiGetBlockOffset(RegistryFile, + KeyBlock->ValuesOffset = CmiGetBlockOffset(RegistryFile, NewValueListBlock); CmiDestroyBlock(RegistryFile, ValueListBlock); ValueListBlock = NewValueListBlock; } - - ValueListBlock->Values[KeyBlock->NumberOfValues] = + ValueListBlock->Values[KeyBlock->NumberOfValues] = CmiGetBlockOffset(RegistryFile, ValueBlock); KeyBlock->NumberOfValues++; - CmiReleaseBlock(RegistryFile, ValueListBlock); CmiReleaseBlock(RegistryFile, ValueBlock); + CmiReleaseBlock(RegistryFile, ValueListBlock); return STATUS_SUCCESS; } -static NTSTATUS +static NTSTATUS CmiDeleteValueFromKey(IN PREGISTRY_FILE RegistryFile, IN PKEY_BLOCK KeyBlock, IN PWSTR ValueName) @@ -2447,7 +2265,7 @@ CmiDeleteValueFromKey(IN PREGISTRY_FILE RegistryFile, PVALUE_LIST_BLOCK ValueListBlock; PVALUE_BLOCK CurValueBlock; - ValueListBlock = CmiGetBlock(RegistryFile, + ValueListBlock = CmiGetBlock(RegistryFile, KeyBlock->ValuesOffset); if (ValueListBlock == 0) { @@ -2464,7 +2282,7 @@ CmiDeleteValueFromKey(IN PREGISTRY_FILE RegistryFile, { RtlCopyMemory(&ValueListBlock->Values[Idx], &ValueListBlock->Values[Idx + 1], - sizeof(BLOCK_OFFSET) * + sizeof(BLOCK_OFFSET) * (KeyBlock->NumberOfValues - 1 - Idx)); } else @@ -2508,7 +2326,7 @@ CmiAllocateKeyBlock(IN PREGISTRY_FILE RegistryFile, NewKeySize = sizeof(KEY_BLOCK) + (wcslen(KeyName) + 1) * sizeof(WCHAR) + (Class != NULL ? (wcslen(Class) + 1) * sizeof(WCHAR) : 0); - DPRINT ("NewKeySize: %lu\n", NewKeySize); +DPRINT ("NewKeySize: %lu\n", NewKeySize); //CHECKPOINT; NewKeyBlock = ExAllocatePool(NonPagedPool, NewKeySize); //CHECKPOINT; @@ -2582,7 +2400,7 @@ CmiDestroyKeyBlock(PREGISTRY_FILE RegistryFile, ExFreePool(KeyBlock); } else - { + { UNIMPLEMENTED; } @@ -2627,7 +2445,7 @@ CmiAllocateHashTableBlock(IN PREGISTRY_FILE RegistryFile, return Status; } -static PHASH_TABLE_BLOCK +static PHASH_TABLE_BLOCK CmiGetHashTableBlock(PREGISTRY_FILE RegistryFile, BLOCK_OFFSET HashBlockOffset) { @@ -2647,7 +2465,7 @@ CmiGetHashTableBlock(PREGISTRY_FILE RegistryFile, return HashBlock; } -static PKEY_BLOCK +static PKEY_BLOCK CmiGetKeyFromHashByIndex(PREGISTRY_FILE RegistryFile, PHASH_TABLE_BLOCK HashBlock, ULONG Index) @@ -2667,7 +2485,7 @@ CmiGetKeyFromHashByIndex(PREGISTRY_FILE RegistryFile, return KeyBlock; } -static NTSTATUS +static NTSTATUS CmiAddKeyToHashTable(PREGISTRY_FILE RegistryFile, PHASH_TABLE_BLOCK HashBlock, PKEY_BLOCK NewKeyBlock) @@ -2703,7 +2521,7 @@ CmiDestroyHashTableBlock(PREGISTRY_FILE RegistryFile, ExFreePool(HashBlock); } else - { + { Status = STATUS_NOT_IMPLEMENTED; } @@ -2714,7 +2532,7 @@ static NTSTATUS CmiAllocateValueBlock(PREGISTRY_FILE RegistryFile, PVALUE_BLOCK *ValueBlock, IN PWSTR ValueNameBuf, - IN ULONG Type, + IN ULONG Type, IN PVOID Data, IN ULONG DataSize) { @@ -2728,7 +2546,7 @@ CmiAllocateValueBlock(PREGISTRY_FILE RegistryFile, /* Handle volatile files first */ if (RegistryFile->Filename == NULL) { - NewValueSize = sizeof(VALUE_BLOCK) + wcslen(ValueNameBuf)* sizeof(WCHAR); + NewValueSize = sizeof(VALUE_BLOCK) + wcslen(ValueNameBuf); NewValueBlock = ExAllocatePool(NonPagedPool, NewValueSize); if (NewValueBlock == NULL) { @@ -2768,10 +2586,10 @@ CmiAllocateValueBlock(PREGISTRY_FILE RegistryFile, return Status; } -static NTSTATUS +static NTSTATUS CmiReplaceValueData(IN PREGISTRY_FILE RegistryFile, IN PVALUE_BLOCK ValueBlock, - IN ULONG Type, + IN ULONG Type, IN PVOID Data, IN ULONG DataSize) { @@ -2813,7 +2631,7 @@ CmiDestroyValueBlock(PREGISTRY_FILE RegistryFile, { NTSTATUS Status; - Status = CmiDestroyBlock(RegistryFile, + Status = CmiDestroyBlock(RegistryFile, CmiGetBlock(RegistryFile, ValueBlock->DataOffset)); if (!NT_SUCCESS(Status)) @@ -2870,7 +2688,7 @@ CmiDestroyBlock(PREGISTRY_FILE RegistryFile, ExFreePool(Block); } else - { + { Status = STATUS_NOT_IMPLEMENTED; } @@ -2916,7 +2734,7 @@ CmiGetBlockOffset(PREGISTRY_FILE RegistryFile, return BlockOffset; } -static VOID +static VOID CmiLockBlock(PREGISTRY_FILE RegistryFile, PVOID Block) { @@ -2926,7 +2744,7 @@ CmiLockBlock(PREGISTRY_FILE RegistryFile, } } -static VOID +static VOID CmiReleaseBlock(PREGISTRY_FILE RegistryFile, PVOID Block) { diff --git a/reactos/ntoskrnl/hal/x86/display.c b/reactos/ntoskrnl/hal/x86/display.c index 630720d101c..2647ca1f36c 100644 --- a/reactos/ntoskrnl/hal/x86/display.c +++ b/reactos/ntoskrnl/hal/x86/display.c @@ -1,4 +1,4 @@ -/* $Id: display.c,v 1.7 2000/07/01 18:23:06 ekohl Exp $ +/* $Id: display.c,v 1.8 2000/09/12 10:12:11 jean Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -130,6 +130,9 @@ HalInitializeDisplay (PLOADER_PARAMETER_BLOCK LoaderBlock) ScanLines = (inb_p (CRTC_DATA) & 0x1F) + 1; SizeY = SizeY / ScanLines; +#ifdef BOCHS_30ROWS +SizeY=25; +#endif HalClearDisplay (); DisplayInitialized = TRUE; diff --git a/reactos/ntoskrnl/io/device.c b/reactos/ntoskrnl/io/device.c index 336d681f263..0fc96c5409b 100644 --- a/reactos/ntoskrnl/io/device.c +++ b/reactos/ntoskrnl/io/device.c @@ -1,4 +1,4 @@ -/* $Id: device.c,v 1.21 2000/09/10 13:54:01 ekohl Exp $ +/* $Id: device.c,v 1.22 2000/09/12 10:12:11 jean Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -234,7 +234,7 @@ IoRegisterDriverReinitialization(PDRIVER_OBJECT DriverObject, UNIMPLEMENTED; } -NTSTATUS IopDefaultDispatchFunction(PDEVICE_OBJECT DeviceObject, +NTSTATUS STDCALL IopDefaultDispatchFunction(PDEVICE_OBJECT DeviceObject, PIRP Irp) { Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED; diff --git a/reactos/ntoskrnl/io/npipe.c b/reactos/ntoskrnl/io/npipe.c index 66852b28b67..9178d92fa57 100644 --- a/reactos/ntoskrnl/io/npipe.c +++ b/reactos/ntoskrnl/io/npipe.c @@ -85,9 +85,14 @@ NTSTATUS STDCALL NtCreateNamedPipeFile( StackLoc->Control = 0; StackLoc->DeviceObject = FileObject->DeviceObject; StackLoc->FileObject = FileObject; - StackLoc->Parameters.CreateNamedPipe.CreateDisposition = - CreateDisposition; - StackLoc->Parameters.CreateNamedPipe.CreateOptions = CreateOptions; + StackLoc->Parameters.Create.Options = (CreateOptions & FILE_VALID_OPTION_FLAGS); + StackLoc->Parameters.Create.Options |= (CreateDisposition << 24); +// StackLoc->Parameters.CreateNamedPipe.CreateDisposition = +// CreateDisposition; +// StackLoc->Parameters.CreateNamedPipe.CreateOptions = CreateOptions; +/* + FIXME : this informations can't be added in Parameters struct because this struct + must be four WORDs long StackLoc->Parameters.CreateNamedPipe.ShareAccess = ShareAccess; StackLoc->Parameters.CreateNamedPipe.WriteModeMessage = WriteModeMessage; StackLoc->Parameters.CreateNamedPipe.ReadModeMessage = ReadModeMessage; @@ -103,6 +108,7 @@ NTSTATUS STDCALL NtCreateNamedPipeFile( { StackLoc->Parameters.CreateNamedPipe.TimeOut.QuadPart = 0; } +*/ Status = IoCallDriver(FileObject->DeviceObject,Irp); if (Status == STATUS_PENDING) diff --git a/reactos/rules.mak b/reactos/rules.mak index 0684fcfbd97..a60bd1a04e9 100644 --- a/reactos/rules.mak +++ b/reactos/rules.mak @@ -3,6 +3,11 @@ # .EXPORT_ALL_VARIABLES: +#HOST = mingw32-windows + +# uncomment if you use bochs and it displays only 30 rows +# BOCHS_30ROWS = yes + ifeq ($(HOST),mingw32-linux) TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) endif @@ -53,11 +58,16 @@ DEBUGGING_CFLAGS = OPTIMIZATIONS = -O2 endif + ifeq ($(WARNINGS_ARE_ERRORS),yes) EXTRA_CFLAGS = -Werror endif +ifeq ($(BOCHS_30ROWS),yes) +DEFINES = -DDBG -DBOCHS_30ROWS +else DEFINES = -DDBG +endif ifeq ($(WIN32_LEAN_AND_MEAN),yes) LEAN_AND_MEAN_DEFINE = -DWIN32_LEAN_AND_MEAN