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-04 13:09:41 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Waiting for callbacks from dll on Win32 Date: 04 Nov 2002 16:09:53 -0500 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: skates.gsfc.nasa.gov 1036444853 11063 128.183.235.92 (4 Nov 2002 21:20:53 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 4 Nov 2002 21:20:53 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:30365 Date: 2002-11-04T21:20:53+00:00 List-Id: 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. -- -- Stephe