Revert most of IoCreateStreamFileObject... it's wrong but needs to be wrong for now.
Modified: trunk/reactos/ntoskrnl/io/file.c

Modified: trunk/reactos/ntoskrnl/io/file.c
--- trunk/reactos/ntoskrnl/io/file.c	2005-05-09 22:12:43 UTC (rev 15194)
+++ trunk/reactos/ntoskrnl/io/file.c	2005-05-09 22:35:43 UTC (rev 15195)
@@ -994,16 +994,16 @@
  *
  * @implemented
  */
-PFILE_OBJECT
+PFILE_OBJECT 
 STDCALL
 IoCreateStreamFileObject(PFILE_OBJECT FileObject,
                          PDEVICE_OBJECT DeviceObject)
 {
     PFILE_OBJECT CreatedFileObject;
     NTSTATUS Status;
-
-    /* FIXME: This function should call ObInsertObject. The "Lite" version
-       doesnt. This function is also called from IoCreateFile for some
+    
+    /* FIXME: This function should call ObInsertObject. The "Lite" version 
+       doesnt. This function is also called from IoCreateFile for some 
        reason. These hacks need to be removed.
     */
 
@@ -1030,12 +1030,17 @@
     /* Choose Device Object */
     if (FileObject) DeviceObject = FileObject->DeviceObject;
     DPRINT("DeviceObject %x\n", DeviceObject);
-
+    
+    /* HACK */
+    DeviceObject = IoGetAttachedDevice(DeviceObject);
+    
     /* Set File Object Data */
-    CreatedFileObject->DeviceObject = DeviceObject;
+    CreatedFileObject->DeviceObject = DeviceObject; 
     CreatedFileObject->Vpb = DeviceObject->Vpb;
     CreatedFileObject->Type = IO_TYPE_FILE;
-    CreatedFileObject->Flags = FO_STREAM_FILE;
+    /* HACK */
+    CreatedFileObject->Flags |= FO_DIRECT_DEVICE_OPEN;
+    //CreatedFileObject->Flags = FO_STREAM_FILE;
 
     /* Initialize Lock and Event */
     KeInitializeEvent(&CreatedFileObject->Event, NotificationEvent, FALSE);
@@ -1057,6 +1062,7 @@
     UNIMPLEMENTED;
     return 0;
 }
+
 /*
  * @unimplemented
  */