[Kc] Book Review: Extending and Embedding Perl
Garrett Goebel
garrett at scriptpro.com
Mon Mar 24 10:58:18 CST 2003
D. Hageman wrote:
>
> Excellent review!
thanks.
> Last week I wrote my first perl interface to a C library.
> It was quite a bit of fun, but I discovered that
> documentation is severly lacking. I had the most trouble
> with the "typemap". It seems that all documents just
> seem to gloss over this very important part of the process.
>
> A collection of good examples that really helped me out can
> be found at:
>
> http://search.cpan.org/author/DMR/
>
> Dean Roehrich has two little "CookBooks" on the subject matter.
nice! very nice...
I never figured out how to create a typemap for a struct so that I could use
the struct as an argument in a call to a function in a C library. Note... a
struct not a pointer to a struct. There are a couple functions in the
Win32API which actually take things like a POINT or a RECT as an argument
and not just a pointer to it. I've worked around this by passing each member
of the struct as separate arguments. But it always bugged me that I couldn't
find a way to actually pass the struct itself as an argument.
--
Garrett Goebel
IS Development Specialist
ScriptPro Direct: 913.403.5261
5828 Reeds Road Main: 913.384.1008
Mission, KS 66202 Fax: 913.384.2180
www.scriptpro.com garrett at scriptpro dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/kc/attachments/20030324/f7f7aafc/attachment.htm
More information about the kc
mailing list