|
-
Jul 12th, 2010, 01:15 PM
#1
Frenzied Member
Re: Detect when a USB mass storage device is plugged in.
Can this code or Chris's code be used in a Windows service? I tried creating one in VS2008 and putting the code in there but get alot of errors.
Thanks
-
Jul 12th, 2010, 04:31 PM
#2
Re: Detect when a USB mass storage device is plugged in.
 Originally Posted by WarrenW
Can this code or Chris's code be used in a Windows service? I tried creating one in VS2008 and putting the code in there but get alot of errors.
Thanks
I know mine almost certainly cant because it relies on the message that Windows sends to all top level windows when a device is plugged in - and with a Service not having any windows (well, it should have anyway) that means it cannot receive the message.
-
Jul 16th, 2010, 08:27 AM
#3
Frenzied Member
Re: Detect when a USB mass storage device is plugged in.
Chris,
I put your code in a winform app in VS2008 and worked great! Is there any way to detect when it is removed/unplugged from the computer? I'm sure it can detect changes but to determine the same drive was removed.
Thanks!
Warren
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
|