common_util 1.1.0
Loading...
Searching...
No Matches
dlloader.h
Go to the documentation of this file.
1
19#pragma once
20
21#include <string>
22
23namespace cutl
24{
25
26#if defined(_WIN32)
27#include <windows.h>
28using dl_handle_t = HMODULE; /* WIN32 handle type */
29#else
30using dl_handle_t = void*; /* UNIX handle type */
31#endif
32
38{
39public:
45 dlloader(const std::string& lib_path);
51
52public:
59 dl_handle_t get_symbol(const std::string& symbol_name);
60
61private:
62 dl_handle_t library_handle_;
63};
64
65} // namespace cutl
Dynamic(Shared) library loader.
Definition dlloader.h:38
dlloader(const std::string &lib_path)
Construct a new dlloader object.
~dlloader()
Destroy the dlloader object.
dl_handle_t get_symbol(const std::string &symbol_name)
Get the symbol object.