Important: The information in this document is obsolete and should not be used for new development.
FindSymbol
You can use theFindSymbolfunction to search for a specific exported symbol.
OSErr FindSymbol (ConnectionID connID, Str255 symName, Ptr *symAddr, SymClass *symClass);
connID- A connection ID.
symName- A symbol name.
symAddr- On exit, the address of the symbol whose name is
symName.symClass- On exit, the class of the symbol whose name is
symName. See the description below for a list of the recognized symbol classes.DESCRIPTION
TheFindSymbolfunction searches the code fragment identified by theconnIDparameter for the symbol whose name is specified by thesymNameparameter. If that symbol is found,FindSymbolreturns the address of the symbol in thesymAddrparameter and the class of the symbol in thesymClassparameter. The currently recognized symbol classes are defined by constants.
enum { kCodeSymbol = 0, /*a code symbol*/ kDataSymbol = 1, /*a data symbol*/ kTVectSymbol = 2 /*a transition vector symbol*/ };Because a fragment's code is normally exported through transition vectors to that code, the valuekCodeSymbolis not returned in the PowerPC environment. You can use the other two constants to distinguish exports that represent code (of classkTVectSymbol) from those that represent general data (of classkDataSymbol).RESULT CODES
fragNoErr 0 No error fragConnectionIDNotFound -2801 Connection ID is not valid fragSymbolNotFound -2802 Symbol was not found in connection