Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Has anyone used Config_DAQ_Event_Message using Visual Basic?

I am not using ComponentWorks, just Visual Basic 6.0 on Windows NT with DAQ dll function calls. My hardware is an PCI-6534. The function Config_DAQ_Event_Message has as its last parameter a callback function address. I prefaced the function name with AddresOf. I can't get the code to call the specified function? I don't know the format of the callback function...parameters, returned value, etc. Does anyone have an example?
0 Kudos
Message 1 of 4
(3,570 Views)
I would post the question on the Digital I/O Forum since it really doesn't involve Measurement Studio for Visual Basic.
0 Kudos
Message 2 of 4
(3,570 Views)
Hello;

There is no secret on calling a callback function with that NI-DAQ function. You just need to include the name of the callback function and then define the function itself.
I'm attaching an example written in Ansi C, which gives you an idea on how to do that. Should be pretty similar in VB.
Hope this helps.
Filipe
0 Kudos
Message 3 of 4
(3,570 Views)
I've had the same problem for a 6527 device.
The solution is not available anymore on this forum but I've still have the example.
The problem is that VB doesn't use the same adressing than C++.
But you can use WM_MOUSEMOVE command for "message", EventSinkForm.hWnd for "handle" and 0 for "callback address", if you use the example joined.
It works.
0 Kudos
Message 4 of 4
(3,570 Views)