Analyzing Your Program with NI Spy

National Instruments IVI Driver

Analyzing Your Program with NI Spy

NI Spy is an application monitor for Windows applications using NI drivers. NI Spy can monitor, record, and display calls made to IVI class drivers. You can use NI Spy to quickly locate and analyze any erroneous calls that your application makes to the IVI class drivers.  NI Spy captures all function calls made during a class driver session.

To spy on IVI class driver calls, the NI Spy attribute must be enabled on the class driver session. This attribute is enabled by default. You can programmatically disable the attribute by setting it to FALSE.

The following figure shows a sample trace from NI Spy.

NI Spy records all input parameters passed to a function and all output parameters that the function returns. NI Spy also displays the return value of the function.

You can see detailed information for every call NI Spy captures through property sheets. The following figure shows a sample property sheet.

The property sheets display detailed information such as:

  • Information about the application that made each call and the time stamp of the call
  • The input and output parameters to each call and the contents of buffer parameters
  • Descriptive error information
  • Interchangeability warnings
  • Information regarding the coercion of attribute values