Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How Do I Use the TCallback parameter in ibnotify for Delphi in dpib32.pas?

I'm having some troubles. I've been using the dpib32.pas library for at least 2 years now with no troubles. Now I need to handle some oddball stuff using Async Callbacks. I've referred to App Note 100 and am 98% there... I just can't figure out how to properly use the TCallback function in ibnotify. Any clues?

First thought was to add a function matching the TCallBack function...

function TfrmMain.IBCallBack(ud : integer;LocalIbsta : integer;LocalIberr : integer;LocalIbcntl : Longint;var RefData): integer; stdcall;


then use it as a the parameter in ibnotify...

ibnotify(Dev,RQS,@IBCallback,NULL);

All this gives me is a 'variable required' message on compilation.
0 Kudos
Message 1 of 2
(2,898 Views)
Never mind. I dug around in my code archives and found the proper methid for implementing the callback.
0 Kudos
Message 2 of 2
(2,895 Views)