Not sure exactly how to describe this or if it's even possible, so I'll
do my best and would appreciate some suggestions.
I'm currently working on a service that will allow me to automate some
file and folder manipulations. While this question is not concerning the
primary purpose of the program, I think it would be a nice addition.
What I'd like to be able to do is have the service be able to "detect"
whenever the user attaches some mass storage device (flash drive, usb
hard drives, mp3 players that don't need any soft, some media in card
readers like CF or SD, etc.) and be able to identify it, like by a
serial number or something. Would this be possible through some API
maybe? It's only for Win2k, XP, and 2k3, and all of those all do these
operations very easily and quickly, just a little pop-up from sys tray
to let you know that the device has been identified. How could I monitor
those events, find some information about the device that would separate
it from all others, and then get the drive letter that windows gave it?
Might be a rather complex problem, but like I've said, don't know much
about or how to even begin. If you have any ideas, please let me know.
Thanks. 3 5619
Hi,
Create a windows hook to look for the WM_DEVICECHANGE message. http://msdn.microsoft.com/msdnmag/is...0/CuttingEdge/ http://www.dotnet247.com/247referenc...43/217435.aspx
Ken
--------------------
"Max" <ma*****@yahoo.com> wrote in message
news:OY********************@comcast.com... Not sure exactly how to describe this or if it's even possible, so I'll do my best and would appreciate some suggestions.
I'm currently working on a service that will allow me to automate some file and folder manipulations. While this question is not concerning the primary purpose of the program, I think it would be a nice addition. What I'd like to be able to do is have the service be able to "detect" whenever the user attaches some mass storage device (flash drive, usb hard drives, mp3 players that don't need any soft, some media in card readers like CF or SD, etc.) and be able to identify it, like by a serial number or something. Would this be possible through some API maybe? It's only for Win2k, XP, and 2k3, and all of those all do these operations very easily and quickly, just a little pop-up from sys tray to let you know that the device has been identified. How could I monitor those events, find some information about the device that would separate it from all others, and then get the drive letter that windows gave it?
Might be a rather complex problem, but like I've said, don't know much about or how to even begin. If you have any ideas, please let me know. Thanks.
Would you by any chance have some VB code examples? I did a little bit
of looking around, but most of what I found was in C++ and still nothing
that gets me any closer.
Ken Tucker [MVP] wrote: Hi,
Create a windows hook to look for the WM_DEVICECHANGE message. http://msdn.microsoft.com/msdnmag/is...0/CuttingEdge/ http://www.dotnet247.com/247referenc...43/217435.aspx
Ken -------------------- "Max" <ma*****@yahoo.com> wrote in message news:OY********************@comcast.com...
Not sure exactly how to describe this or if it's even possible, so I'll do my best and would appreciate some suggestions.
I'm currently working on a service that will allow me to automate some file and folder manipulations. While this question is not concerning the primary purpose of the program, I think it would be a nice addition. What I'd like to be able to do is have the service be able to "detect" whenever the user attaches some mass storage device (flash drive, usb hard drives, mp3 players that don't need any soft, some media in card readers like CF or SD, etc.) and be able to identify it, like by a serial number or something. Would this be possible through some API maybe? It's only for Win2k, XP, and 2k3, and all of those all do these operations very easily and quickly, just a little pop-up from sys tray to let you know that the device has been identified. How could I monitor those events, find some information about the device that would separate it from all others, and then get the drive letter that windows gave it?
Might be a rather complex problem, but like I've said, don't know much about or how to even begin. If you have any ideas, please let me know. Thanks.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Garet Cammer |
last post by:
Hi Everyone,
I am writing a program to perform backup operations using the VB scripting
File System Object to copy to removable media storage...
|
by: Cliff Liao |
last post by:
Hi all,
I am trying to install the .NET framework 1.1 runtime package on
Windows 2000 SP4. While the installation starts well, I get the...
|
by: Rob |
last post by:
int *p;
p = malloc(1);
free(p);
/* */
In the above code, how do I detect that variable p points to nothing?
|
by: Ryan |
last post by:
I'm writing a utility that needs to be aware of media (CD, DVD, Zip
disk, usb stick, etc) insertions and removals. Which seems to be more
of a...
|
by: vishal |
last post by:
I have a removable device attached to the pc.
I want some code to detect that particular device.
Can I achieve this thru vb.net?
If yes just help...
|
by: Mike Joyce |
last post by:
I am trying to write a portable script that will find removable media,
such as compact flash, sd card, usb, etc. drive and then upload files
from...
|
by: glenn |
last post by:
Hi
can anyone tell me how given a directory or file path, I can
pythonically tell if that item is on 'removable media', or sometype of
vfs, the...
|
by: yellowblueyellow |
last post by:
Hey All,
I am using the following line of code to pick all logical drives on
the local machine:
string drives = Directory.GetLogicalDrives();...
|
by: Per Juul Larsen |
last post by:
Hi
my VB program must always start from a removable disk. In addition, on
the removable media to be images of the type *. jpg *. tips.
If not the...
|
by: concettolabs |
last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
|
by: better678 |
last post by:
Question:
Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct?
Answer:
Java is an object-oriented...
|
by: teenabhardwaj |
last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
|
by: CD Tom |
last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
|
by: CD Tom |
last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
|
by: jalbright99669 |
last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
|
by: Matthew3360 |
last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function.
Here is my code.
...
|
by: Arjunsri |
last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
| |