Can I call a
function in my program from within a probe?
Yes, there are several ways:
If the function is in a DLL you can use the NT routines
GetProcAddress and GetModuleHandle to find the routine. For example:
/* call Beep to sound a 2kHz tone for a second */
In the above example, you could use the name of your DLL instead of
Another way to call a routine is to use the Aprobe ap_SymbolToAddress
function. This will allow you to call a routine regardless of where it
is. For example:
typedef void MyBeep(int Msec, int Hz);
If your program is compiled with debugging enabled, you can precede
its name with a '$'. This is often useful for using a probe to call
debugging-support routines, e.g.,
Calling C++ methods is more complex (they require a "this"
pointer, and the naming can be tricky). Contact us at
if you wish to do this.