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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,79418686b977da7c X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!t31g2000cwb.googlegroups.com!not-for-mail From: "Hakan" Newsgroups: comp.lang.ada Subject: Re: Ada to Interfacing C# (Urgent) Date: 26 Mar 2006 01:12:39 -0800 Organization: http://groups.google.com Message-ID: <1143364359.336775.212220@t31g2000cwb.googlegroups.com> References: <1143225008.097384.33200@t31g2000cwb.googlegroups.com> <1143276591.122080.245640@t31g2000cwb.googlegroups.com> NNTP-Posting-Host: 85.108.62.171 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1143364364 2267 127.0.0.1 (26 Mar 2006 09:12:44 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 26 Mar 2006 09:12:44 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: t31g2000cwb.googlegroups.com; posting-host=85.108.62.171; posting-account=Ee13KQ0AAAAj5fDFE-I5Ns9QvFf7V1nm Xref: g2news1.google.com comp.lang.ada:3625 Date: 2006-03-26T01:12:39-08:00 List-Id: Jeffrey, I have written pragma Controlled clause in my previous message by mistake, actually it should be pragma Convention (C, Exception_Ptr). Jeffrey R. Carter wrote: > Hakan wrote: > > I had also used the pragma Controlled clause.But not worked. > > Pragma Controlled simply prevents garbage collection, something that is not > likely to happen with GNAT. It has nothing to do with interfacing to C. > > Pragma Convention (C, ...) tells the compiler to use the same representation for > objects of the type that a C compiler would use. For access types, they will be > represented as a C pointer. > > -- > Jeff Carter > "I spun around, and there I was, face to face with a > six-year-old kid. Well, I just threw my guns down and > walked away. Little bastard shot me in the ass." > Blazing Saddles > 40