|
-
May 28th, 2004, 08:10 PM
#1
Thread Starter
Lively Member
Catch a device connect event
I'm writing a little program that needs to work with removable media... That would be things like USB drives, memory (Flash, CF, SD, etc.), and FireWire drives. Basically anything that can be connected to a computer while it's on, have Windows identify the device, install the drivers, and assign a drive letter to the device.
What I need to do is be able to do is catch such an event, get information about it - what drive letter did windows give it, and also some kind of identification that would separate one device from any other (some serial number maybe?). How could I go about doing this? Would love to see some code for this, but even some reference material would be fine. Please let me know. Thanks.
-
May 30th, 2004, 05:54 PM
#2
Thread Starter
Lively Member
Anyone? At least let me know some other places to ask or look...
-
May 31st, 2004, 05:02 PM
#3
Frenzied Member
Look in msdn for any device articles, SDK's... I wrote drivers for a custom usb hardware a few years ago and the msdn had some good information about how it worked in windows... although this was in C++ for windows 98, but they should have the same info nowadays for .net and winxp... without the troublesome kernel calls and vxd files hehe 
kind regards
Henrik
-
Jun 2nd, 2004, 11:15 PM
#4
Lively Member
i'd get a timer in vb to look for a drive letter declared in an .ini file.. if drive does not exist, try again, if it does, do whatever you need to do with it..
-
Jun 3rd, 2004, 12:18 AM
#5
Thread Starter
Lively Member
What .ini file??? And that still won't help me separate one drive from another, need some serial number or something.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|