else\r
{\r
hArc->GetProperty(nIndex, kpidExtension, & prop);\r
- _fiInfo->szStoredName = wxT("data.") + (prop.vt == VT_BSTR ? WC2String(prop.bstrVal) : wxEmptyString);\r
+ _fiInfo->szStoredName = wxT("data.") + (prop.vt == VT_BSTR ? WC2String(prop.bstrVal) : (wxString) wxEmptyString);\r
}\r
hArc->GetProperty(nIndex, kpidMethod, & prop);\r
if (prop.vt == VT_BSTR)\r
\r
int __stdcall GetFormatInformation2(TPI_FORMATINFO * _fiInfo, unsigned int & nIndex)\r
{\r
+ // Initialization.\r
+ _fiInfo->fArchive = true;\r
+ _fiInfo->fComment = false;\r
+ _fiInfo->fEncryptKeyFile = false;\r
+ _fiInfo->fEncryptPassword = false;\r
+ _fiInfo->fEncryptHeader = false;\r
+ _fiInfo->fMMOptimize = false;\r
+ _fiInfo->fMultiVolume = false;\r
+ _fiInfo->fSolid = false;\r
+ _fiInfo->sCompressLevelMin = 0;\r
+ _fiInfo->sCompressLevelMax = 0;\r
+ _fiInfo->sRecoveryRecordMin = 0;\r
+ _fiInfo->sRecoveryRecordMax = 0;\r
+ _fiInfo->szTypeName.Clear();\r
+ _fiInfo->szSuffix.Clear();\r
_fiInfo->szEngineName = g_hLib.CanonicalizeName(wxT("7z"));\r
_fiInfo->szTPIName = wxT("7zArc");\r
_fiInfo->llSupportedCommand = TPI_COMMAND_EXTRACT | TPI_COMMAND_TEST;\r
_fiInfo->llTypeId = nIndex;\r
- _fiInfo->fArchive = true;\r
+ _fiInfo->pCustomInfo = NULL;\r
unsigned int nBase = nIndex++;\r
if (guidList[nBase] == CLSID_CFormatZip)\r
{\r
else if (guidList[nBase] == CLSID_CFormatArj)\r
{\r
_fiInfo->szTypeName = wxT("Arj"); _fiInfo->szSuffix = wxT("arj"); _fiInfo->fEncryptPassword = true;\r
+ _fiInfo->fSFX = true;\r
}\r
else if (guidList[nBase] == CLSID_CFormatLzh)\r
{\r
_fiInfo->szTypeName = wxT("Lzh"); _fiInfo->szSuffix = wxT("lzh;lha;lzs");\r
+ _fiInfo->fSFX = true;\r
}\r
#endif\r
else if (guidList[nBase] == CLSID_CFormat7z)\r
else if (guidList[nBase] == CLSID_CFormatCab)\r
{\r
_fiInfo->szTypeName = wxT("Cab"); _fiInfo->szSuffix = wxT("cab"); _fiInfo->fMultiVolume = true;\r
+ _fiInfo->fSFX = true;\r
}\r
#endif\r
else if (guidList[nBase] == CLSID_CFormatNsis)\r
{\r
_fiInfo->szTypeName = wxT("NSIS"); _fiInfo->szSuffix = wxT("exe");\r
+ _fiInfo->fSFX = true;\r
}\r
else if (guidList[nBase] == CLSID_CFormatMslz)\r
{\r
else if (guidList[nBase] == CLSID_CFormatCom)\r
{\r
_fiInfo->szTypeName = wxT("Compound");_fiInfo->szSuffix=wxT("msi");\r
+ _fiInfo->fSFX = true;\r
}\r
else if (guidList[nBase] == CLSID_CFormatIso)\r
{\r
{\r
_fiInfo->szTypeName = wxT("TAR");\r
_fiInfo->szSuffix = wxT("tar");\r
+ _fiInfo->fSFX = true;\r
_fiInfo->llSupportedCommand |= TPI_COMMAND_CREATE | TPI_COMMAND_ADD;\r
}\r
#endif\r
{\r
// 書庫形式を認識。\r
IInArchive * hArc;\r
- for (unsigned int i = 0; i < sizeof(guidList) / sizeof(GUID); i++)\r
+ for (unsigned int i = 0; i < sizeof(guidList) / sizeof(GUID); )\r
{\r
if (((unsigned int (__stdcall *)(const GUID *, const GUID *, void * *)) g_fpProc)(& guidList[i], & IID_IInArchive, (void **) & hArc) != S_OK)\r
{\r
return TPI_ERROR_IO_ARC_OPEN;\r
}\r
\r
+ // 形式の情報を取得。\r
+ g_llEngineId = i;\r
+ TPI_FORMATINFO fiInfo;\r
+ GetFormatInformation2(& fiInfo, i);\r
+\r
// 書庫として開く。\r
CArchiveOpenCallback * openCallbackSpec = new CArchiveOpenCallback;\r
CMyComPtr<IArchiveOpenCallback> openCallback(openCallbackSpec);\r
- wxULongLong_t nMax;\r
- fileSpec->GetSize(& nMax);\r
+ wxULongLong_t nMax = 0;\r
+ if (fiInfo.fSFX)\r
+ {\r
+ fileSpec->GetSize(& nMax);\r
+ }\r
if (hArc->Open(file, & nMax, openCallback) == S_OK)\r
{\r
- g_llEngineId = i;\r
* _hArchive = hArc;\r
return TPI_ERROR_SUCCESS;\r
}\r