Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^11: Adding WlanConnect() to Win32::Wlan::API (pack and go!)

by tomsell (Acolyte)
on Jun 28, 2012 at 08:48 UTC ( [id://978860]=note: print w/replies, xml ) Need Help??


in reply to Re^10: Adding WlanConnect() to Win32::Wlan::API (structs no go?)
in thread Adding WlanConnect() to Win32::Wlan::API

Thanks for the rewrite! It makes sense.

However. I have to report that perl.exe (ActiveState v5.8.8) dies with an exception when making the call to the native WlanConnect() and Windows pops up its error reporting applet. Well, it might be XP or it might be the adhoc network but I guess that's the end of the line.

Update: SUCCESS! WlanConnect() connects.

I had failed to re-adjust the signature. Must be:

['WlanConnect' => 'IPPI' => 'I']

Thanks, bulk88!

Replies are listed 'Best First'.
Re^12: Adding WlanConnect() to Win32::Wlan::API (pack and go, almost)
by Corion (Patriarch) on Jun 28, 2012 at 08:54 UTC

    Likely, the exception comes from improperly (un)packing a parameter, or packing it with the wrong width. I would look close at the parameters and their values, and compare them to the C equivalents.

    This gives me a horrible idea - maybe Convert::Binary::C can be abused to generate pack templates for arbitrary structs, as it contains the necessary logic to invoke a C compiler for getting the struct (and alignment) information. A cursory glance doesn't show me the easy way to get a pack/unpack template pair from that, but likely there is a way...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://978860]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-03-29 13:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found