Panda3D

load_dso.h
Go to the documentation of this file.
1 /**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file load_dso.h
10 * @author drose
11 * @date 2000-05-12
12 */
13
14 #ifndef LOAD_DSO_H
15 #define LOAD_DSO_H
16
17 #include "dtoolbase.h"
18 #include "dSearchPath.h"
19 #include "filename.h"
20
21 // Loads in a dynamic library like an .so or .dll. Returns NULL if failure,
22 // otherwise on success. If the filename is not absolute, searches the path.
23 // If the path is empty, searches the dtool directory.
24
25 EXPCL_DTOOL_DTOOLUTIL void *
26 load_dso(const DSearchPath &path, const Filename &filename);
27
28 // true indicates success
29 EXPCL_DTOOL_DTOOLUTIL bool
30 unload_dso(void *dso_handle);
31
32 // Returns the error message from the last failed load_dso() call.
33
34 EXPCL_DTOOL_DTOOLUTIL std::string
35 load_dso_error();
36
37 // Returns a function pointer or other symbol from a loaded library.
38 EXPCL_DTOOL_DTOOLUTIL void *
39 get_dso_symbol(void *handle, const std::string &name);
40
41 #endif
DSearchPath
This class stores a list of directories that can be searched, in order, to locate a particular file.
Definition: dSearchPath.h:28
Filename
The name of a file, such as a texture file or an Egg file.
Definition: filename.h:39
dSearchPath.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
dtoolbase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
filename.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.