pr_getlibraryname.rst (1268B)
1 PR_GetLibraryName 2 ================= 3 4 Constructs a full library path name. 5 6 7 Syntax 8 ------ 9 10 .. code:: 11 12 #include <prlink.h> 13 14 char* PR_GetLibraryName ( 15 const char *dir, 16 const char *lib); 17 18 19 Parameters 20 ~~~~~~~~~~ 21 22 The function has these parameters: 23 24 ``dir`` 25 A ``NULL``-terminated string representing the path name of the 26 library, as returned by :ref:`PR_GetLibraryPath`. 27 ``lib`` 28 The leaf name of the library of interest. 29 30 31 Returns 32 ~~~~~~~ 33 34 If successful, returns a new character string containing a constructed 35 path name. In case of error, returns ``NULL``. 36 37 38 Description 39 ----------- 40 41 This function constructs a full path name from the specified directory 42 name and library name. The constructed path name refers to the actual 43 dynamically loaded library. It is suitable for use in the 44 :ref:`PR_LoadLibrary` call. 45 46 This function does not test for existence of the specified file, it just 47 constructs the full filename. The way the name is constructed is system 48 dependent. 49 50 If sufficient storage cannot be allocated to contain the constructed 51 path name, the function returns ``NULL``. Storage for the result is 52 allocated by the runtime and becomes the responsibility of the caller. 53 When it is no longer used, free it using :ref:`PR_FreeLibraryName`.