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=0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,a94db636886834db X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-07 09:09:20 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!192.71.180.34!newsfeed1.swip.net!swipnet!nntpserver.swip.net!not-for-mail From: =?ISO-8859-1?Q?Bj=F6rn?= Lundin Subject: Re: Mapping c++ type VARIANT to Ada Newsgroups: comp.lang.ada References: <3DA08C2E.7040105@acm.org> User-Agent: KNode/0.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Message-ID: NNTP-Posting-Host: 213.101.76.15 X-Complaints-To: news-abuse@swip.net X-Trace: nntpserver.swip.net 1034006947 213.101.76.15 (Mon, 07 Oct 2002 18:09:07 MET DST) NNTP-Posting-Date: Mon, 07 Oct 2002 18:09:07 MET DST Organization: A Customer of Tele2 X-Sender: x-367446@d213-101-76-15.swipnet.se Date: Mon, 07 Oct 2002 18:10:40 +0200 Xref: archiver1.google.com comp.lang.ada:29563 Date: 2002-10-07T18:10:40+02:00 List-Id: Jeffrey Carter wrote: > > I could be more helpful if you included the definition of VARIANT. That was my question, although not very clear. Steve D pointed me to gnatcom > > I would suggest that you use the types from Interfaces.C whenever > possible. I'll do that > Note that time stamp and quality are both passed as pointers. I'm not > sure about a record, but an integer will be passed by copy. You need one > of Well I wrote the spec as pointers, but in the dll's documetation they are not, however in all other similar calls/callbacks they are pointers, which now makes me now belive that the documentation is wrong. I'll try with pointers > > Finally, C knows nothing about protected procedures. You probably should > remove the "protected" from the type definition, and apply > > pragma Convention (C, Opc_Callback_Handler_Type); > This construct was taken from 'Ada as a second language'. I tried whitout it just an ordinary procedure, and it worked. However, the point with protected types was to enable some sort of tasking, since the callbacks can come anytime, always asychronic. I do get the callbacks now too. Thanks for the tips about the pragmas. /Bj�rn