Explorer has a habit of getting in the way when you try to alter the
behaviour below it by returning an error.
I remember hitting a similar problem a year or two ago with the
PsSetCreateProcessNotifyRoutineEx function. The callback has a
PS_CREATE_NOTIFY_INFO struct which lets you set a CreationStatus variable to
prevent a process from being created. The only problem with this is that
explorer will display whatever error you choose in the message box you
mention, which is really annoying and not very transparent.
I had to write a lot of code to try and tear down the process silently once
it had been successfully created (to appease explorer) but before any code
could run in that process.
I realise this doesn’t really help you, but thought I’d share the story.
You’re going to have to come up with a various elaborate ways to work around
this, try them all and see which works best.
Ged.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Rod Widdowson
Sent: 18 March 2014 18:58
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Preventing folder rename
How very Heisenberg. The rename has either succeeded or failed. If it
fails Explorer will complain but if it succeeds then explorer will assume
that the rename happened, but you kinda want the file to be renamed, and yet
not.
I have never written one, but maybe you need a shell extension to tell
explorer that the rename didn’t happen, and then return a distinguished
error (or failure) from your filter.
But I suspect your users will get as confused as I am…
Rod
NTFSD is sponsored by OSR
OSR is hiring!! Info at http://www.osr.com/careers
For our schedule of debugging and file system seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer