473,387 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How would I find the state of a specified Disc Drive?

Tyler Wiebe
I'd like to know if it's possible to find the state of a specified disc drive.

EXAMPLE:
D:/ Is Opening
D:/ Is Open
D:/ Is Closing
D:/ Is Closed
D:/ Is Empty
D:/ Is Occupied
D:/ Is Being Used By Another Process

It'd be really nice if, including just getting the state of the specified disc drive, there was a on state change event, and opening and closing capabilities as well.

But either would do. Any info would be great.
Jul 27 '11 #1
1 1702
Really the only way you can do this would be to hook onto the operating system filer. AFAIK, you can't do this directly in C#

System.Management will certainly help you find the drives, but not the physical state of the drives

http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx

may help though...
Aug 5 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Odd-R. | last post by:
I have this list: All the dictionaries of this list are of the same form, and all the oids are distinct. If I have an oid and the list, how is the simplest way of getting the dictionary that...
0
by: fred | last post by:
Is there any way I can find out if "K:\Reader\myFile.PDF" and "\\Johns pc\C\Acrobat3\Reader\myFile.PDF" reference the same file. That is: can I find out that K drive maps to the network drive...
13
by: Brad | last post by:
I will also post this in the CR group but because I program in VB maybe somebody here might be able to help. I am working on a new project that incorporates a few forms. I just created my first...
1
by: hypermommy | last post by:
Hi all, I have a problem that's got me just stumped. On my local machine (WinXPPro) my application runs just fine. But on the client's server (Win2003ServerStandard) when I try to pull up my...
1
by: =?Utf-8?B?VEhOS0lUMjAwOA==?= | last post by:
TRIED TO PUT IN A MUSIC CD TO PLAY FROM OUR LOCAL LIBRARY-NOTHING HAPPENS. TRIED TO FIND CD/DVD DRIVE ON "COMPUTER" AND DIDN'T FIND IT YET I HAVE A DRIVE ON MY LAPTOP. HOW DO FIND ON MY COMPUTER...
2
by: aviraldg | last post by:
Well , could someone tell me how to read/write to a disc drive ? And by disc drive , I mean *disc*drive* , not the files on it. I'm using VC++ 6 , and would prefer the easiest method , even if it...
1
by: Seriph | last post by:
Hey I just installed Textpad ver 4.something and writen up a simple println program, but I cant compile it. I keep getting the message "cannot find the file specified" with...
1
by: =?Utf-8?B?T2FrZGVuZQ==?= | last post by:
I've just bought a new computer and want to load my Office software onto it. The software is on a disc, but the computer doesn't have a disc drive. I've tried loading the disc onto a flash drive...
2
by: Gilles Ganault | last post by:
Hello I'm trying to use urllib to download web pages with the GET method, but Python 2.5.1 on Windows turns the URL into something funny: ======== url = "amazon.fr/search/index.php?url=search"
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.