return ((int (__stdcall *)(const wxString &, int *)) p)(_szArcName, _nFileCount);\r
}\r
\r
-int TPIHandle::OpenArchive(const wxString & _szArcName, void * * _hArchive)\r
+int TPIHandle::OpenArchive(const wxString & _szArcName)\r
{\r
if (! this->lib.HasSymbol(wxT("OpenArchive")))\r
{\r
return -1;\r
}\r
\r
- return ((int (__stdcall *)(const wxString &, void * *)) p)(_szArcName, _hArchive);\r
+ return ((int (__stdcall *)(const wxString &, void * *)) p)(_szArcName, & this->archive);\r
}\r
\r
-int TPIHandle::CloseArchive(void * _hArchive)\r
+int TPIHandle::CloseArchive(void)\r
{\r
if (! this->lib.HasSymbol(wxT("CloseArchive")))\r
{\r
return -1;\r
}\r
\r
- return ((int (__stdcall *)(void *)) p)(_hArchive);\r
+ return ((int (__stdcall *)(void *)) p)(this->archive);\r
}\r
\r
-int TPIHandle::GetFileInformation(void * _hArchive, TPI_FILEINFO * _fiInfo, bool _bFirst)\r
+int TPIHandle::GetFileInformation(TPI_FILEINFO * _fiInfo, bool _bFirst)\r
{\r
if (! this->lib.HasSymbol(wxT("GetFileInformation")) || ! _fiInfo)\r
{\r
_fiInfo->llFileID = 0;\r
_fiInfo->pCustomInfo = NULL;\r
\r
- return ((int (__stdcall *)(void *, TPI_FILEINFO *, bool)) p)(_hArchive, _fiInfo, _bFirst);\r
+ return ((int (__stdcall *)(void *, TPI_FILEINFO *, bool)) p)(this->archive, _fiInfo, _bFirst);\r
}\r
\r
-int TPIHandle::GetArchiveInformation(void * _hArchive, TPI_ARCHIVEINFO * _aiInfo)\r
+int TPIHandle::GetArchiveInformation(TPI_ARCHIVEINFO * _aiInfo)\r
{\r
if (! this->lib.HasSymbol(wxT("GetArchiveInformation")) || ! _aiInfo)\r
{\r
_aiInfo->wCompressRatio = 0;\r
_aiInfo->pCustomInfo = NULL;\r
\r
- return ((int (__stdcall *)(void *, TPI_ARCHIVEINFO *)) p)(_hArchive, _aiInfo);\r
+ return ((int (__stdcall *)(void *, TPI_ARCHIVEINFO *)) p)(this->archive, _aiInfo);\r
}\r
\r
int TPIHandle::Command(unsigned int _uCommand, TPI_SWITCHES * _swInfo, const wxString & _szArcName, const wxArrayString & _szFiles)\r
bool FreeLibrary(void);
int CheckArchive(const wxString &, int *);
- int OpenArchive(const wxString &, void * *);
- int CloseArchive(void *);
- int GetFileInformation(void *, TPI_FILEINFO *, bool);
- int GetArchiveInformation(void *, TPI_ARCHIVEINFO *);
+ int OpenArchive(const wxString &);
+ int CloseArchive(void);
+ int GetFileInformation(TPI_FILEINFO *, bool);
+ int GetArchiveInformation(TPI_ARCHIVEINFO *);
int Command(unsigned int, TPI_SWITCHES *, const wxString &, const wxArrayString &);
int SetCallbackProc(TPI_PROC);
private:
wxDynamicLibrary lib;
+ void * archive;
};
#endif
TPICallbackProc(TPI_NOTIFY_COMMON, & piInfo);
// \8f\91\8cÉ\82ð\8aJ\82\81B
- void * hArc = NULL;
- if (tpi.OpenArchive(szFileName, & hArc) != TPI_ERROR_SUCCESS)
+ if (tpi.OpenArchive(szFileName) != TPI_ERROR_SUCCESS)
{
procDlg.Show(false);
tpi.FreeLibrary();
this->fileinfo.Alloc(nFileCount);
// \83t\83@\83C\83\8b\8fî\95ñ\82ð\83\8d\81[\83h\81B
- if (tpi.GetFileInformation(hArc, & piInfo.fiInfo, true) == TPI_ERROR_SUCCESS)
+ if (tpi.GetFileInformation(& piInfo.fiInfo, true) == TPI_ERROR_SUCCESS)
{
do
{
if (TPICallbackProc(TPI_NOTIFY_COMMON, & piInfo) == TPI_CALLBACK_CANCEL)
{
procDlg.Show(false);
- tpi.CloseArchive(hArc);
+ tpi.CloseArchive();
wxCommandEvent e;
this->OnArcClose(e);
::wxMessageBox(wxT("Fault : Canceled by user!"));
// \8fî\95ñ\82ð\95Û\91¶\82µ\82Ä\83J\83E\83\93\83g\83A\83b\83v\81B
this->fileinfo.Add(piInfo.fiInfo);
}
- while (tpi.GetFileInformation(hArc, & piInfo.fiInfo, false) == TPI_ERROR_SUCCESS);
+ while (tpi.GetFileInformation(& piInfo.fiInfo, false) == TPI_ERROR_SUCCESS);
}
// \8eG\91½\8f\88\97\9d\81B
// \8f\91\8cÉ\82Ì\8fî\95ñ\82ð\8eæ\93¾\81B
TPI_ARCHIVEINFO aiInfo;
- if (tpi.GetArchiveInformation(hArc, & aiInfo) != TPI_ERROR_SUCCESS)
+ if (tpi.GetArchiveInformation(& aiInfo) != TPI_ERROR_SUCCESS)
{
procDlg.Show(false);
tpi.FreeLibrary();
this->statusbar->SetStatusText(szFileName, 5);
// \8f\91\8cÉ\82ð\95Â\82¶\82é\81B
- if (tpi.CloseArchive(hArc) != TPI_ERROR_SUCCESS)
+ if (tpi.CloseArchive() != TPI_ERROR_SUCCESS)
{
::wxMessageBox(wxT("Fault : CloseArchive()!"));
}