excerpt from CANoe help:
In CAPL programs you can call functions which you have implemented in your own Windows DLL. In doing so, the function from the DLL are exported through a function table.
The CAPL DLL interface supports callback functions starting with CANoe version 5.0.
Whenever functions of a DLL are called in the real-time area (i.e. in Simulation Setup of CANoe), they run in a high-priority thread. This can affect measurement.
In order for the CAPL compiler and CAPL browser to recognize the DLL, you must link it to the CAPL program.
To do this, proceed as follows:
Enter the DLL in the Options dialog in CANoe.
In this case, the DLL will be available to all CAPL programs.
You can enter the DLL in the includes section of a CAPL program using the #pragma library command.
In this case, it will only be available to this program.
Easiest way is to use templates available on PC with CANoe installed.
Have a look into: C:\Users\Public\Documents\Vector\CANoe\9.0 (x64)\CANoe Sample Configurations\Programming\CAPLdll (or similar depending on your version of CANoe)