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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ba7b74d2699f2def,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-15 00:00:14 PST Message-ID: <3C6CC24D.D013A4AC@chariot.net.au> Date: Fri, 15 Feb 2002 18:39:49 +1030 From: john donoghue X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.4.7-10 i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: object ada, visual c and tasking combined. Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 203.87.126.188 X-Trace: news.chariot.net.au 1013759677 203.87.126.188 (15 Feb 2002 18:24:37 +1050) Organization: Chariot Internet - http://www.chariot.net.au Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!newsfeed.dacom.co.kr!intgwlon.nntp.telstra.net!news.telstra.net!news1.optus.net.au!optus!yorrell.saard.net!duster.adelaide.on.net!news.saix.saia.asn.au!203.87.95.150.MISMATCH!news.chariot.net.au Xref: archiver1.google.com comp.lang.ada:20035 Date: 2002-02-15T18:39:49+10:30 List-Id: Hi all, I have a problem that perhaps someoneelse has encountered before and found a way around. Firstly, I have some legacy ada code that amongst other things displays some stuff on a display via a custom graphics controller board. Recently it has been decided to upgrade that by replacing the existing graphics code with a visual c front end. All well and good, I can build a gui in visual c in several cpp files and link it in after defining a few pragmas to access the c functionality - first problem with objectAda ... it complains about conflicts between libcd.lib having variables that are alreadt defined. And also it complains about linking in some of the visual c dll's etc and unresolved symbols and more. After getting sick of that, I decided to try compiling the gui part in to a dll and link that to the ada code ... hey it works ... but to be compatible with the old graphics stuff, the dll has to also call a few ada functions that are within the main ada application ... no problem ... let's send a structure from the ada code to the visual c code on initialization that contains pointers to the functions that the c code will need to call later. ... It seems to work ... next problem .... The visual c windowing stuff is in its own task, and there is also another C task that needs to wait on an ada function to return with data - but everytime I call the "pointered" functions from these tasks the app spits the dummy ( terminates with a exception that provides no name or message or anything. ) I am guessing that you cant call the ada functions from the other C tasks since they are in other tasks to the ada functions :) ... but is there a way around it? Cheers, John