To use the Quantify API in native-compiled code, or Visual Basic programs:
For a Visual C++ native-compiled (unmanaged) program
1. Add #include "pure.h" to the header of any source file in which you want to use API functions.
2. Add Pure_api.c, located in the Quantify program directory, to the list of source files in the project.
3. Call the API functions in your code as appropriate.
You can also use the command line instead of the last two steps. For example, if Quantify is installed in C:\Program Files\Rational\PurifyPlus, type:
cl /I"C:\Program Files\Rational\PurifyPlus" test.cpp "C:\Program Files\Rational\PurifyPlus\pure_api.c"
In order for Quantify to intercept these API functions, you must build your program with relocation data. If you're using Visual Studio, you can build a release or debug version of your application that contains relocation data by specifying the /fixed:no and /incremental:no linker options in Visual Studio.
For a Visual Basic program
1. Add Vqvbapi.bas, located in the Quantify program directory, to the list of source files in the project. Ensure that the Quantify program directory, where Vqvbapi.dll is located, appears in your PATH environment variable.
2. Call the API functions in your code as appropriate.
Note:
§ If you run the program you're profiling under a debugger, it's recommended that you not set breakpoints or otherwise stop program execution. If you do break in a debugger while the program is running, Quantify continues to collect data, which can produce invalid timing results. For this reason, it's also recommended that you not call the API functions from the debugger.
(C) Copyright IBM Corporation 1993, 2009.