dlopen.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. dlopen.h - DLL support code
  3. Copyright (c) 2002, 2015 dbjh
  4. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with this library; if not, write to the Free Software
  14. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  15. */
  16. #ifndef DLOPEN_H
  17. #define DLOPEN_H
  18. /*
  19. The next union is a portable means to convert between function and data
  20. pointers and the only way to silence Visual C++ 2012 other than
  21. #pragma warning(disable: 4152)
  22. That is, with /W4.
  23. */
  24. typedef union u_func_ptr
  25. {
  26. void (*func_ptr) (void);
  27. void *void_ptr;
  28. } u_func_ptr_t;
  29. void *open_module (char *module_name);
  30. void *get_symbol (void *handle, char *symbol_name);
  31. void *has_symbol (void *handle, char *symbol_name);
  32. #endif // DLOPEN_H