4.30 beta

This commit is contained in:
Igor Pavlov
2005-11-18 00:00:00 +00:00
committed by Kornel Lesiński
parent bcd1db2f5a
commit e18587ba51
214 changed files with 5385 additions and 2712 deletions

View File

@@ -21,6 +21,17 @@ DEFINE_GUID(CLSID_CCompressDeflateDecoder,
0x23170F69, 0x40C1, 0x278B, 0x04, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00);
HINSTANCE g_hInstance;
#ifndef _UNICODE
bool g_IsNT = false;
static bool IsItWindowsNT()
{
OSVERSIONINFO versionInfo;
versionInfo.dwOSVersionInfoSize = sizeof(versionInfo);
if (!::GetVersionEx(&versionInfo))
return false;
return (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT);
}
#endif
#ifndef COMPRESS_DEFLATE
#include "../Common/CodecsPath.h"
@@ -34,7 +45,12 @@ extern "C"
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
g_hInstance = hInstance;
#ifndef _UNICODE
g_IsNT = IsItWindowsNT();
#endif
}
return TRUE;
}
@@ -85,10 +101,10 @@ STDAPI GetHandlerProperty(PROPID propID, PROPVARIANT *value)
return S_OK;
}
case NArchive::kExtension:
propVariant = L"gz tgz";
propVariant = L"gz gzip tgz tpz";
break;
case NArchive::kAddExtension:
propVariant = L"* .tar";
propVariant = L"* * .tar .tar";
break;
case NArchive::kUpdate:
propVariant = true;

View File

@@ -192,7 +192,7 @@ STDMETHODIMP CHandler::SetProperties(const wchar_t **names, const PROPVARIANT *v
if (value.vt != VT_UI4)
return E_INVALIDARG;
m_Method.NumPasses = value.ulVal;
if (m_Method.NumPasses < 1 || m_Method.NumPasses > 4)
if (m_Method.NumPasses < 1 || m_Method.NumPasses > 10)
return E_INVALIDARG;
}
else if (name == L"FB")
@@ -200,8 +200,10 @@ STDMETHODIMP CHandler::SetProperties(const wchar_t **names, const PROPVARIANT *v
if (value.vt != VT_UI4)
return E_INVALIDARG;
m_Method.NumFastBytes = value.ulVal;
/*
if (m_Method.NumFastBytes < 3 || m_Method.NumFastBytes > 255)
return E_INVALIDARG;
*/
}
else
return E_INVALIDARG;