IoCreateStreamFileObject(): force: Flags |= FO_SYNCHRONOUS_IO
authorshort <>
Thu, 12 Dec 2002 03:43:29 +0000 (03:43 +0000)
committershort <>
Thu, 12 Dec 2002 03:43:29 +0000 (03:43 +0000)
IoCreateStreamFileObject(): Initialize 'FileName' to be empty

ntoskrnl/io/create.c

index 2e4a562..7c49df4 100644 (file)
@@ -227,6 +227,15 @@ IoCreateStreamFileObject(PFILE_OBJECT FileObject,
    * FO_STREAM_FILE is according to W32 documentation.
    */
   CreatedFileObject->Flags |= FO_STREAM_FILE;
+#ifdef LIBCAPTIVE
+  /* We are fully single-threaded/single-processed;
+   * prevent at least IopDeleteFile()->...->IoIsOperationSynchronous() to return FALSE
+   */
+  CreatedFileObject->Flags |= FO_SYNCHRONOUS_IO;
+#endif /* LIBCAPTIVE */
+  CreatedFileObject->FileName.Length=0;
+  CreatedFileObject->FileName.MaximumLength=0;
+  CreatedFileObject->FileName.Buffer=NULL;
 
   // shouldn't we initialize the lock event, and several other things here too?
   KeInitializeEvent(&CreatedFileObject->Event, NotificationEvent, FALSE);