LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Could not understand lines in "visa.h"

Solved!
Go to solution

Hi, recently I am starting to use LabWindows/CVI 2017 as my primary coding tool. Before this, I use LabVIEW a lot and also has some experience with ANSI C programming. I read the "visa.h" file but could not understand two lines (line 88 and line 89):

 

typedef ViStatus (_VI_FUNCH _VI_PTR ViHndlr)
   (ViSession vi, ViEventType eventType, ViEvent event, ViAddr userHandle);

 

This typedef statement does not look like a regular typedef statement. In the above statement, what is typedef-ed to what? Thanks.

-Ling

0 Kudos
Message 1 of 2
(2,285 Views)
Solution
Accepted by Ling.Liu

That's an alias called ViHndlr for functions with a signature as

ViStatus _VI_FUNCH functionname (ViSession vi, ViEventType eventType, ViEvent event, ViAddr userHandle);

 

This particular alias is used by viInstallHandler() and viUninstallHandler() and this is is usually made to ensure that multiple functions which take a callback function pointer use the same signature i.e. avoid copy-n-paste errors.

-----------------------
/* Nothing past this point should fail if the code is working as intended */
0 Kudos
Message 2 of 2
(2,217 Views)