OpenLexocad  27.1
Core::LibraryLoader Class Referencefinal

#include <LibraryLoader.h>

Public Member Functions

 LibraryLoader ()
 
 LibraryLoader (const wchar_t *fileName)
 
 LibraryLoader (HMODULE h)
 
 LibraryLoader (LibraryLoader &&ll)
 
LibraryLoaderoperator= (LibraryLoader &&ll)
 
 ~LibraryLoader ()
 
 LibraryLoader (const LibraryLoader &)=delete
 
LibraryLoaderoperator= (const LibraryLoader &)=delete
 
bool valid () const
 
bool load (const wchar_t *filename)
 
void free ()
 
template<typename T >
resolve (const char *funcName)
 

Public Attributes

HMODULE handle
 

Detailed Description

Library loader can safely load DLL and provides safe unload in destructor. Calling of FreeLibrary is important during application tear-down, otherwise there is risk of crash. The class is header-only.

Constructor & Destructor Documentation

◆ LibraryLoader() [1/5]

Core::LibraryLoader::LibraryLoader ( )
inline

◆ LibraryLoader() [2/5]

Core::LibraryLoader::LibraryLoader ( const wchar_t *  fileName)
inline

◆ LibraryLoader() [3/5]

Core::LibraryLoader::LibraryLoader ( HMODULE  h)
inline

◆ LibraryLoader() [4/5]

Core::LibraryLoader::LibraryLoader ( LibraryLoader &&  ll)
inline

◆ ~LibraryLoader()

Core::LibraryLoader::~LibraryLoader ( )
inline

◆ LibraryLoader() [5/5]

Core::LibraryLoader::LibraryLoader ( const LibraryLoader )
delete

Member Function Documentation

◆ free()

void Core::LibraryLoader::free ( )
inline

◆ load()

bool Core::LibraryLoader::load ( const wchar_t *  filename)
inline

◆ operator=() [1/2]

LibraryLoader& Core::LibraryLoader::operator= ( LibraryLoader &&  ll)
inline

◆ operator=() [2/2]

LibraryLoader& Core::LibraryLoader::operator= ( const LibraryLoader )
delete

◆ resolve()

template<typename T >
T Core::LibraryLoader::resolve ( const char *  funcName)
inline

◆ valid()

bool Core::LibraryLoader::valid ( ) const
inline

Member Data Documentation

◆ handle

HMODULE Core::LibraryLoader::handle

The documentation for this class was generated from the following file: