From 46a7ac8e8759d22cdf81c3a6acc3198e35dcc115 Mon Sep 17 00:00:00 2001 From: short <> Date: Thu, 12 Dec 2002 03:43:29 +0000 Subject: [PATCH] IoCreateStreamFileObject(): force: Flags |= FO_SYNCHRONOUS_IO IoCreateStreamFileObject(): Initialize 'FileName' to be empty --- ntoskrnl/io/create.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ntoskrnl/io/create.c b/ntoskrnl/io/create.c index 2e4a562..7c49df4 100644 --- a/ntoskrnl/io/create.c +++ b/ntoskrnl/io/create.c @@ -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); -- 1.8.3.1