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 X-Google-Thread: 103376,f48da8b15007eae1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-05 10:05:51 PST Message-ID: <3DC806C0.8080307@cogeco.ca> From: "Warren W. Gay VE3WWG" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Waiting for callbacks from dll on Win32 References: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Date: Tue, 05 Nov 2002 12:58:24 -0500 NNTP-Posting-Host: 198.96.47.195 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1036519104 198.96.47.195 (Tue, 05 Nov 2002 12:58:24 EST) NNTP-Posting-Date: Tue, 05 Nov 2002 12:58:24 EST Organization: Bell Sympatico Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!torn!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Xref: archiver1.google.com comp.lang.ada:30391 Date: 2002-11-05T12:58:24-05:00 List-Id: Stephen Leake wrote: > Bj�rn Lundin writes: >>Hello! >>I'm trying to make an interface to a c-dll that >>connects to an OPC-server (WTclient.dll) >> >>It wants a pointer to a procedure, which I can provide >>with an access value to a procedure in a protected object. > > > Calling a procedure in a protected object is _not_ the same as calling > a "normal" procedure; there are tasking issues involved. > > 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. I think you also have to keep in mind that DLL tasks are separate from your calling environment. So this may complicate things depending upon the details. -- Warren W. Gay VE3WWG http://home.cogeco.ca/~ve3wwg