Previous Topic

Debugging

This section describes how to debug a custom c-tree Driver DLL.

To step through custom c-tree Driver DLL code using the Microsoft compiler, first add the necessary debug flags to the compiler (-Zi -Od) and link (-debug:full -debugtype:cv) options in otset32.mak:

LINK = $(coBIN)\link  -debug:full -debugtype:cv
CFLAG2 = -c -DWIN32 -Zp1 -G3 -Gf -DotFOR_DLL  -Zi -Od

After building the custom DLL, do the following:

  1. Start up the Microsoft Visual Studio.
  2. Select File | Open Workspace...
  3. Browse for the ODBC-compliant application that you want to run (for example, msqry32.exe if using Microsoft Query).
  4. Select Project | Settings... and click on the Debug tab.
  5. In the Category drop-down list, select “Additional DLLs”, and enter the full path and name of your custom DLL (ot_usr32.dll) in the list of modules. Click OK to save the change.
  6. Open otcustm.c (using File | Open...), and set breakpoints as desired.
  7. Press F5 to run the ODBC application. The application will break at the specified break