CLoadLibrary
Wrapper class that allows exception safe and convienient calls to LoadLibray. Calls FreeLibrary when it goes out of scope.
Tested in UNICODE.
Example
#include <LoadLibrary.h>
...
CLoadLibrary lib( "Kernel32" );
if( lib.IsLoaded() )
{
if( lib.GetProcAddress( "SomeFunction" ) )
{
//
// Do something with the library
}
}
See also RealGetDiskFreeSpace for an example