Jump to content

callback from dll function?


Recommended Posts

I've got a dll library that I need to interface with. One of the critical interfaces to it is the interrupt driven messaging from it. This is implemented with register and unregister calls to the dll function to let the dll invoke a callback function.

I'd like both the calling function and the callback function to be LabVIEW vis.

Can this be done in LabVIEW? What is the best way to do this?

Here is the dll's register function prototype:

void CSregisterForMessages( long csHdl, void (*func)( void* data, long length, long type ) );

Thanks,

Jeff

Link to comment

Hi Jeff,

There is no direct way to register LabVIEW vi as callback function in C, but there is a way to work around by using the LabVIEW activeX server. Here are two links to info-labview that I answered before for your references.

http://messages.info-labview.org/2003/06/20/37.html

http://messages.info-labview.org/2004/01/27/09.html

The successful case is my IVision LabVIEW toolkit, it uses this technique to make LabVIEW vi as callback vi for real time video processing. If you want to get a feel how callback vi is working, you can download my Ivision at:

http://www.hytekautomation.com/Products/IVision.html

Regards,

Irene

Link to comment
  • 5 years later...

Hi Jeff,

There is no direct way to register LabVIEW vi as callback function in C, but there is a way to work around by using the LabVIEW activeX server. Here are two links to info-labview that I answered before for your references.

http://messages.info...3/06/20/37.html

http://messages.info...4/01/27/09.html

The successful case is my IVision LabVIEW toolkit, it uses this technique to make LabVIEW vi as callback vi for real time video processing. If you want to get a feel how callback vi is working, you can download my Ivision at:

http://www.hytekauto...ts/IVision.html

Regards,

Irene

Irene's links no longer work. How can I get to them? It looks like information I could really use.

George

Link to comment

Irene's links no longer work. How can I get to them? It looks like information I could really use.

George

Take the link and convert it to the new location:

http://messages.info-labview.org/2003/06/20/37.html

gets:

http://sthmac.magnet...iew/ILVDigests/2003/06/20/Info-LabVIEW_Digest_2003-06-20_037.html

You can also go to http://hannahsmac.magnet.fsu.edu/infolabview/adv_search.html and do an Info-Labview search there.

Edited by rolfk
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.