home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1999 October
/
VPR9910A.BIN
/
OLS
/
bz2l003
/
bz2l003.lzh
/
BZ2LIB
/
BZ2DLL.C
next >
Wrap
C/C++ Source or Header
|
1998-06-02
|
1KB
|
40 lines
#include "bz2dll.h"
#include <windows.h>
static int BZ2DLLLoaded = 0;
static HINSTANCE BZ2DLLhLib;
int BZ2DLLLoadLibrary(void)
{
HINSTANCE hLib;
if(BZ2DLLLoaded==1){return 0;}
hLib=LoadLibrary("BZ2LIB.DLL");
if(hLib == NULL){
MessageBox(NULL,"Can't load BZ2LIB.DLL","Error",MB_ICONEXCLAMATION);
return -1;
}
BZ2DLLLoaded=1;
BZ2DLLhLib=hLib;
BZ2GetVersion=GetProcAddress(hLib,"BZ2GetVersion");
BZ2GetRunning=GetProcAddress(hLib,"BZ2GetRunning");
BZ2GetLevelStream=GetProcAddress(hLib,"BZ2GetLevelStream");
BZ2GetLevel=GetProcAddress(hLib,"BZ2GetLevel");
/*BZ2OpenStream=GetProcAddress(hLib,"BZ2OpenStream");*/
BZ2Open=GetProcAddress(hLib,"BZ2Open");
/*BZ2CloseStream=GetProcAddress(hLib,"BZ2CloseStream");*/
BZ2Close=GetProcAddress(hLib,"BZ2Close");
BZ2Write=GetProcAddress(hLib,"BZ2Write");
BZ2Read=GetProcAddress(hLib,"BZ2Read");
return 0;
}
int BZ2DLLFreeLibrary(void)
{
if(BZ2DLLLoaded==0){return 0;}
FreeLibrary(BZ2DLLhLib);
BZ2DLLLoaded=0;
}