home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1998 June / Vpr9806a.iso / OLS / Windows / ZIP3J014 / zip3j014.lzh / SRC / ZIP32J / ZIPAPI.C < prev    next >
C/C++ Source or Header  |  1998-01-11  |  962b  |  43 lines

  1. /*
  2.     zipapi.c
  3.  
  4.         by Yoshioka Tsuneo(QWF00133@niftyserve.or.jp)
  5.         welcome any e-mail!!
  6.         You can use this file as Public Domain Software.
  7.         Copy,Edit,Re-distibute and for any purpose,you can use this file.
  8.  
  9. */
  10. #include "zipapi.h"
  11. #include <windows.h>
  12. #include <winbase.h>
  13.  
  14. static int ZIP32DLLLoaded=0;
  15. static HINSTANCE ZIP32DLLhLib;
  16.  
  17. int ZIP32DLLLoadLibrary(void)
  18. {
  19.     HINSTANCE hLib;
  20.  
  21.     if(ZIP32DLLLoaded==1){return 0;}
  22.     hLib=LoadLibrary("IZIP32J.DLL");
  23.     if(hLib == NULL){
  24.         MessageBox(NULL,"Can't load IZIP32J.DLL","Error",MB_ICONEXCLAMATION);
  25.         return -1;
  26.     }
  27.  
  28.     ZIP32DLLhLib=hLib;
  29.     ZpVersion=GetProcAddress(hLib,"ZpVersion");
  30.     ZpInit=GetProcAddress(hLib,"ZpInit");
  31.     ZpSetOptions=GetProcAddress(hLib,"ZpSetOptions");
  32.     ZpGetOptions=GetProcAddress(hLib,"ZpGetOptions");
  33.     ZpArchive=GetProcAddress(hLib,"ZpArchive");
  34.     return 0;
  35. }
  36. int ZIP32DLLFreeLibrary(void)
  37. {
  38.     if(ZIP32DLLLoaded==0){return 0;}
  39.     FreeLibrary(ZIP32DLLhLib);
  40. }
  41.  
  42.  
  43.