OpenCBM
getpluginaddress.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version
5  * 2 of the License, or (at your option) any later version.
6  *
7  * Copyright 2007 Spiro Trikaliotis
8  *
9 */
10 
20 #ifndef OPENCBM_LIBMISC_GETPLUGINADDRESS_H
21 #define OPENCBM_LIBMISC_GETPLUGINADDRESS_H
22 
23 #ifdef WIN32
24 
25  #include <windows.h>
26 
28  typedef HINSTANCE SHARED_OBJECT_HANDLE;
29 
31  #define SHARED_OBJECT_HANDLE_INVALID NULL
32 
33 #else
34 
36  typedef void * SHARED_OBJECT_HANDLE;
37 
39  #define SHARED_OBJECT_HANDLE_INVALID NULL
40 
41 #endif
42 
43 extern SHARED_OBJECT_HANDLE plugin_load(const char * name);
44 
45 extern void * plugin_get_address(SHARED_OBJECT_HANDLE handle, const char * name);
46 
47 extern void plugin_unload(SHARED_OBJECT_HANDLE handle);
48 
49 #endif /* #ifndef OPENCBM_LIBMISC_GETPLUGINADDRESS_H */
void * SHARED_OBJECT_HANDLE
@@@
void * plugin_get_address(SHARED_OBJECT_HANDLE handle, const char *name)
@@@
void plugin_unload(SHARED_OBJECT_HANDLE handle)
@@@
SHARED_OBJECT_HANDLE plugin_load(const char *name)
@@@