I want integrate a header .h or .dll file in CAPL (concretly Visa32.dll, visa.h or sicl.h) to control a multimeter 34461A. How can I include the .h files or .dll file in CANoe? I created an ECU module called multimeter. Thanks,
2 Answers
Including external DLLs in CAPL is possible, but you will need to create a wrapper for all the functions you're going to use.
Take a look at \CANoe\Demo_AddOn\Capldll
directorty which features such a wrapper. It's a MSVC project exporting a few simple functions to CAPL, like int f(int a, int b) {return a+b;}
.
What you will need to to is to add your library files (Visa32.dll, visa.h) to this Capldll project and define wrappers for all the functions you want to call from CANoe. For example, if you have int visa_init(double arg)
in Visa32.dll, you will create a wrapper:
int CAPLEXPORT far CAPLPASCAL capl_visa_init(double arg)
{
return visa_init(arg);
}
You will also need to add the prototype of your function to the export table:
CAPL_DLL_INFO CAPL_DLL_INFO_LIST[] =
{
{"my_visa_init", (CAPL_FARCALL)capl_visa_init, 'D', 1, "F", "\000"},
....
{0,0}
};
Once you have successfully build your wrapper DLL (it will be called capldll.dll if you reuse the example), you will need to import it in CANoe, and you will be able to call the function by the name you defined in the export table, e.g. my_visa_init(1.0);

- 3,156
- 1
- 25
- 53
-
1It would be a possibility, but we've tried GPIB functions. Thanks Dmitry. – eloy0107 Nov 03 '15 at 10:30
CAPL is not C. You can not include .h files.
The easiest would be to control the multimeter over the GPIB bus. Take a look at the CAPL GPIB library.

- 17,147
- 6
- 52
- 89
-
Solved, Thanks Sergej, this was the best option. I have the control of the multimeter. I spoke with the people from Vector-CANoe and they said that they couldn't help me for including .dll libraries. The only thing I had to do was catch all commands with a sniffer. Thanks again – eloy0107 Nov 03 '15 at 10:29
-
@eloy0107, if this solved your problem, this should be the accepted answer. – Daemon Painter Dec 16 '19 at 12:33