Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Could this lead to problems with the array reference?

I don't see any reason that should lead to any problems.

There are other approaches (apart from Win32::API) that you can take - eg XS or Inline::C.
I personally prefer either of those (especially the latter) over Win32::API as I've always found Win32::API difficult to get right - though it's possible that the deficiency is in me, as opposed to Win32::API.

For XS/Inline::C you'll need the header file (which it seems you already have), the dll (which you definitely already have) and a suitable import library (which you might not have).
To create the import library ( let's call it libAID.a), place a copy of AID.dll in the cwd and run:
gendef AID.dll dlltool --kill-at --input-def AID.def --output-lib libAID.a
I would then install Inline::C and access the dll functionality using it.
(You'll want to first run perldoc Inline::C-Cookbook for some basic instructions on how to successfully use the module.)

Cheere,
Rob

In reply to Re^3: How to pass a pointer to an array of 'unsigned char' C data type with Win32::API ("U0") by syphilis
in thread How to pass a pointer to an array of 'unsigned char' C data type with Win32::API by apeks_okad

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-04-19 05:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found