pr_findsymbol.rst (1232B)
1 PR_FindSymbol 2 ============= 3 4 ``PR_FindSymbol()`` will return an untyped reference to a symbol in a 5 particular library given the identity of the library and a textual 6 representation of the symbol in question. 7 8 9 Syntax 10 ------ 11 12 .. code:: 13 14 #include <prlink.h> 15 16 void* PR_FindSymbol ( 17 PRLibrary *lib, 18 const char *name); 19 20 21 Parameters 22 ~~~~~~~~~~ 23 24 The function has these parameters: 25 26 ``lib`` 27 A valid reference to a loaded library, as returned by 28 :ref:`PR_LoadLibrary`, or ``NULL``. 29 ``name`` 30 A textual representation of the symbol to resolve. 31 32 33 Returns 34 ~~~~~~~ 35 36 An untyped pointer. 37 38 39 Description 40 ----------- 41 42 This function finds and returns an untyped reference to the specified 43 symbol in the specified library. If the lib parameter is ``NULL``, all 44 libraries known to the runtime and the main program are searched in an 45 unspecified order. 46 47 Use this function to look up functions or data symbols in a shared 48 library. Getting a pointer to a symbol in a library does indicate that 49 the library is available when the search was made. The runtime does 50 nothing to ensure the continued validity of the symbol. If the library 51 is unloaded, for instance, the results of any :ref:`PR_FindSymbol` calls 52 become invalid as well.