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

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...