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=-2.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2c25d9643f05ffd1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-17 05:49:47 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!freenix!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: Duncan Sands Newsgroups: comp.lang.ada Subject: Re: calling an ada procedure from C++ Date: Mon, 17 Nov 2003 11:38:40 +0100 Organization: Cuivre, Argent, Or Message-ID: References: <3fb24ce4$1@baen1673807.greenlnk.net> NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: melchior.cuivre.fr.eu.org 1069076857 5121 80.67.180.195 (17 Nov 2003 13:47:37 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Mon, 17 Nov 2003 13:47:37 +0000 (UTC) To: "Anthony Moss" , comp.lang.ada@ada-france.org Return-Path: User-Agent: KMail/1.5.1 In-Reply-To: <3fb24ce4$1@baen1673807.greenlnk.net> Content-Disposition: inline X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.3 Precedence: list List-Id: Gateway to the comp.lang.ada Usenet newsgroup List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:2569 Date: 2003-11-17T11:38:40+01:00 On Wednesday 12 November 2003 16:11, Anthony Moss wrote: > I have an ada simulation and a windows C++ graphics program already > created. My task is to transfer the information from the ada written > simulation to the VisualC++ graphics program. This involves transfering a > large structure of information from ada to C++. To do this i have written a > very small program to pass a simple structure from ada to C++, but I am > getting run time access errors. I will place a copy of the code onto this > message, so could you tell me what is wrong and how to fix it. > thanks Don't return the value on the stack (i.e. via return), use an out parameter. Standard C does not permit returning structures on the stack IIRC. All the best, Duncan.