- Fix kernel32 and ntoskrnl build issues. - Define public version of DEVOBJ_EXTENSION in DDK. Modified: trunk/reactos/lib/kernel32/file/mailslot.c Modified: trunk/reactos/ntoskrnl/io/device.c Modified: trunk/reactos/ntoskrnl/io/deviface.c Modified: trunk/reactos/ntoskrnl/io/file.c Modified: trunk/reactos/ntoskrnl/io/plugplay.c Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c Modified: trunk/reactos/w32api/include/ddk/winddk.h Modified: trunk/reactos/w32api/include/ntdef.h _____
Modified: trunk/reactos/lib/kernel32/file/mailslot.c --- trunk/reactos/lib/kernel32/file/mailslot.c 2005-09-04 23:26:35 UTC (rev 17649) +++ trunk/reactos/lib/kernel32/file/mailslot.c 2005-09-04 23:48:19 UTC (rev 17650) @@ -167,10 +167,12 @@
DWORD lReadTimeout) { FILE_MAILSLOT_SET_INFORMATION Buffer; + LARGE_INTEGER Timeout; IO_STATUS_BLOCK Iosb; NTSTATUS Status;
- Buffer.ReadTimeout.QuadPart = lReadTimeout * -10000; + Timeout.QuadPart = lReadTimeout * -10000; + Buffer.ReadTimeout = &Timeout;
Status = NtSetInformationFile(hMailslot, &Iosb, _____
Modified: trunk/reactos/ntoskrnl/io/device.c --- trunk/reactos/ntoskrnl/io/device.c 2005-09-04 23:26:35 UTC (rev 17649) +++ trunk/reactos/ntoskrnl/io/device.c 2005-09-04 23:48:19 UTC (rev 17650) @@ -336,17 +336,17 @@
OUT PDEVICE_OBJECT *AttachedToDeviceObject) { PDEVICE_OBJECT AttachedDevice; - PDEVOBJ_EXTENSION SourceDeviceExtension; + PEXTENDED_DEVOBJ_EXTENSION SourceDeviceExtension;
DPRINT("IoAttachDeviceToDeviceStack(SourceDevice 0x%p, TargetDevice 0x%p)\n", SourceDevice, TargetDevice);
/* Get the Attached Device and source extension */ AttachedDevice = IoGetAttachedDevice(TargetDevice); - SourceDeviceExtension = SourceDevice->DeviceObjectExtension; + SourceDeviceExtension = (PEXTENDED_DEVOBJ_EXTENSION)SourceDevice->DeviceObjectExtension;
/* Make sure that it's in a correct state */ - if (!(AttachedDevice->DeviceObjectExtension->ExtensionFlags & + if (!(((PEXTENDED_DEVOBJ_EXTENSION)AttachedDevice->DeviceObjectExtension)-> ExtensionFlags & (DOE_UNLOAD_PENDING | DOE_DELETE_PENDING | DOE_REMOVE_PENDING | DOE_REMOVE_PROCESSED))) { @@ -624,7 +624,7 @@ }
/* I guess this should be removed later... but it shouldn't cause problems */ - DeviceObject->DeviceObjectExtension->ExtensionFlags |= DOE_DELETE_PENDING; + ((PEXTENDED_DEVOBJ_EXTENSION)DeviceObject->DeviceObjectExtension)->Exten sionFlags |= DOE_DELETE_PENDING;
/* Make the object temporary. This should automatically remove the device from the namespace */ @@ -650,7 +650,7 @@ DPRINT("IoDetachDevice(TargetDevice 0x%p)\n", TargetDevice);
/* Remove the attachment */ - TargetDevice->AttachedDevice->DeviceObjectExtension->AttachedTo = NULL; + ((PEXTENDED_DEVOBJ_EXTENSION)TargetDevice->AttachedDevice->DeviceObjectE xtension)->AttachedTo = NULL; TargetDevice->AttachedDevice = NULL; }
@@ -758,7 +758,7 @@ IoGetDeviceAttachmentBaseRef(IN PDEVICE_OBJECT DeviceObject) { /* Return the attached Device */ - return (DeviceObject->DeviceObjectExtension->AttachedTo); + return (((PEXTENDED_DEVOBJ_EXTENSION)DeviceObject->DeviceObjectExtension)->Atta chedTo); }
/* @@ -790,7 +790,7 @@ IoGetDiskDeviceObject(IN PDEVICE_OBJECT FileSystemDeviceObject, OUT PDEVICE_OBJECT *DiskDeviceObject) { - PDEVOBJ_EXTENSION DeviceExtension; + PEXTENDED_DEVOBJ_EXTENSION DeviceExtension; PVPB Vpb; KIRQL OldIrql;
@@ -801,7 +801,7 @@ IoAcquireVpbSpinLock(&OldIrql);
/* Get the Device Extension */ - DeviceExtension = FileSystemDeviceObject->DeviceObjectExtension; + DeviceExtension = (PEXTENDED_DEVOBJ_EXTENSION)FileSystemDeviceObject->DeviceObjectExtensio n;
/* Make sure this one has a VPB too */ Vpb = DeviceExtension->Vpb; @@ -825,7 +825,7 @@ STDCALL IoGetLowerDeviceObject(IN PDEVICE_OBJECT DeviceObject) { - PDEVOBJ_EXTENSION DeviceExtension = DeviceObject->DeviceObjectExtension; + PEXTENDED_DEVOBJ_EXTENSION DeviceExtension = (PEXTENDED_DEVOBJ_EXTENSION)DeviceObject->DeviceObjectExtension; PDEVICE_OBJECT LowerDeviceObject = NULL;
/* Make sure it's not getting deleted */ _____
Modified: trunk/reactos/ntoskrnl/io/deviface.c --- trunk/reactos/ntoskrnl/io/deviface.c 2005-09-04 23:26:35 UTC (rev 17649) +++ trunk/reactos/ntoskrnl/io/deviface.c 2005-09-04 23:48:19 UTC (rev 17650) @@ -618,8 +618,8 @@
ASSERT(PdoNameInfo->Name.Length);
/* Create base key name for this interface: HKLM\SYSTEM\CurrentControlSet\Control\DeviceClasses{GUID} */ - ASSERT(PhysicalDeviceObject->DeviceObjectExtension->DeviceNode); - InstancePath = &PhysicalDeviceObject->DeviceObjectExtension->DeviceNode->InstancePath; + ASSERT(((PEXTENDED_DEVOBJ_EXTENSION)PhysicalDeviceObject->DeviceObjectEx tension)->DeviceNode); + InstancePath = &((PEXTENDED_DEVOBJ_EXTENSION)PhysicalDeviceObject->DeviceObjectExtensio n)->DeviceNode->InstancePath; BaseKeyName.Length = wcslen(BaseKeyString) * sizeof(WCHAR); BaseKeyName.MaximumLength = BaseKeyName.Length + GuidString.Length; _____
Modified: trunk/reactos/ntoskrnl/io/file.c --- trunk/reactos/ntoskrnl/io/file.c 2005-09-04 23:26:35 UTC (rev 17649) +++ trunk/reactos/ntoskrnl/io/file.c 2005-09-04 23:48:19 UTC (rev 17650) @@ -751,7 +751,7 @@
PFILE_OBJECT FileObject = NULL; PDEVICE_OBJECT DeviceObject; PIRP Irp; - PIO_STACK_LOCATION StackLoc; + PEXTENDED_IO_STACK_LOCATION StackLoc; IO_SECURITY_CONTEXT SecurityContext; KPROCESSOR_MODE AccessMode; HANDLE LocalHandle; @@ -999,7 +999,7 @@ * Get the stack location for the new * IRP and prepare it. */ - StackLoc = IoGetNextIrpStackLocation(Irp); + StackLoc = (PEXTENDED_IO_STACK_LOCATION)IoGetNextIrpStackLocation(Irp); StackLoc->MinorFunction = 0; StackLoc->Flags = (UCHAR)Options; StackLoc->Control = 0; _____
Modified: trunk/reactos/ntoskrnl/io/plugplay.c --- trunk/reactos/ntoskrnl/io/plugplay.c 2005-09-04 23:26:35 UTC (rev 17649) +++ trunk/reactos/ntoskrnl/io/plugplay.c 2005-09-04 23:48:19 UTC (rev 17650) @@ -439,7 +439,7 @@
if (DeviceObject == NULL) return STATUS_NO_SUCH_DEVICE;
- DeviceNode = DeviceObject->DeviceObjectExtension->DeviceNode; + DeviceNode = ((PEXTENDED_DEVOBJ_EXTENSION)DeviceObject->DeviceObjectExtension)->Devic eNode; }
switch (RelatedDeviceData->Relation) @@ -518,7 +518,7 @@ if (DeviceObject == NULL) return STATUS_NO_SUCH_DEVICE;
- DeviceNode = DeviceObject->DeviceObjectExtension->DeviceNode; + DeviceNode = ((PEXTENDED_DEVOBJ_EXTENSION)DeviceObject->DeviceObjectExtension)->Devic eNode;
switch (StatusData->Operation) { @@ -559,7 +559,7 @@ if (DeviceObject == NULL) return STATUS_NO_SUCH_DEVICE;
- DeviceNode = DeviceObject->DeviceObjectExtension->DeviceNode; + DeviceNode = ((PEXTENDED_DEVOBJ_EXTENSION)DeviceObject->DeviceObjectExtension)->Devic eNode;
DepthData->Depth = DeviceNode->Level;
_____
Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c --- trunk/reactos/ntoskrnl/io/pnpmgr.c 2005-09-04 23:26:35 UTC (rev 17649) +++ trunk/reactos/ntoskrnl/io/pnpmgr.c 2005-09-04 23:48:19 UTC (rev 17650) @@ -30,7 +30,7 @@
IopGetDeviceNode( PDEVICE_OBJECT DeviceObject) { - return DeviceObject->DeviceObjectExtension->DeviceNode; + return ((PEXTENDED_DEVOBJ_EXTENSION)DeviceObject->DeviceObjectExtension)->Devic eNode; }
NTSTATUS @@ -619,7 +619,7 @@
Node->PhysicalDeviceObject = PhysicalDeviceObject;
- PhysicalDeviceObject->DeviceObjectExtension->DeviceNode = Node; + ((PEXTENDED_DEVOBJ_EXTENSION)PhysicalDeviceObject->DeviceObjectExtension )->DeviceNode = Node;
if (ParentNode) { _____
Modified: trunk/reactos/w32api/include/ddk/winddk.h --- trunk/reactos/w32api/include/ddk/winddk.h 2005-09-04 23:26:35 UTC (rev 17649) +++ trunk/reactos/w32api/include/ddk/winddk.h 2005-09-04 23:48:19 UTC (rev 17650) @@ -2668,6 +2668,13 @@
KSPIN_LOCK SpinLock; } ERESOURCE, *PERESOURCE;
+typedef struct _DEVOBJ_EXTENSION +{ + CSHORT Type; + USHORT Size; + PDEVICE_OBJECT DeviceObject; +} DEVOBJ_EXTENSION, *PDEVOBJ_EXTENSION; + typedef struct _DRIVER_EXTENSION { struct _DRIVER_OBJECT *DriverObject; PDRIVER_ADD_DEVICE AddDevice; _____
Modified: trunk/reactos/w32api/include/ntdef.h --- trunk/reactos/w32api/include/ntdef.h 2005-09-04 23:26:35 UTC (rev 17649) +++ trunk/reactos/w32api/include/ntdef.h 2005-09-04 23:48:19 UTC (rev 17650) @@ -8,6 +8,7 @@
#define RESTRICTED_POINTER
#define NTAPI __stdcall + #define OBJ_INHERIT 0x00000002 #define OBJ_PERMANENT 0x00000010 #define OBJ_EXCLUSIVE 0x00000020