Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: How to pass a pointer to an array of 'unsigned char' C data type with Win32::API ("U0")

by syphilis (Archbishop)
on Jul 28, 2016 at 14:04 UTC ( [id://1168731]=note: print w/replies, xml ) Need Help??


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

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
  • Comment on Re^3: How to pass a pointer to an array of 'unsigned char' C data type with Win32::API ("U0")
  • Select or Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2025-07-15 12:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.