#include <winstl/dl/module.hpp>
Public Types | |
| typedef HINSTANCE | module_handle_type |
| The handle type. | |
| typedef HINSTANCE | handle_type |
| The handle type. | |
| typedef module | class_type |
| The class type. | |
| typedef void(* | proc_pointer_type )() |
| The entry point type. | |
| typedef handle_type | resource_type |
Public Member Functions | |
Construction | |
| module (char const *moduleName) | |
| Constructs by loading the named module. | |
| module (wchar_t const *moduleName) | |
| Constructs by loading the named module. | |
| template<typename S> | |
| module (S const &moduleName) | |
| Constructs by loading the named module. | |
| module (module_handle_type hmodule) | |
| Constructs by taking ownership of the given handle. | |
| module (class_type const &rhs) | |
| Copy constructor. | |
| ~module () throw () | |
| Closes the module handle. | |
Operations | |
| void | unload () throw () |
| Closes the module handle. | |
| module_handle_type | detach () |
| Yields the module handle to the caller. | |
Lookup Operations | |
| proc_pointer_type | get_symbol (char const *symbolName) |
| Looks up a named symbol. | |
| proc_pointer_type | get_symbol (ws_uint32_t symbolOrdinal) |
| Looks up a symbol by ordinal. | |
| template<typename F> | |
| proc_pointer_type | get_symbol (char const *symbolName, F &f) |
| Looks up a named symbol into a typed function pointer variable. | |
| template<typename F> | |
| proc_pointer_type | get_symbol (ws_uint32_t symbolOrdinal, F &f) |
| Looks up a symbol by ordinal into a typed function pointer variable. | |
Accessors | |
| module_handle_type | get_module_handle () const |
| Provides access to the underlying module handle. | |
| module_handle_type | get () const |
| Provides access to the underlying module handle. | |
Static Public Member Functions | |
Static operations | |
| static module_handle_type | load (char const *moduleName) |
| Loads the named module, returning its handle, which the caller must close with unload(). | |
| static module_handle_type | load (wchar_t const *moduleName) |
| Loads the named module, returning its handle, which the caller must close with unload(). | |
| template<typename S> | |
| static module_handle_type | load (S const &moduleName) |
| Loads the named module, returning its handle, which the caller must close with unload(). | |
| static void | unload (module_handle_type hmodule) throw () |
| Closes the given module handle. | |
| static proc_pointer_type | get_symbol (module_handle_type hmodule, char const *symbolName) |
| Looks up a named symbol from the given module. | |
| static proc_pointer_type | get_symbol (module_handle_type hmodule, ws_uint32_t symbolOrdinal) |
| Looks up a symbol by ordinal from the given module. | |
| template<typename F> | |
| static proc_pointer_type | get_symbol (module_handle_type hmodule, char const *symbolName, F &f) |
| Looks up a named symbol from the given module into a typed function pointer variable. | |
| template<typename F> | |
| static proc_pointer_type | get_symbol (module_handle_type hmodule, ws_uint32_t symbolOrdinal, F &f) |
| Looks up a symbol by ordinal from the given module into a typed function pointer variable. | |
| typedef HINSTANCE module_handle_type |
The handle type.
| typedef HINSTANCE handle_type |
The handle type.
| typedef module class_type |
The class type.
| typedef void(* proc_pointer_type)() |
The entry point type.
| module | ( | char const * | moduleName | ) | [explicit] |
Constructs by loading the named module.
| moduleName | The file name of the executable module to be loaded. |
| module | ( | wchar_t const * | moduleName | ) | [explicit] |
Constructs by loading the named module.
| moduleName | The file name of the executable module to be loaded. |
| module | ( | S const & | moduleName | ) | [inline, explicit] |
Constructs by loading the named module.
| moduleName | The file name of the executable module to be loaded. The argument may be of any type for which the string access shim stlsoft::c_str_ptr is defined. |
| module | ( | module_handle_type | hmodule | ) | [explicit] |
Constructs by taking ownership of the given handle.
| module | ( | class_type const & | rhs | ) |
| static module_handle_type load | ( | char const * | moduleName | ) | [static] |
| static module_handle_type load | ( | wchar_t const * | moduleName | ) | [static] |
| static module_handle_type load | ( | S const & | moduleName | ) | [inline, static] |
Loads the named module, returning its handle, which the caller must close with unload().
| moduleName | The file name of the executable module to be loaded. The argument may be of any type for which the string access shim stlsoft::c_str_ptr is defined. |
References stlsoft_ns_qual.
| static void unload | ( | module_handle_type | hmodule | ) | throw () [static] |
Closes the given module handle.
| static proc_pointer_type get_symbol | ( | module_handle_type | hmodule, | |
| char const * | symbolName | |||
| ) | [static] |
Looks up a named symbol from the given module.
| static proc_pointer_type get_symbol | ( | module_handle_type | hmodule, | |
| ws_uint32_t | symbolOrdinal | |||
| ) | [static] |
Looks up a symbol by ordinal from the given module.
| static proc_pointer_type get_symbol | ( | module_handle_type | hmodule, | |
| char const * | symbolName, | |||
| F & | f | |||
| ) | [inline, static] |
Looks up a named symbol from the given module into a typed function pointer variable.
| static proc_pointer_type get_symbol | ( | module_handle_type | hmodule, | |
| ws_uint32_t | symbolOrdinal, | |||
| F & | f | |||
| ) | [inline, static] |
Looks up a symbol by ordinal from the given module into a typed function pointer variable.
| void unload | ( | ) | throw () |
Closes the module handle.
| module_handle_type detach | ( | ) |
Yields the module handle to the caller.
| proc_pointer_type get_symbol | ( | char const * | symbolName | ) |
Looks up a named symbol.
| proc_pointer_type get_symbol | ( | ws_uint32_t | symbolOrdinal | ) |
Looks up a symbol by ordinal.
| proc_pointer_type get_symbol | ( | char const * | symbolName, | |
| F & | f | |||
| ) | [inline] |
Looks up a named symbol into a typed function pointer variable.
| proc_pointer_type get_symbol | ( | ws_uint32_t | symbolOrdinal, | |
| F & | f | |||
| ) | [inline] |
Looks up a symbol by ordinal into a typed function pointer variable.
| module_handle_type get_module_handle | ( | ) | const |
| module_handle_type get | ( | ) | const |
Provides access to the underlying module handle.
1.5.6