Results 1 to 5 of 5

Thread: Catch a device connect event

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Posts
    80

    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.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Posts
    80
    Anyone? At least let me know some other places to ask or look...

  3. #3
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602
    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

  4. #4
    Lively Member
    Join Date
    Jan 2003
    Location
    Sydney
    Posts
    69
    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..

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Posts
    80
    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
  •  



Click Here to Expand Forum to Full Width