Discussion:
Remove drive based on DOS drive letter
(too old to reply)
MetaJack
2010-06-09 14:33:58 UTC
Permalink
I am trying to find a way to remove a drive from the system on the basis of
selecting the associated Drive Letter. The routines
CM_Query_And_Remove_SubTree() and SetupDiRemoveDevice() will do the job, but
operate in one of several physical drive name spaces. I have tried following
threads that talk about bridging from logical drive name spaces to physical
drive name spaces, but none of them seem to reach the space that these two
routines use. I know this has to be possible since I see other programs doing
it. What did I miss?
Uwe Sieber
2010-06-10 07:06:08 UTC
Permalink
Post by MetaJack
I am trying to find a way to remove a drive from the system on the basis of
selecting the associated Drive Letter. The routines
CM_Query_And_Remove_SubTree() and SetupDiRemoveDevice() will do the job, but
operate in one of several physical drive name spaces. I have tried following
threads that talk about bridging from logical drive name spaces to physical
drive name spaces, but none of them seem to reach the space that these two
routines use. I know this has to be possible since I see other programs doing
it. What did I miss?
Drive letters which point to physical drives are
global objects. Drive letter which exist in the
user's namespace are subst, network or TrueCrypt
like drives. Nothing to prepare for safe removal.

Why you start a new thread? In m.p.d.device.drivers
I had pointed to my sample:
http://www.codeproject.com/system/RemoveDriveByLetter.asp
Do you have a drive which it cannot prepare for safe
removal?


Uwe
MetaJack
2010-06-10 14:11:12 UTC
Permalink
Sorry for the double post. The post at device.drivers never showed back up on
my web-based news reader until today. I concluded that device.drivers must be
one of the news groups that Microsoft was shutting down and tried again in a
group that was talking about the same group of functions.

Your sample code at codeproject looks like exactly what I have been
searching for. Thanks a million.
Post by Uwe Sieber
Post by MetaJack
I am trying to find a way to remove a drive from the system on the basis of
selecting the associated Drive Letter. The routines
CM_Query_And_Remove_SubTree() and SetupDiRemoveDevice() will do the job, but
operate in one of several physical drive name spaces. I have tried following
threads that talk about bridging from logical drive name spaces to physical
drive name spaces, but none of them seem to reach the space that these two
routines use. I know this has to be possible since I see other programs doing
it. What did I miss?
Drive letters which point to physical drives are
global objects. Drive letter which exist in the
user's namespace are subst, network or TrueCrypt
like drives. Nothing to prepare for safe removal.
Why you start a new thread? In m.p.d.device.drivers
http://www.codeproject.com/system/RemoveDriveByLetter.asp
Do you have a drive which it cannot prepare for safe
removal?
Uwe
.
Continue reading on narkive:
Loading...