Panda3D

load_dso.h

00001 // Filename: load_dso.h
00002 // Created by:  drose (12May00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef LOAD_DSO_H
00016 #define LOAD_DSO_H
00017 
00018 #include "dtoolbase.h"
00019 #include "dSearchPath.h"
00020 #include "filename.h"
00021 
00022 // Loads in a dynamic library like an .so or .dll.  Returns NULL if
00023 // failure, otherwise on success.  If the filename is not absolute,
00024 // searches the path.  If the path is empty, searches the dtool
00025 // directory.
00026 
00027 EXPCL_DTOOL void *
00028 load_dso(const DSearchPath &path, const Filename &filename);
00029 
00030 // true indicates success
00031 EXPCL_DTOOL bool
00032 unload_dso(void *dso_handle);
00033 
00034 // Returns the error message from the last failed load_dso() call.
00035 
00036 EXPCL_DTOOL string
00037 load_dso_error();
00038 
00039 // Returns a function pointer or other symbol from a loaded library.
00040 EXPCL_DTOOL void *
00041 get_dso_symbol(void *handle, const string &name);
00042 
00043 #endif
00044 
 All Classes Functions Variables Enumerations