XPLMFindSymbol

XPLM_API void *     XPLMFindSymbol(
                         const char *         inString);

This routine will attempt to find the symbol passed in the inString parameter. If the symbol is found a pointer the function is returned, othewise the function will return NULL.

You can use XPLMFindSymbol to utilize newer SDK API features without requiring newer versions of the SDK (and X-Plane) as your minimum X-Plane version as follows:

  • Define the XPLMnnn macro to the minimum required XPLM version you will ship with (e.g. XPLM210 for X-Plane 10 compatibility).

  • Use XPLMGetVersions and XPLMFindSymbol to detect that the host sim is new enough to use new functions and resolve function pointers.

  • Conditionally use the new functions if and only if XPLMFindSymbol only returns a non- NULL pointer.

Warning: you should always check the XPLM API version as well as the results of XPLMFindSymbol to determine if funtionality is safe to use.

To use functionality via XPLMFindSymbol you will need to copy your own definitions of the X-Plane API prototypes and cast the returned pointer to the correct type.