xref: /libuv/docs/src/dll.rst (revision 866dc3f9)
1
2.. _dll:
3
4Shared library handling
5=======================
6
7libuv provides cross platform utilities for loading shared libraries and
8retrieving symbols from them, using the following API.
9
10
11Data types
12----------
13
14.. c:type:: uv_lib_t
15
16    Shared library data type.
17
18
19Public members
20^^^^^^^^^^^^^^
21
22N/A
23
24
25API
26---
27
28.. c:function:: int uv_dlopen(const char* filename, uv_lib_t* lib)
29
30    Opens a shared library. The filename is in utf-8. Returns 0 on success and
31    -1 on error. Call :c:func:`uv_dlerror` to get the error message.
32
33.. c:function:: void uv_dlclose(uv_lib_t* lib)
34
35    Close the shared library.
36
37.. c:function:: int uv_dlsym(uv_lib_t* lib, const char* name, void** ptr)
38
39    Retrieves a data pointer from a dynamic library. It is legal for a symbol
40    to map to NULL. Returns 0 on success and -1 if the symbol was not found.
41
42.. c:function:: const char* uv_dlerror(const uv_lib_t* lib)
43
44    Returns the last uv_dlopen() or uv_dlsym() error message.
45