How are you sure your GUID is correct? Win32::API doesn't have any built in understanding of GUIDs. If you got your GUIDs by dropping the '-'s, you did it wrong. Also there might be a bug in your using of Encode. Encode won't put a wide null unless you explicitly have a "\x00" in the scalar that you can see. Encode WONT see the secret null that perl keeps after the end of the visible string. Win32::API uses the letter S, not P for structs. P is for a scalar string (or self packed integer "\x01\x02\x03\x04" or self packed struct). An API::Struct is a object, if you print it, you'll probably get the reference in hex. So whoever is using the the IPPI prototype is very wrong.

Post the code where you created the API object and the prototype you used. Your code isn't runnable currently.

update, I just noticed the part where you mentioned "Win32::Wlan::API", the previous 2 paragraphs were written without me realizing your using a CPAN mod. After looking at Wlan::API, I see Wlan::API never uses API::Struct. Using P instead of S is probably your error.

In reply to Re^3: Adding WlanConnect() to Win32::Wlan::API by bulk88
in thread Adding WlanConnect() to Win32::Wlan::API by tomsell

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.