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