From: chris <spamoff.danx@ntlworld.com>
Subject: Re: Binding to C
Date: Mon, 21 Jul 2003 23:57:36 +0200
Date: 2003-07-21T23:57:36+02:00 [thread overview]
Message-ID: <J8_Sa.2478$l63.29662@newsfep4-glfd.server.ntli.net> (raw)
In-Reply-To: <ICYSa.114135$N7.15266@sccrnsc03>
tmoran@acm.org wrote:
>>Also does anyone have any advice in general mapping to C.
>
> Look at some of the Windows binding source code at www.adapower.com
>
>>For the jpeg_error_mgr struct, I mapped ptrs to functions to System.Address
>>and made the struct a record. Will this work, or will the corresponding
>>type of the struct have to be a System.Address?
>
> You almost never need a System.Address. Use access types.
Thanks, I've converted the small amount done so far to use access types.
What about unions? I don't really care what's in the union, it's
under the control of the lib, should I put a char_array of size
JMSG_STR_PARM_MAX in there?
struct jpeg_error_msg {
...
union {
int i[8];
char s[JMSG_STR_PARM_MAX];
} msg_parm;
}
chris
--
to reply change 'spamoff' to 'chris'
next prev parent reply other threads:[~2003-07-21 21:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-21 18:59 Binding to C chris
2003-07-21 20:02 ` Martin Krischik
2003-07-22 17:12 ` chris
2003-07-23 13:47 ` Martin Krischik
2003-07-27 13:11 ` Matthew Heaney
2003-07-27 13:07 ` Matthew Heaney
2003-07-21 21:07 ` tmoran
2003-07-21 21:57 ` chris [this message]
2003-07-27 13:04 ` Matthew Heaney
2003-07-28 20:52 ` Freejack
2003-07-29 19:21 ` chris
2003-08-09 11:29 ` Patrice Freydiere
2003-08-09 13:09 ` Jeffrey Creem
2003-08-09 13:54 ` Patrice Freydiere
2003-08-11 23:49 ` chris
2003-08-12 6:40 ` Patrice Freydiere
2003-08-12 11:58 ` chris
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox