home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.rarlab.com
/
2014.05.ftp.rarlab.com.tar
/
ftp.rarlab.com
/
rar
/
UnrarGUI.zip
/
DLLMan.cpp
next >
Wrap
C/C++ Source or Header
|
2003-12-21
|
617b
|
31 lines
//---------------------------------------------------------------------------
#pragma hdrstop
#include "DLLMan.h"
//---------------------------------------------------------------------------
DLLMan::DLLMan(char *DllName)
{
Hand = LoadLibrary(DllName);
if ( !Hand ) {
throw DLLAbort(AnsiString(DllName)+" missing.");
}
}
void DLLMan::GetProcAddr(FARPROC &Proc, char *ProcName)
{
Proc = GetProcAddress(Hand, ProcName);
if ( !Proc ) {
throw DLLAbort(AnsiString(ProcName)+" no find in DLL.");
}
}
DLLMan::~DLLMan()
{
FreeLibrary(Hand);
}