CAA V5 Encyclopedia

 

Auditing CAA Code on ProtectedInterfaces Usage

How to effectively check ProtectedInterfaces usage in a CAA application

Technical Article

Abstract

Your CAA application might use headers coming from the ProtectedInterfaces folders of the frameworks installed from the previous releases of CAA CD-ROMS. Refer to CAA V5 Authorized API Identification, Usage, Deprecation, and Stability to understand why you shoud get rind of ProtetedInterfaces in your CAA applications.

This article describes a procedure allowing you to effectively check such header usage in your CAA application. This procedure uses a tool that is only available on Windows.

Notes:

  • The described process uses undocumented mkmk features that might not work anymore on coming releases
  • Please make sure to run this audit for actual code in production, not for prototypes.

Launching the Audit Procedure

[Top]

Analyzing the Resulting Trace

The trace file is divided into the following parts.

Notes:

[Top]

Cleaning-up the Application

You now have a list of all the ProtectedInterfaces headers your application is using. To clean-up your applications, you can process as follows:

  1. Remove unused headers
    INCLUDEPRO messages that are not followed by a compilation error denote unused include files. Remove them from the corresponding sources.
     
  2. Replace headers with CAA V5R15 Authorized APIs whenever possible

    For each remaining compilation error, check:

    1. Whether the error comes from an API change (refer to the C++ APIs Changes) or is deprecated and now removed (refer to the current Deprecated Index, and refer also to the Deprecated Indexes of the previous releases you may have online, or through the CAA Internet Site) to know how to replace that header in error
    2. Whether the interfaces, classes, or functions in error could be replaced with one of those listed in CAA Authorized APIs Replacing ProtectedInterfaces
    3. If an equivalent can be found in the C++ API Reference.
       
  3. Report the actual ProtectedInterfaces header usage
    Report the remaining problems through the local support that will execute the appropriate "cleaning" support process.

Note: When you have corrected some or all of the errors, you may want to check your corrections. Before rebuilding your CAA application in the workspace used above, to temporarily get rid of the modifications brought by the CAACheckPro.bat utility, set the following variables:

E:\myWorkspace> set MKMK_EXPNOINDIRECT=yes
E:\myWorkspace> set MKMK_IDCARDEXTEND=.mk

Then rebuild your CAA application. To resume checking for PortectedInterfaces headers usage, run again the CAACheckPro.bat utility.

[Top]


References

[1] Building and Launching a CAA V5 Use Case
[2] CAA Internet Site
[Top]

History

Version: 1 [Jan 2005] Document created
[Top]

Copyright © 1994-2005, Dassault Systèmes. All rights reserved.