Several CVI functions exist that permit to add / install functions in the code. At present, we need to manually create the function prototype, and the fastest way I found is this one: open the function panel for e.g. InstallPanelCallback function, select Event Function parameter, right-click the field or press F1 to show the help, select the function prototype dragging with the mouse, Ctrl-C to copy it, close the function panel and paste the prototype in the code.
It would be *very* handy if a way existed to speed up the process: a "Generate Prototype" item could be added to Code menu that takes the function name set by the user in Event Fuction field and generates the appropriate function prototype in the source code.
There is a huge set of functions that could benefit with this addition, following is an initial list but I am sure I'm missing some more functions:
In the User Interface Library:
- All Install*Callback
- PostDeferredCall
- PostDeferredCallToThread
- RegisterWinMsgCallback
In the Utility Library:
- CmtScheduleThreadPoolFunction
- CmtScheduleThreadPoolFunctionAdv
- CmtInstallThreadPoolCallback
- CmtInstallTSQCallback
In RS232 Library:
In VISA library:
In DAQMx Library:
- DAQmxRegister*Event functions
In TCP Library:
In Network Variable Library:
In the ActiveX Library:
In the Asynchronous Timer instrument driver:
- NewAsyncTimer
- NewAsyncTimerWithPriority
In the Programmer's Toobox:
- InstallWinMsgCallback
- PostDelayedCall
- PostDeferredCallToThreadAndWait
- ChainCtrlcallback
And don't forget all sorting functions that require a comparison function to operate:
- qsort
- SortTreeItems
- SortTableCells
- HeapSort
- List*Sort fuctions for lists