Solved

STOP/UNPLUG usb hardware

Posted on 2004-10-19
9
868 Views
Last Modified: 2012-08-13
Hi,

When you plug in a USB device, you get an icon in the tray which lets you stop a usb device to unplug it.

I'd like to do this from delphi.

Can anybody help?
0
Comment
Question by:jamesr123456
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 11

Accepted Solution

by:
robert_marquardt earned 125 total points
ID: 12346931
The central function is CM_Request_Device_Eject from the Config Manager API.
contact me directly and i can send you the header conversion for the file.

robert_marquardt att gmx dott de
0
 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 12349959
Robert, please avoid direct contact with people who ask questions because this often results in PAQ'ed Questions in EE without any answer. EE is not just meant to answer questions but also to become an knowledge database for the whole community. Thus questions without answers would not be useful here.
Either post a link to the converted header file or copy&paste the whole header here...
0
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 12354941
I have not made the headers public yet and it has a size of 144K. No other way as direct contact for experiments.
0
 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 12355427
Well, if you didn't make them public yet then it might be better that you don't share them with someone else. In which case you might have a solution but not one that is useful for EE. So, my advise: HURRY! Make it public ASAP because if you're already giving copies away it soon will be public anyway... :-)
Or just post a simple code example, if possible...
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:jamesr123456
ID: 12387385
Robert:

How do I use CM_Request_Device_Eject? by the way the device does not have a drive letter


------------------------------------------------------------------------------------------------------
I have two examples. One tries to mimic the display of the Device Manager, the other simply tests some of the enumerations available in the Config Manager API.
The trick to match a drive letter to a device to call CM_Request_Device_Eject on i do not know yet.

The dialog of the "safe removal" tray application can be shown programatically. The corresponding HOTPLUG.DLLis also a standard Control Panel DLL which can be accessed like any other Control Panel.
That DLL is probably also a way to handle the "safe removal"
programatically. At least the exported names indicate that.
0
 
LVL 9

Expert Comment

by:ginsonic
ID: 12411792
Can I have the header conversion for the file? I can offer 500 points for it.
0
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 12412418
No real need for points.
Contact me directly robert_marquardt att gmx dott de
And a free "safe removal" experiment too :-)
0
 
LVL 9

Expert Comment

by:ginsonic
ID: 12422887
Fail when try to send you a mail. Maybe you can do this at test att construiesc dottt ro. Thanks!
0
 
LVL 9

Expert Comment

by:ginsonic
ID: 12424498
Thanks Robert!
I try to run the project but can't find ModuleLoader. I lost something ?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now