Chapter 6 C API Code Samples

This chapter provides simple, sample code for use as examples that can also be used as a starting point for creating your own application. All examples use an Understand for C++ database. API usage with other Understand databases/languages is similar.

The following sections show each different example as a separate function within a larger module. The first section shows the common elements within a “main” function, from which any of the other example functions could be called.

Each example shows the C code, an explanation of the code, and sample output produced by the code.

This chapter contains the following sections:

Open Database and Get All Entities

Report All Entities

Report All Files

Report Functions with their Parameters and Types

Report Global Objects

Report All Structs and their Member Types

Find All References To and From an Entity


Scientific Toolworks, Inc.
http://www.scitools.com