开发者

Is there a way to identify a USB pnp event in Perl code on Windows?

Is anyone familiar with how to identify a USB pnp event with Perl on a Windows (win32 system)?

There is Device::USB (Use libusb to access USB device开发者_开发百科s) but it suitable for linux, and in order to work in Windows it require libusb and even that not require it to works, is there any other option to identify if a USB device is plugged or unplugged on a Win32 system with Perl? If yes, could someone show an example?


There is an Device::USB for Windows for ActiveState Perl 5.10


Device::USB under Win32 has bugs... and it crashes perl.exe :-) never got that before ;-) but i need this package and i hope the bugs will soon be fixed!

I think the biggest problem for the package is Inline::C

The most problems come when you receive large amounts of data (>10 bytes). One of the first things I removed was the pakage Carp, it does more bad than good with this package under win32.

Anyone got it working 'good' under WinXP?!

Greetings

Christian Netherlands

One of the (Out of Memory!? LOL) bugs from Device::USB package:

Out of memory! 
Software error:
Callback called exit at C:/Perl/lib/AutoLoader.pm line 27,  line 1.

For help, please send mail to this site's webmaster, giving this error message and the time and date of the error. 

[Wed Feb 24 15:21:04 2010] AutoLoader.pm: Callback called exit at C:/Perl/lib/AutoLoader.pm line 27, line 1. 

A solution for running the script trough ISS is using undef *DATA; but it isnt the most clean option, its a bit dirty ;-)! but for now it is working... (i hope)

:'( More Errors:

Free to wrong pool 2441d8 not 20100 during global destruction.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜