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.1 required=5.0 tests=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,f48da8b15007eae1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-08 20:30:59 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn11feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi.com!rwcrnsc51.ops.asp.att.net.POSTED!not-for-mail From: "SteveD" Newsgroups: comp.lang.ada References: Subject: Re: Waiting for callbacks from dll on Win32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: <6c0z9.24316$Dc4.90485@rwcrnsc51.ops.asp.att.net> NNTP-Posting-Host: 12.211.13.75 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc51.ops.asp.att.net 1036816258 12.211.13.75 (Sat, 09 Nov 2002 04:30:58 GMT) NNTP-Posting-Date: Sat, 09 Nov 2002 04:30:58 GMT Organization: AT&T Broadband Date: Sat, 09 Nov 2002 04:30:58 GMT Xref: archiver1.google.com comp.lang.ada:30620 Date: 2002-11-09T04:30:58+00:00 List-Id: "Bj�rn Lundin" wrote in message news:aTTx9.482$0d2.1468@nntpserver.swip.net... > Stephen Leake wrote: > > > Bj�rn Lundin writes: > > [snip] > > Wrap the protected object call in a "normal" procedure, and use that > > as the callback. > > > > Even then, you have to worry about the Ada tasking vs the C tasking. > > If you have an Ada main, you are probably ok. > > > > Thanks, it seems to have solved my main problem, now it's > just to make a real application of it... I faced a similar problem with ObjectAda. In my case the callback was from an RSLinx communication library. I found that if I attempted a protected operation in the callback, bad things happened. Apparently the Ada runtime for ObjectAda requires special infomation to be set up for tasks that interact with protected objects or Ada tasks. I worked around the problem using shared memory and a couple of windows semaphores. ObjectAda didn't have any problems when the Ada tasks wait on OS objects. I believe GNAT addresses this problem by creating a special task environment for C callbacks such that you can use Ada tasking constructs seamlessly. I hope this helps, SteveD > > Thanks again > /Bj�rn