473,387 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Programmatically STOP a device (VB.NET)


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
2 2327
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Abhishek Srivastava | last post by:
Hello All, I am developing a page which has a complex layout. This layout cannot be made using VS alone, so I have to go into the html view and edit the html myself. The problem is that...
6
by: Martin Smith | last post by:
How can I stop ASP.NET Encoding things automatically? e.g if I create a button in my code and add the following attribute objNewButton.Attributes.Add("onClick",...
3
by: Darren Li | last post by:
Hi: Can I stop VS.NET 2003 IDE automatically insert <font> tag into the asp.net web form design view? It just keep inserting that tag with the font I don't want to use. I search document...
1
by: Alan Silver | last post by:
Hello, I am just experimenting with master pages, and am trying to add a content placeholder in the <head> section, so that individual pages can set their own page title and meta tags. The...
2
by: Mike Bennett | last post by:
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...
5
by: Peter Schoots | last post by:
I am an amateur programmer and trying to move from VB6 to VB.net. I can't figure out how to create a ADO.NET database in code. I know how to create a dataset and wonder whether there is a way to...
0
by: Pete Smith | last post by:
Hi, I would like to make sure that my webservice runs on the destination system. Does anybody know how to check programmatically if ASP.NET is enabled on IIS 6.0. An maybe also how to configure...
2
by: ChrisCicc | last post by:
Hi All, I got a real doozy here. I have read hundreds upon hundreds of forum posts and found numerous others who have replicated this problem, but have yet to find a solution. Through testing I have...
0
by: svchosthunter | last post by:
I m using asp.net to search content in files with windows indexing service Once I add files in my catalog I can perform search But when ever I add new Files or change existing in catalog directory...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.