Good morning rubyists,
has anyone ever tried to termiante a USB device on a Win XP system from ruby?
best regard out of the ice
eric.
···
--
Dr. Eric-Roger Bruecklmeier
Electronics Engineer / Communications Officer
Neumayer Station Antarctica
70°39'S 08°15'W
How's the weather down there?
I haven't tried, but it may be possible using the following technique.
Let me know if you need more help doing any of the steps:
1) Using ruby dl, connect to setupapi.dll and kernel32.dll
2) Call the function CM_Locate_DevNode to get the device handle for
the usb drive.
3) Call the function CM_Request_Device_Eject to stop the usb device.
You'll need to do a google search of microsoft.com for each of those
functions to know how to call them.
Dan
···
On 2/1/06, E.-R. Bruecklmeier <a82374237x@radio-eriwan.de> wrote:
Good morning rubyists,
has anyone ever tried to termiante a USB device on a Win XP system from
ruby?
best regard out of the ice
eric.
--
Dr. Eric-Roger Bruecklmeier
Electronics Engineer / Communications Officer
Neumayer Station Antarctica
70°39'S 08°15'W
I'm officially using you as a reference in my next "Ruby/Rails is Viable"
defense :
"They use in research on Antartica"
···
On 2/1/06, E.-R. Bruecklmeier <a82374237x@radio-eriwan.de> wrote:
Good morning rubyists,
has anyone ever tried to termiante a USB device on a Win XP system from
ruby?
best regard out of the ice
eric.
--
Dr. Eric-Roger Bruecklmeier
Electronics Engineer / Communications Officer
Neumayer Station Antarctica
70°39'S 08°15'W
--
------------------------------
Forget the icing. Bake the Cake!
- the epi-centered developer
------------------------------
Peter Fitzgibbons
Peter Fitzgibbons schrieb:
I'm officially using you as a reference in my next "Ruby/Rails is Viable"
defense :
"They use in research on Antartica"
not yet and not until the problem with the USB device is solved :-/
eric.
···
--
Dr. Eric-Roger Bruecklmeier
Electronics Engineer / Communications Officer
Neumayer Station Antarctica
70°39'S 08°15'W
Daniel Amelang schrieb:
not yet and not until the problem with the USB device is solved :-/
So how far have you got?
I'm still looking for a posibillity to switch of a USB device out of ruby.
eric.
···
--
Dr. Eric-Roger Bruecklmeier
Electronics Engineer / Communications Officer
Neumayer Station Antarctica
70°39'S 08°15'W
Quoting "E.-R. Bruecklmeier" <a82374237x@radio-eriwan.de>:
Daniel Amelang schrieb:
>>not yet and not until the problem with the USB device is solved
:-/
> So how far have you got?
I'm still looking for a posibillity to switch of a USB device out
of ruby.
That isn't really a Ruby question so much as an "is there a
library/API to do this and can I use it from Ruby?" question. (If
the first answer is yes, the second answer is a qualified yes,
though you might need to write a C extension.)
What specific USB device are we talking about, and what do you mean
by "switch off"? Is this something you already know how to do from
another language?
-mental
Did you get my first reply that specified the functions you (likely)
have to call?
Dan Amelang
···
On 2/2/06, E.-R. Bruecklmeier <a82374237x@radio-eriwan.de> wrote:
Daniel Amelang schrieb:
>>not yet and not until the problem with the USB device is solved :-/
>
>
> So how far have you got?
>
I'm still looking for a posibillity to switch of a USB device out of ruby.
eric.
--
Dr. Eric-Roger Bruecklmeier
Electronics Engineer / Communications Officer
Neumayer Station Antarctica
70°39'S 08°15'W