How to disable "System Restore" for file (not a whole disk) ?
From: Aleksey Rechinskiy (ar_(dont_spam_please)faramir_at_mail.ru)
Date: 03/26/04
- Next message: Dave August: "Re: Driver Signing without Windows Logo"
- Previous message: Don Burn: "Re: Driver Signing without Windows Logo"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 26 Mar 2004 18:53:52 +0300
Hello!
I need to write some data to a file during processing of IRP_MJ_WRITE in
_storage_ class driver. The file HANDLE hMyFile is opened via
ZwCreateFile(&hMyFile) with options:
FILE_NON_DIRECTORY_FILE |
FILE_RANDOM_ACCESS |
FILE_SYNCHRONOUS_IO_NONALERT |
FILE_NO_INTERMEDIATE_BUFFERING.
(It is mandatory to specify FILE_RANDOM_ACCESS and disable data caching with
FILE_NO_INTERMEDIATE_BUFFERING)
The IRP_MJ_WRITE is queued to a worker thread, which does
ZwWriteFile(hMyFile).
Everything works fine in Windows 2000(chk/free) and pure Windows XP
(chk/free), but sometimes ZwWriteFile never returns in Windows XP SP1
(chk/free) (it gets stuck on call to KeWaitForSingleObject() from
MountMgr.sys, which itself called from sr.sys somewhere deep in kernel)
I noticed disabling "System Restore" feature on drive where hMyFile is
located, won't trigger this problem. But as I read in DDK, "System Restore"
consists of file system filter driver. Then, it is logical to guess it's
possible to turn off "System Restore" for only one particular file (just
hMyFile). But I couldn't find any info about it in DDK for XPSP1 and its
sample sources.
So, the question is how to turn off the "System Restore" feature for a file?
As usual, any information would be greatly appreciated!
Thanks.
Aleksey.
- Next message: Dave August: "Re: Driver Signing without Windows Logo"
- Previous message: Don Burn: "Re: Driver Signing without Windows Logo"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|