From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fc95c1889fbed9e5 X-Google-Attributes: gid103376,public From: Kevin Krieser Subject: Re: C Interface question Date: 1996/07/11 Message-ID: <4s1q6c$2es@ionews.ionet.net>#1/1 X-Deja-AN: 167713144 references: organization: Internet Oklahoma newsgroups: comp.lang.ada Date: 1996-07-11T00:00:00+00:00 List-Id: > I need to call a C function that is defined as: > > int *function(int value, int *result); > > the function is called with a value and both the returned pointer > and the result pointer contain data. > > So how do I interface to this ? I haven't tried it, but if a 'Address is the same size as an Access type, and has the same value, then you may be able to do the following: function C_Function ( value : in Integer; Result : in System.Address ) return System.Address; Then, just use Unchecked conversion to convert the result to an Access type, and access it that way. ------------------------------------ -- Kevin Krieser -- kkrieser@ionet.net