pr_loadlibrary.rst (942B)
1 PR_LoadLibrary 2 ============== 3 4 Loads a referenced library. 5 6 7 Syntax 8 ------ 9 10 .. code:: 11 12 #include <prlink.h> 13 14 PRLibrary* PR_LoadLibrary(const char *name); 15 16 17 Parameters 18 ~~~~~~~~~~ 19 20 The function has this parameter: 21 22 ``name`` 23 A platform-dependent character array that names the library to be 24 loaded, as returned by :ref:`PR_GetLibraryName`. 25 26 27 Returns 28 ~~~~~~~ 29 30 If successful, returns a reference to an opaque :ref:`PRLibrary` object. 31 32 If the operation fails, returns ``NULL``. Use :ref:`PR_GetError` to find 33 the reason for the failure. 34 35 36 Description 37 ----------- 38 39 This function loads and returns a reference to the specified library. 40 The returned reference becomes the library's identity. The function 41 suppresses duplicate loading if the library is already known by the 42 runtime. 43 44 Each call to :ref:`PR_LoadLibrary` must be paired with a corresponding call 45 to :ref:`PR_UnloadLibrary` in order to return the runtime to its original 46 state.