1 #ifndef LIBFILEZILLA_GLUE_DLL_HEADER
2 #define LIBFILEZILLA_GLUE_DLL_HEADER
4 #include "../libfilezilla.hpp"
8 #include "./windows.hpp"
17 class FZ_PUBLIC_SYMBOL
dll final
21 explicit dll(
wchar_t const* name, DWORD flags)
23 h_ = LoadLibraryExW(name,
nullptr, flags);
34 dll& operator=(
dll const&) =
delete;
36 explicit operator bool()
const {
46 return h_ ?
reinterpret_cast<void*
>(::GetProcAddress(h_, name)) :
nullptr;
76 #error This file is for Windows only
Encapsulates a DLL.
Definition: dll.hpp:18
~dll()
Closes the library and frees related resources.
Definition: dll.hpp:27
dll(wchar_t const *name, DWORD flags)
Open the specified library with the passed in flags.
Definition: dll.hpp:21
void * operator[](char const *name)
Retrieves the address of an exported symbol in the library.
Definition: dll.hpp:45
A collection of commonly used dlls.
Definition: dll.hpp:58
dll shell32_
The Shell32 DLL.
Definition: dll.hpp:69
dll ole32_
The Ole32 DLL.
Definition: dll.hpp:70
The namespace used by libfilezilla.
Definition: apply.hpp:17