By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,508 Members | 1,856 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,508 IT Pros & Developers. It's quick & easy.

Programmatically STOP a device (VB.NET)

P: n/a

Does the .NET framework (using VB.NET) support the ability to programmatically STOP a device prior to its removal from the system?

I have need to move data from a computer on one network to a computer on a different network. For various reasons, I am not allowed to join these networks. Additionally, neither computer is allowed to disconnect from its network to connect to the other network

I have decided to use a USB jump drive to move the data between the two computers. I would like to make this as easy on the user as possible - these are non-techies. I would like to write a program that would reside on the jump drive itself. This program would copy the data, stop the jump drive (in preparation for its removal), then put up a message box telling the user that the jump drive can be removed. Ideally, this would happen when the jump drive is inserted automagically

I can handle the copy part (you know, the REALLY easy stuff <g>). I THINK an autorun.inf would handle the "run this program automatically" part. I haven't a clue about the "STOP the device" part

Where should I look for the STOP device functionality

Thanks very much for you help
Mik

Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Mike,

Yes you can do this from VB.NET...you will have to use PInvoke to call some
APIs. The APIs you want for device management live here:
http://msdn.microsoft.com/library/de...us/devio/base/
device_management_functions.asp
Thanks! Robert Gruen
Microsoft, VB.NET

This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------
#Thread-Topic: Programmatically STOP a device (VB.NET)
#thread-index: AcQpa54ezU3g6ipUTwOOQdHbrqr6vg==
#X-WN-Post: microsoft.public.dotnet.general
#From: =?Utf-8?B?TWlrZSBCZW5uZXR0?= <an*******@discussions.microsoft.com>
#Subject: Programmatically STOP a device (VB.NET)
#Date: Fri, 23 Apr 2004 12:46:06 -0700
#Lines: 14
#Message-ID: <68**********************************@microsoft.co m>
#MIME-Version: 1.0
#Content-Type: text/plain;
# charset="Utf-8"
#Content-Transfer-Encoding: 7bit
#X-Newsreader: Microsoft CDO for Windows 2000
#Content-Class: urn:content-classes:message
#Importance: normal
#Priority: normal
#X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
#Newsgroups: microsoft.public.dotnet.general
#Path: cpmsftngxa10.phx.gbl
#Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.general:132027
#NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
#X-Tomcat-NG: microsoft.public.dotnet.general
#
#
Does the .NET framework (using VB.NET) support the ability to
programmatically STOP a device prior to its removal from the system?

I have need to move data from a computer on one network to a computer on a
different network. For various reasons, I am not allowed to join these
networks. Additionally, neither computer is allowed to disconnect from its
network to connect to the other network.

I have decided to use a USB jump drive to move the data between the two
computers. I would like to make this as easy on the user as possible -
these are non-techies. I would like to write a program that would reside on
the jump drive itself. This program would copy the data, stop the jump
drive (in preparation for its removal), then put up a message box telling
the user that the jump drive can be removed. Ideally, this would happen
when the jump drive is inserted automagically.

I can handle the copy part (you know, the REALLY easy stuff <g>). I THINK
an autorun.inf would handle the "run this program automatically" part. I
haven't a clue about the "STOP the device" part.

Where should I look for the STOP device functionality?

Thanks very much for you help!
Mike

#

Jul 21 '05 #2

P: n/a
Mike,

Yes you can do this from VB.NET...you will have to use PInvoke to call some
APIs. The APIs you want for device management live here:
http://msdn.microsoft.com/library/de...us/devio/base/
device_management_functions.asp
Thanks! Robert Gruen
Microsoft, VB.NET

This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------
#Thread-Topic: Programmatically STOP a device (VB.NET)
#thread-index: AcQpa54ezU3g6ipUTwOOQdHbrqr6vg==
#X-WN-Post: microsoft.public.dotnet.general
#From: =?Utf-8?B?TWlrZSBCZW5uZXR0?= <an*******@discussions.microsoft.com>
#Subject: Programmatically STOP a device (VB.NET)
#Date: Fri, 23 Apr 2004 12:46:06 -0700
#Lines: 14
#Message-ID: <68**********************************@microsoft.co m>
#MIME-Version: 1.0
#Content-Type: text/plain;
# charset="Utf-8"
#Content-Transfer-Encoding: 7bit
#X-Newsreader: Microsoft CDO for Windows 2000
#Content-Class: urn:content-classes:message
#Importance: normal
#Priority: normal
#X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
#Newsgroups: microsoft.public.dotnet.general
#Path: cpmsftngxa10.phx.gbl
#Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.general:132027
#NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
#X-Tomcat-NG: microsoft.public.dotnet.general
#
#
Does the .NET framework (using VB.NET) support the ability to
programmatically STOP a device prior to its removal from the system?

I have need to move data from a computer on one network to a computer on a
different network. For various reasons, I am not allowed to join these
networks. Additionally, neither computer is allowed to disconnect from its
network to connect to the other network.

I have decided to use a USB jump drive to move the data between the two
computers. I would like to make this as easy on the user as possible -
these are non-techies. I would like to write a program that would reside on
the jump drive itself. This program would copy the data, stop the jump
drive (in preparation for its removal), then put up a message box telling
the user that the jump drive can be removed. Ideally, this would happen
when the jump drive is inserted automagically.

I can handle the copy part (you know, the REALLY easy stuff <g>). I THINK
an autorun.inf would handle the "run this program automatically" part. I
haven't a clue about the "STOP the device" part.

Where should I look for the STOP device functionality?

Thanks very much for you help!
Mike

#

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.