diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/00am.sln ./00am.sln
--- /var/tmp/ax7z_src-orig/00am.sln	2004-10-07 19:57:12.000000000 +0900
+++ ./00am.sln	2013-08-17 22:00:04.872222400 +0900
@@ -1,34 +1,19 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "00am", "00am.vcproj", "{BB1F21AB-35C8-4474-AD0E-5138023DCD7C}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "00am", "00am.vcxproj", "{BB1F21AB-35C8-4474-AD0E-5138023DCD7C}"
 EndProject
 Global
-	GlobalSection(SourceCodeControl) = preSolution
-		SccNumberOfProjects = 2
-		SccProjectName0 = \u0022$/Hamana/00am\u0022,\u0020FHBAAAAA
-		SccLocalPath0 = ..
-		SccProvider0 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe
-		CanCheckoutShared = false
-		SccProjectFilePathRelativizedFromConnection0 = if7z\\
-		SolutionUniqueID = {F41EEF12-39F9-46A7-ABEF-136E24B830E0}
-		SccProjectUniqueName1 = 00am.vcproj
-		SccLocalPath1 = ..
-		CanCheckoutShared = false
-		SccProjectFilePathRelativizedFromConnection1 = if7z\\
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
 	EndGlobalSection
-	GlobalSection(SolutionConfiguration) = preSolution
-		Debug = Debug
-		Release = Release
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{BB1F21AB-35C8-4474-AD0E-5138023DCD7C}.Debug|Win32.ActiveCfg = Debug|Win32
+		{BB1F21AB-35C8-4474-AD0E-5138023DCD7C}.Debug|Win32.Build.0 = Debug|Win32
+		{BB1F21AB-35C8-4474-AD0E-5138023DCD7C}.Release|Win32.ActiveCfg = Release|Win32
+		{BB1F21AB-35C8-4474-AD0E-5138023DCD7C}.Release|Win32.Build.0 = Release|Win32
 	EndGlobalSection
-	GlobalSection(ProjectConfiguration) = postSolution
-		{BB1F21AB-35C8-4474-AD0E-5138023DCD7C}.Debug.ActiveCfg = Debug|Win32
-		{BB1F21AB-35C8-4474-AD0E-5138023DCD7C}.Debug.Build.0 = Debug|Win32
-		{BB1F21AB-35C8-4474-AD0E-5138023DCD7C}.Release.ActiveCfg = Release|Win32
-		{BB1F21AB-35C8-4474-AD0E-5138023DCD7C}.Release.Build.0 = Release|Win32
-	EndGlobalSection
-	GlobalSection(ExtensibilityGlobals) = postSolution
-	EndGlobalSection
-	GlobalSection(ExtensibilityAddIns) = postSolution
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
 	EndGlobalSection
 EndGlobal
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/00am.vcproj ./00am.vcproj
--- /var/tmp/ax7z_src-orig/00am.vcproj	2005-09-26 03:31:18.000000000 +0900
+++ ./00am.vcproj	2015-01-09 01:11:53.036917800 +0900
@@ -24,12 +24,12 @@
 				Name="VCCLCompilerTool"
 				Optimization="2"
 				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories=".,7z"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MY00AM_EXPORTS"
+				AdditionalIncludeDirectories=".,7z;&quot;C:\Program Files\Library\boost\boost_1_37&quot;"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MY00AM_EXPORTS;EXTERNAL_CODECS"
 				StringPooling="TRUE"
 				RuntimeLibrary="0"
 				EnableFunctionLevelLinking="TRUE"
-				RuntimeTypeInfo="FALSE"
+				RuntimeTypeInfo="TRUE"
 				UsePrecompiledHeader="2"
 				PrecompiledHeaderFile=".\Release/00am.pch"
 				AssemblerListingLocation=".\Release/"
@@ -42,9 +42,11 @@
 				Name="VCCustomBuildTool"/>
 			<Tool
 				Name="VCLinkerTool"
+				AdditionalDependencies="comctl32.lib"
 				OutputFile="Release/ax7z.spi"
 				LinkIncremental="1"
 				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories="&quot;C:\Program Files\Library\boost\boost_1_37\lib&quot;"
 				ModuleDefinitionFile=".\ax7z.def"
 				ProgramDatabaseFile=".\Release/ax7z.pdb"
 				ImportLibrary=".\Release/ax7z.lib"
@@ -89,10 +91,11 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories=".,7z"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MY00AM_EXPORTS"
+				AdditionalIncludeDirectories=".;7z;&quot;C:\Program Files\Library\boost\boost_1_37&quot;"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MY00AM_EXPORTS;EXTERNAL_CODECS"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="1"
+				RuntimeTypeInfo="TRUE"
 				UsePrecompiledHeader="2"
 				PrecompiledHeaderFile=".\Debug/00am.pch"
 				AssemblerListingLocation=".\Debug/"
@@ -107,9 +110,11 @@
 				Name="VCCustomBuildTool"/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="F:\projects\hamana\Hamana\target\DefaultSPIs\ax7z.spi"
+				AdditionalDependencies="comctl32.lib"
+				OutputFile="$(OutDir)/ax7z.spi"
 				LinkIncremental="1"
 				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories="&quot;C:\Program Files\Library\boost\boost_1_37\lib&quot;"
 				ModuleDefinitionFile=".\ax7z.def"
 				GenerateDebugInformation="TRUE"
 				ProgramDatabaseFile=".\Debug/ax7z.pdb"
@@ -250,6 +255,18 @@
 					RelativePath=".\7z\Common\MyCom.h">
 				</File>
 				<File
+					RelativePath=".\7z\common\MyString.cpp">
+				</File>
+				<File
+					RelativePath=".\7z\common\MyString.h">
+				</File>
+				<File
+					RelativePath=".\7z\common\MyVector.cpp">
+				</File>
+				<File
+					RelativePath=".\7z\common\MyVector.h">
+				</File>
+				<File
 					RelativePath=".\7z\Common\StdInStream.cpp">
 					<FileConfiguration
 						Name="Release|Win32">
@@ -308,26 +325,6 @@
 					RelativePath=".\7z\7zip\Common\StreamUtils.h">
 				</File>
 				<File
-					RelativePath=".\7z\Common\String.cpp">
-					<FileConfiguration
-						Name="Release|Win32">
-						<Tool
-							Name="VCCLCompilerTool"
-							UsePrecompiledHeader="0"
-							ObjectFile="$(IntDir)/$(InputName)1.obj"/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Debug|Win32">
-						<Tool
-							Name="VCCLCompilerTool"
-							UsePrecompiledHeader="0"
-							ObjectFile="$(IntDir)/$(InputName)1.obj"/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath=".\7z\Common\String.h">
-				</File>
-				<File
 					RelativePath="7z\Common\StringConvert.cpp">
 					<FileConfiguration
 						Name="Release|Win32">
@@ -373,26 +370,6 @@
 					RelativePath=".\7z\Common\StringToInt.h">
 				</File>
 				<File
-					RelativePath=".\7z\Common\Vector.cpp">
-					<FileConfiguration
-						Name="Release|Win32">
-						<Tool
-							Name="VCCLCompilerTool"
-							UsePrecompiledHeader="0"
-							ObjectFile="$(IntDir)/$(InputName)1.obj"/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Debug|Win32">
-						<Tool
-							Name="VCCLCompilerTool"
-							UsePrecompiledHeader="0"
-							ObjectFile="$(IntDir)/$(InputName)1.obj"/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath=".\7z\Common\Vector.h">
-				</File>
-				<File
 					RelativePath=".\7z\Common\Wildcard.cpp">
 					<FileConfiguration
 						Name="Release|Win32">
@@ -432,7 +409,7 @@
 							Name="VCCLCompilerTool"
 							Optimization="0"
 							AdditionalIncludeDirectories=""
-							PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;MY00AM_EXPORTS;$(NoInherit)"
+							PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;MY00AM_EXPORTS;$(NoInherit);EXTERNAL_CODECS"
 							BasicRuntimeChecks="3"
 							UsePrecompiledHeader="0"
 							BrowseInformation="1"/>
@@ -454,7 +431,7 @@
 							Name="VCCLCompilerTool"
 							Optimization="0"
 							AdditionalIncludeDirectories=""
-							PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;MY00AM_EXPORTS;$(NoInherit)"
+							PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;MY00AM_EXPORTS;$(NoInherit);EXTERNAL_CODECS"
 							BasicRuntimeChecks="3"
 							UsePrecompiledHeader="0"
 							BrowseInformation="1"/>
@@ -479,7 +456,7 @@
 							Name="VCCLCompilerTool"
 							Optimization="0"
 							AdditionalIncludeDirectories=""
-							PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;MY00AM_EXPORTS;$(NoInherit)"
+							PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;MY00AM_EXPORTS;$(NoInherit);EXTERNAL_CODECS"
 							BasicRuntimeChecks="3"
 							UsePrecompiledHeader="0"
 							BrowseInformation="1"/>
@@ -489,6 +466,12 @@
 					RelativePath="7z\7zip\Bundles\ax7z\OpenCallback.h">
 				</File>
 				<File
+					RelativePath=".\7z\7zip\Bundles\ax7z\PasswordManager.cpp">
+				</File>
+				<File
+					RelativePath=".\7z\7zip\Bundles\ax7z\PasswordManager.h">
+				</File>
+				<File
 					RelativePath=".\7z\7zip\Bundles\ax7z\SolidArchiveExtractCallback.cpp">
 					<FileConfiguration
 						Name="Release|Win32">
@@ -500,6 +483,7 @@
 						Name="Debug|Win32">
 						<Tool
 							Name="VCCLCompilerTool"
+							PreprocessorDefinitions="EXTERNAL_CODECS"
 							UsePrecompiledHeader="0"/>
 					</FileConfiguration>
 				</File>
@@ -713,7 +697,7 @@
 					RelativePath=".\7z\7zip\Ui\Common\ArchiveOpenCallback.h">
 				</File>
 				<File
-					RelativePath=".\7z\7zip\Ui\Common\ArchiverInfo.cpp">
+					RelativePath=".\7z\7zip\Ui\Common\DefaultName.cpp">
 					<FileConfiguration
 						Name="Release|Win32">
 						<Tool
@@ -730,27 +714,13 @@
 					</FileConfiguration>
 				</File>
 				<File
-					RelativePath=".\7z\7zip\Ui\Common\ArchiverInfo.h">
+					RelativePath=".\7z\7zip\Ui\Common\DefaultName.h">
 				</File>
 				<File
-					RelativePath=".\7z\7zip\Ui\Common\DefaultName.cpp">
-					<FileConfiguration
-						Name="Release|Win32">
-						<Tool
-							Name="VCCLCompilerTool"
-							UsePrecompiledHeader="0"
-							ObjectFile="$(IntDir)/$(InputName)1.obj"/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Debug|Win32">
-						<Tool
-							Name="VCCLCompilerTool"
-							UsePrecompiledHeader="0"
-							ObjectFile="$(IntDir)/$(InputName)1.obj"/>
-					</FileConfiguration>
+					RelativePath=".\7z\7zip\ui\common\LoadCodecs.cpp">
 				</File>
 				<File
-					RelativePath=".\7z\7zip\Ui\Common\DefaultName.h">
+					RelativePath=".\7z\7zip\ui\common\LoadCodecs.h">
 				</File>
 				<File
 					RelativePath=".\7z\7zip\Ui\Common\OpenArchive.cpp">
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/00am.vcxproj ./00am.vcxproj
--- /var/tmp/ax7z_src-orig/00am.vcxproj	1970-01-01 09:00:00.000000000 +0900
+++ ./00am.vcxproj	2015-01-09 01:12:20.242638100 +0900
@@ -0,0 +1,403 @@
+ï»¿<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <SccProjectName>"$/Hamana/00am", FHBAAAAA</SccProjectName>
+    <SccAuxPath />
+    <SccLocalPath>..</SccLocalPath>
+    <SccProvider>MSSCCI:Microsoft Visual SourceSafe</SccProvider>
+    <ProjectGuid>{BB1F21AB-35C8-4474-AD0E-5138023DCD7C}</ProjectGuid>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <OutDir>.\Release\</OutDir>
+    <IntDir>.\Release\</IntDir>
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <OutDir>.\Debug\</OutDir>
+    <IntDir>.\Debug\</IntDir>
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <AdditionalIncludeDirectories>.;7z;C:\Program Files (x86)\Library\boost\boost_1_57_0;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_WIN32_WINNT=0x0501;NDEBUG;_WINDOWS;_USRDLL;MY00AM_EXPORTS;EXTERNAL_CODECS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <RuntimeTypeInfo>true</RuntimeTypeInfo>
+      <PrecompiledHeader />
+      <PrecompiledHeaderOutputFile>.\Release/00am.pch</PrecompiledHeaderOutputFile>
+      <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
+      <ObjectFileName>.\Release/</ObjectFileName>
+      <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>comctl32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>Release/ax7z.spi</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>C:\Program Files (x86)\Library\boost\boost_1_57_0\lib32-msvc-11.0;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <ModuleDefinitionFile>.\ax7z.def</ModuleDefinitionFile>
+      <ProgramDatabaseFile>.\Release/ax7z.pdb</ProgramDatabaseFile>
+      <ImportLibrary>.\Release/ax7z.lib</ImportLibrary>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+    <Midl>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>Win32</TargetEnvironment>
+      <TypeLibraryName>.\Release/00am.tlb</TypeLibraryName>
+      <HeaderFileName />
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0411</Culture>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>.;7z;C:\Program Files (x86)\Library\boost\boost_1_57_0;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_WIN32_WINNT=0x0501;_DEBUG;_WINDOWS;_USRDLL;MY00AM_EXPORTS;EXTERNAL_CODECS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <RuntimeTypeInfo>true</RuntimeTypeInfo>
+      <PrecompiledHeader />
+      <PrecompiledHeaderOutputFile>.\Debug/00am.pch</PrecompiledHeaderOutputFile>
+      <AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
+      <ObjectFileName>.\Debug/</ObjectFileName>
+      <ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
+      <BrowseInformation>true</BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>comctl32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)ax7z.spi</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>C:\Program Files (x86)\Library\boost\boost_1_57_0\lib32-msvc-11.0;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <ModuleDefinitionFile>.\ax7z.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>.\Debug/ax7z.pdb</ProgramDatabaseFile>
+      <ImportLibrary>.\Debug/ax7z.lib</ImportLibrary>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+    <Midl>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>Win32</TargetEnvironment>
+      <TypeLibraryName>.\Debug/00am.tlb</TypeLibraryName>
+      <HeaderFileName />
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0411</Culture>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <None Include="ax7z.def" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="ax7z.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="entryFuncs.cpp">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_WIN32_WINNT=0x0501;_DEBUG;_WINDOWS;_MBCS;_USRDLL;MY00AM_EXPORTS</PreprocessorDefinitions>
+      <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;_WIN32_WINNT=0x0501;NDEBUG;_WINDOWS;_MBCS;_USRDLL;MY00AM_EXPORTS</PreprocessorDefinitions>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="infcache.cpp">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_WIN32_WINNT=0x0501;_DEBUG;_WINDOWS;_MBCS;_USRDLL;MY00AM_EXPORTS</PreprocessorDefinitions>
+      <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;_WIN32_WINNT=0x0501;NDEBUG;_WINDOWS;_MBCS;_USRDLL;MY00AM_EXPORTS</PreprocessorDefinitions>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="7z\Common\IntToString.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+    </ClCompile>
+    <ClCompile Include="7z\common\MyString.cpp" />
+    <ClCompile Include="7z\common\MyVector.cpp" />
+    <ClCompile Include="7z\Common\StdInStream.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+    </ClCompile>
+    <ClCompile Include="7z\Common\StdOutStream.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+    </ClCompile>
+    <ClCompile Include="7z\7zip\Common\StreamUtils.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="7z\Common\StringConvert.cpp">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_WIN32_WINNT=0x0501;_DEBUG;_WINDOWS;_MBCS;_USRDLL;MY00AM_EXPORTS</PreprocessorDefinitions>
+      <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="7z\Common\StringToInt.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+    </ClCompile>
+    <ClCompile Include="7z\Common\Wildcard.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+    </ClCompile>
+    <ClCompile Include="7z\7zip\Bundles\ax7z\bridge.cpp">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_WIN32_WINNT=0x0501;_DEBUG;_WINDOWS;_MBCS;_USRDLL;MY00AM_EXPORTS;EXTERNAL_CODECS</PreprocessorDefinitions>
+      <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="7z\7zip\Bundles\ax7z\ExtractCallback.cpp">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_WIN32_WINNT=0x0501;_DEBUG;_WINDOWS;_MBCS;_USRDLL;MY00AM_EXPORTS;EXTERNAL_CODECS</PreprocessorDefinitions>
+      <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="7z\7zip\Bundles\ax7z\OpenCallback.cpp">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_WIN32_WINNT=0x0501;_DEBUG;_WINDOWS;_MBCS;_USRDLL;MY00AM_EXPORTS;EXTERNAL_CODECS</PreprocessorDefinitions>
+      <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="7z\7zip\Bundles\ax7z\PasswordManager.cpp" />
+    <ClCompile Include="7z\7zip\Bundles\ax7z\SolidArchiveExtractCallback.cpp">
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EXTERNAL_CODECS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="7z\7zip\Common\FileStreams.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="7z\Windows\DLL.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+    </ClCompile>
+    <ClCompile Include="7z\Windows\FileDir.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+    </ClCompile>
+    <ClCompile Include="7z\Windows\FileFind.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+    </ClCompile>
+    <ClCompile Include="7z\Windows\FileIO.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+    </ClCompile>
+    <ClCompile Include="7z\Windows\FileName.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+    </ClCompile>
+    <ClCompile Include="7z\Windows\PropVariant.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+    </ClCompile>
+    <ClCompile Include="7z\Windows\PropVariantConversions.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+    </ClCompile>
+    <ClCompile Include="7z\Windows\Registry.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="7z\7zip\Ui\Common\ArchiveOpenCallback.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="7z\7zip\Ui\Common\DefaultName.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+    </ClCompile>
+    <ClCompile Include="7z\7zip\ui\common\LoadCodecs.cpp" />
+    <ClCompile Include="7z\7zip\Ui\Common\OpenArchive.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+      </PrecompiledHeader>
+      <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="critsect.h" />
+    <ClInclude Include="entryFuncs.h" />
+    <ClInclude Include="infcache.h" />
+    <ClInclude Include="resource.h" />
+    <ClInclude Include="7z\Common\IntToString.h" />
+    <ClInclude Include="7z\Common\MyCom.h" />
+    <ClInclude Include="7z\common\MyString.h" />
+    <ClInclude Include="7z\common\MyVector.h" />
+    <ClInclude Include="7z\Common\StdInStream.h" />
+    <ClInclude Include="7z\Common\StdOutStream.h" />
+    <ClInclude Include="7z\7zip\Common\StreamUtils.h" />
+    <ClInclude Include="7z\Common\StringConvert.h" />
+    <ClInclude Include="7z\Common\StringToInt.h" />
+    <ClInclude Include="7z\Common\Wildcard.h" />
+    <ClInclude Include="7z\7zip\Bundles\ax7z\ExtractCallback.h" />
+    <ClInclude Include="7z\7zip\Bundles\ax7z\OpenCallback.h" />
+    <ClInclude Include="7z\7zip\Bundles\ax7z\PasswordManager.h" />
+    <ClInclude Include="7z\7zip\Bundles\ax7z\SolidArchiveExtractCallback.h" />
+    <ClInclude Include="7z\7zip\Common\FileStreams.h" />
+    <ClInclude Include="7z\Windows\DLL.h" />
+    <ClInclude Include="7z\Windows\FileDir.h" />
+    <ClInclude Include="7z\Windows\FileFind.h" />
+    <ClInclude Include="7z\Windows\FileIO.h" />
+    <ClInclude Include="7z\Windows\FileName.h" />
+    <ClInclude Include="7z\Windows\PropVariant.h" />
+    <ClInclude Include="7z\Windows\PropVariantConversions.h" />
+    <ClInclude Include="7z\Windows\Registry.h" />
+    <ClInclude Include="7z\7zip\Ui\Common\ArchiveOpenCallback.h" />
+    <ClInclude Include="7z\7zip\Ui\Common\DefaultName.h" />
+    <ClInclude Include="7z\7zip\ui\common\LoadCodecs.h" />
+    <ClInclude Include="7z\7zip\Ui\Common\OpenArchive.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <Text Include="ax7z.txt" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/00am.vcxproj.filters ./00am.vcxproj.filters
--- /var/tmp/ax7z_src-orig/00am.vcxproj.filters	1970-01-01 09:00:00.000000000 +0900
+++ ./00am.vcxproj.filters	2015-01-09 01:11:53.051919300 +0900
@@ -0,0 +1,232 @@
+ï»¿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{bc81bfe4-18f5-4499-af81-2506eec4439c}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{7d9bb849-91e9-46c2-8099-a8e73c05be34}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl</Extensions>
+    </Filter>
+    <Filter Include="7-zip">
+      <UniqueIdentifier>{d55998b6-8860-4d8b-9d36-6c2717f54c32}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="7-zip\Common">
+      <UniqueIdentifier>{7210fb95-299b-46ef-b4d2-527e3dba152f}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="7-zip\bridge">
+      <UniqueIdentifier>{6b27c23d-b4c5-441b-8650-f2535e4a95ca}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="7-zip\7-zip Common">
+      <UniqueIdentifier>{6a767c8f-d844-4595-a3d9-3edccc019ad0}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="7-zip\Windows">
+      <UniqueIdentifier>{35a9db38-e1c7-46b0-99d6-608967e2fcdb}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="7-zip\UI Common">
+      <UniqueIdentifier>{ecb11459-0174-44a6-8c63-16a8fc696184}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{03e9e4d5-0f3f-4d0a-91ca-fa43d0ee3a85}</UniqueIdentifier>
+      <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="ax7z.def">
+      <Filter>Source Files</Filter>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="ax7z.rc">
+      <Filter>Source Files</Filter>
+    </ResourceCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="entryFuncs.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="infcache.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\Common\IntToString.cpp">
+      <Filter>7-zip\Common</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\common\MyString.cpp">
+      <Filter>7-zip\Common</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\common\MyVector.cpp">
+      <Filter>7-zip\Common</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\Common\StdInStream.cpp">
+      <Filter>7-zip\Common</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\Common\StdOutStream.cpp">
+      <Filter>7-zip\Common</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\7zip\Common\StreamUtils.cpp">
+      <Filter>7-zip\Common</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\Common\StringConvert.cpp">
+      <Filter>7-zip\Common</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\Common\StringToInt.cpp">
+      <Filter>7-zip\Common</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\Common\Wildcard.cpp">
+      <Filter>7-zip\Common</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\7zip\Bundles\ax7z\bridge.cpp">
+      <Filter>7-zip\bridge</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\7zip\Bundles\ax7z\ExtractCallback.cpp">
+      <Filter>7-zip\bridge</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\7zip\Bundles\ax7z\OpenCallback.cpp">
+      <Filter>7-zip\bridge</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\7zip\Bundles\ax7z\PasswordManager.cpp">
+      <Filter>7-zip\bridge</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\7zip\Bundles\ax7z\SolidArchiveExtractCallback.cpp">
+      <Filter>7-zip\bridge</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\7zip\Common\FileStreams.cpp">
+      <Filter>7-zip\7-zip Common</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\Windows\DLL.cpp">
+      <Filter>7-zip\Windows</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\Windows\FileDir.cpp">
+      <Filter>7-zip\Windows</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\Windows\FileFind.cpp">
+      <Filter>7-zip\Windows</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\Windows\FileIO.cpp">
+      <Filter>7-zip\Windows</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\Windows\FileName.cpp">
+      <Filter>7-zip\Windows</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\Windows\PropVariant.cpp">
+      <Filter>7-zip\Windows</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\Windows\PropVariantConversions.cpp">
+      <Filter>7-zip\Windows</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\Windows\Registry.cpp">
+      <Filter>7-zip\Windows</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\7zip\Ui\Common\ArchiveOpenCallback.cpp">
+      <Filter>7-zip\UI Common</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\7zip\Ui\Common\DefaultName.cpp">
+      <Filter>7-zip\UI Common</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\7zip\ui\common\LoadCodecs.cpp">
+      <Filter>7-zip\UI Common</Filter>
+    </ClCompile>
+    <ClCompile Include="7z\7zip\Ui\Common\OpenArchive.cpp">
+      <Filter>7-zip\UI Common</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="critsect.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="entryFuncs.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="infcache.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="resource.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\Common\IntToString.h">
+      <Filter>7-zip\Common</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\Common\MyCom.h">
+      <Filter>7-zip\Common</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\common\MyString.h">
+      <Filter>7-zip\Common</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\common\MyVector.h">
+      <Filter>7-zip\Common</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\Common\StdInStream.h">
+      <Filter>7-zip\Common</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\Common\StdOutStream.h">
+      <Filter>7-zip\Common</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\7zip\Common\StreamUtils.h">
+      <Filter>7-zip\Common</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\Common\StringConvert.h">
+      <Filter>7-zip\Common</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\Common\StringToInt.h">
+      <Filter>7-zip\Common</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\Common\Wildcard.h">
+      <Filter>7-zip\Common</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\7zip\Bundles\ax7z\ExtractCallback.h">
+      <Filter>7-zip\bridge</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\7zip\Bundles\ax7z\OpenCallback.h">
+      <Filter>7-zip\bridge</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\7zip\Bundles\ax7z\PasswordManager.h">
+      <Filter>7-zip\bridge</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\7zip\Bundles\ax7z\SolidArchiveExtractCallback.h">
+      <Filter>7-zip\bridge</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\7zip\Common\FileStreams.h">
+      <Filter>7-zip\7-zip Common</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\Windows\DLL.h">
+      <Filter>7-zip\Windows</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\Windows\FileDir.h">
+      <Filter>7-zip\Windows</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\Windows\FileFind.h">
+      <Filter>7-zip\Windows</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\Windows\FileIO.h">
+      <Filter>7-zip\Windows</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\Windows\FileName.h">
+      <Filter>7-zip\Windows</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\Windows\PropVariant.h">
+      <Filter>7-zip\Windows</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\Windows\PropVariantConversions.h">
+      <Filter>7-zip\Windows</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\Windows\Registry.h">
+      <Filter>7-zip\Windows</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\7zip\Ui\Common\ArchiveOpenCallback.h">
+      <Filter>7-zip\UI Common</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\7zip\Ui\Common\DefaultName.h">
+      <Filter>7-zip\UI Common</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\7zip\ui\common\LoadCodecs.h">
+      <Filter>7-zip\UI Common</Filter>
+    </ClInclude>
+    <ClInclude Include="7z\7zip\Ui\Common\OpenArchive.h">
+      <Filter>7-zip\UI Common</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <Text Include="ax7z.txt" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/7z/7zip/Bundles/ax7z/ExtractCallback.cpp ./7z/7zip/Bundles/ax7z/ExtractCallback.cpp
--- /var/tmp/ax7z_src-orig/7z/7zip/Bundles/ax7z/ExtractCallback.cpp	2005-09-26 00:48:18.000000000 +0900
+++ ./7z/7zip/Bundles/ax7z/ExtractCallback.cpp	2015-01-09 01:11:53.055919700 +0900
@@ -1,6 +1,9 @@
 // ExtractCallback.h
+#define NOMINMAX
 #include <windows.h>
+#undef NOMINMAX
 #include "ExtractCallback.h"
+#include "PasswordManager.h"
 #include "Common/StringConvert.h"
 #include "Windows/FileDir.h"
 #include "Windows/PropVariant.h"
@@ -9,7 +12,7 @@
 
 using namespace NWindows;
 
-void CExtractCallbackImp::Init(IInArchive *archive, char* pBuf, UINT32 nBufSize, FILE* fp, UINT32 index)
+void CExtractCallbackImp::Init(IInArchive *archive, char** pBuf, UINT32 nBufSize, FILE* fp, UINT32 index)
 {
   assert(!pBuf || !fp);
   m_NumErrors = 0;
@@ -46,38 +49,56 @@
 {
 public:
     CMemOutStream() : m_iPos(0), m_pBuf(NULL), m_nBufSize(0) {}
-    void Init(char* pBuf, UINT32 nBufSize, FILE* fp, bool bValid) { m_pBuf = pBuf; m_fp = fp; m_nBufSize = nBufSize; m_bValid = bValid; }
+    void Init(char** pBuf, UINT32 nBufSize, FILE* fp, bool bValid) {
+		m_pBuf = pBuf;
+		m_fp = fp;
+		m_nBufSize = nBufSize;
+		m_bValid = bValid;
+		m_bIsSizeUnspecified = (nBufSize == 0);
+	}
   MY_UNKNOWN_IMP
 
   STDMETHOD(Write)(const void *data, UINT32 size, UINT32 *processedSize);
   STDMETHOD(WritePart)(const void *data, UINT32 size, UINT32 *processedSize);
 protected:
     UINT32 m_iPos;
-    char* m_pBuf;
+    char** m_pBuf;
     FILE* m_fp;
     UINT32 m_nBufSize;
     bool m_bValid;
+    bool m_bIsSizeUnspecified;
 };
 
 STDMETHODIMP CMemOutStream::Write(const void *data, UINT32 size, UINT32 *processedSize)
 {
-    if (!m_bValid) {
-        *processedSize = size;
-        return S_OK;
-    }
-
     UINT32 dummy;
     if (processedSize == NULL) {
         processedSize = &dummy;
     }
     
+    if (!m_bValid) {
+        *processedSize = size;
+        return S_OK;
+    }
+
     if (m_nBufSize < m_iPos + size) {
-        // ”O‚Ì‚½‚ßƒ`ƒFƒbƒN
-        return S_FALSE;
+		if(m_bIsSizeUnspecified) {
+			// Extend buffer
+			if(m_pBuf) {
+				char *pBuf = (char*)LocalAlloc(LMEM_FIXED, static_cast<size_t>(m_iPos + size));
+				if(!pBuf) return S_FALSE;
+				CopyMemory(pBuf, *m_pBuf, m_iPos);
+				LocalFree(*m_pBuf);
+				*m_pBuf = pBuf;
+			}
+		} else {
+			// ”O‚Ì‚½‚ßƒ`ƒFƒbƒN
+			return S_FALSE;
+		}
     }
 
     if (m_pBuf) {
-        memcpy(m_pBuf + m_iPos, data, size);
+        memcpy(*m_pBuf + m_iPos, data, size);
     } else {
         fwrite(data, size, 1, m_fp);
     }
@@ -114,6 +135,11 @@
     {
       break;
     }
+    case NArchive::NExtract::NOperationResult::kDataError:
+    case NArchive::NExtract::NOperationResult::kCRCError:
+    {
+      PasswordManager::Get().NotifyError();
+    }
     default:
     {
       m_NumErrors++;
@@ -124,17 +150,10 @@
 
 STDMETHODIMP CExtractCallbackImp::CryptoGetTextPassword(BSTR *password)
 {
-  /*
-  if (!m_PasswordIsDefined)
-  {
-    g_StdOut << "\nEnter password:";
-    AString oemPassword = g_StdIn.ScanStringUntilNewLine();
-    m_Password = MultiByteToUnicodeString(oemPassword, CP_OEMCP); 
-    m_PasswordIsDefined = true;
-  }
-  CMyComBSTR tempName(m_Password);
+  UString usPassword = PasswordManager::Get().GetPassword(false);
+  CMyComBSTR tempName(usPassword);
   *password = tempName.Detach();
-  */
+
   return S_OK;
 }
   
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/7z/7zip/Bundles/ax7z/ExtractCallback.h ./7z/7zip/Bundles/ax7z/ExtractCallback.h
--- /var/tmp/ax7z_src-orig/7z/7zip/Bundles/ax7z/ExtractCallback.h	2005-06-28 22:01:40.000000000 +0900
+++ ./7z/7zip/Bundles/ax7z/ExtractCallback.h	2015-01-09 01:11:53.058920000 +0900
@@ -5,13 +5,15 @@
 #ifndef __EXTRACTCALLBACK_H
 #define __EXTRACTCALLBACK_H
 
-#include "Common/String.h"
+//#include "Common/String.h"
 #include "../../Common/FileStreams.h"
 #include "../../IPassword.h"
 #include "../../Archive/IArchive.h"
 #include "../../UI/Common/ZipRegistry.h"
 #include <stdio.h>
 
+#include "entryFuncs.h"
+
 class CExtractCallbackImp: 
   public IArchiveExtractCallback,
   public ICryptoGetTextPassword,
@@ -39,10 +41,11 @@
 
   bool IsEncrypted(UINT32 index);
 public:
-  void Init(IInArchive *archive, char* pBuf, UINT32 nBufSize, FILE* fp, UINT32 index);
+  void Init(IInArchive *archive, char** pBuf, UINT32 nBufSize, FILE* fp, UINT32 index);
 
   UINT64 m_NumErrors;
-  char* m_pBuf;
+private:
+  char** m_pBuf;
   FILE* m_fp;
   UINT32 m_nBufSize;
   UINT32 m_nIndex;
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/7z/7zip/Bundles/ax7z/OpenCallback.cpp ./7z/7zip/Bundles/ax7z/OpenCallback.cpp
--- /var/tmp/ax7z_src-orig/7z/7zip/Bundles/ax7z/OpenCallback.cpp	2005-06-21 21:50:12.000000000 +0900
+++ ./7z/7zip/Bundles/ax7z/OpenCallback.cpp	2013-04-12 00:17:01.659373300 +0900
@@ -1,6 +1,7 @@
 // OpenCallback.cpp
 #include <windows.h>
 #include "OpenCallback.h"
+#include "PasswordManager.h"
 
 #include "Common/StdOutStream.h"
 #include "Common/StdInStream.h"
@@ -70,17 +71,10 @@
 
 STDMETHODIMP COpenCallbackImp2::CryptoGetTextPassword(BSTR *password)
 {
-    /*
-    if (!PasswordIsDefined)
-    {
-    g_StdOut << "\nEnter password:";
-    AString oemPassword = g_StdIn.ScanStringUntilNewLine();
-    Password = MultiByteToUnicodeString(oemPassword, CP_OEMCP); 
-    PasswordIsDefined = true;
-    }
-    CMyComBSTR temp(Password);
+	UString usPassword = PasswordManager::Get().GetPassword(true);
+	CMyComBSTR temp(usPassword);
     *password = temp.Detach();
-    */
+
     return S_OK;
 }
 
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/7z/7zip/Bundles/ax7z/OpenCallback.h ./7z/7zip/Bundles/ax7z/OpenCallback.h
--- /var/tmp/ax7z_src-orig/7z/7zip/Bundles/ax7z/OpenCallback.h	2005-06-21 21:50:12.000000000 +0900
+++ ./7z/7zip/Bundles/ax7z/OpenCallback.h	2013-04-12 00:17:01.661373500 +0900
@@ -5,7 +5,7 @@
 #ifndef __OPENCALLBACK_H
 #define __OPENCALLBACK_H
 
-#include "Common/String.h"
+//#include "Common/String.h"
 #include "Common/MyCom.h"
 #include "Windows/FileFind.h"
 
@@ -38,9 +38,7 @@
   UString _folderPrefix;
   NWindows::NFile::NFind::CFileInfoW _fileInfo;
 public:
-  bool PasswordIsDefined;
-  UString Password;
-  COpenCallbackImp2(): PasswordIsDefined(false) {}
+  COpenCallbackImp2() {}
   void LoadFileInfo(const UString &folderPrefix,  const UString &fileName)
   {
     _folderPrefix = folderPrefix;
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/7z/7zip/Bundles/ax7z/PasswordManager.cpp ./7z/7zip/Bundles/ax7z/PasswordManager.cpp
--- /var/tmp/ax7z_src-orig/7z/7zip/Bundles/ax7z/PasswordManager.cpp	1970-01-01 09:00:00.000000000 +0900
+++ ./7z/7zip/Bundles/ax7z/PasswordManager.cpp	2013-04-12 00:17:01.663373700 +0900
@@ -0,0 +1,152 @@
+//PasswordManager.cpp
+#include "PasswordManager.h"
+#include "../../../Common/StringConvert.h"
+#include "resource.h"
+
+PasswordManager& PasswordManager::Get()
+{
+	static PasswordManager pm;
+	return pm;
+}
+
+const UString& PasswordManager::GetPassword(bool bFilename)
+{
+	extern HINSTANCE g_hInstance;
+	m_bFilename = bFilename;
+	if(IsRetry()) {
+		m_bPassword = false;
+	}
+	if(!m_bPassword && !m_bSkip && !m_bSkipArc) {
+		DialogBoxParam(g_hInstance, MAKEINTRESOURCE(IDD_PASSWORD), NULL, (DLGPROC)PasswordDlgProc, reinterpret_cast<LPARAM>(static_cast<void*>(this)));
+		m_bError = false;
+	}
+	if(!m_bPassword) {
+		m_usPassword = L"";
+	}
+	m_bPasswordUsed = true;
+	return m_usPassword;
+}
+
+bool PasswordManager::IsRetry() const
+{
+	return m_bPasswordUsed && m_bError && !m_bSkip && !m_bSkipArc;
+}
+
+bool PasswordManager::IsValid() const
+{
+	return !m_bArchiveChanged && !m_bError && !m_bSkip && !m_bSkipArc;
+}
+
+void PasswordManager::NotifyArchive(const UString& usArchive)
+{
+	if(m_usArchive != usArchive) {
+		m_bPasswordUsed = false;
+		m_bArchiveChanged = true;
+		m_bError = false;
+		m_bSkip = false;
+		m_bSkipArc = false;
+		m_usArchive = usArchive;
+	}
+}
+
+void PasswordManager::NotfiyEndFile()
+{
+	m_bPasswordUsed = false;
+	m_bError = false;
+	m_bSkip = false;
+}
+
+void PasswordManager::NotifyError()
+{
+	m_bError = true;
+}
+
+void PasswordManager::ClearError()
+{
+	m_bError = false;
+}
+
+void PasswordManager::Reset()
+{
+	m_bPassword = false;
+}
+
+INT_PTR CALLBACK PasswordManager::PasswordDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+	switch(uMsg)
+	{
+	case WM_INITDIALOG:
+	{
+		SetWindowLongPtr(hwnd, DWLP_USER, lParam);
+		PasswordManager* p = static_cast<PasswordManager*>(reinterpret_cast<void*>(GetWindowLongPtr(hwnd, DWLP_USER)));
+		if(p->m_bFilename) EnableWindow(GetDlgItem(hwnd, IDC_SKIP_BUTTON), FALSE);
+		if(p->IsRetry()) SetWindowText(GetDlgItem(hwnd, IDC_GUIDE_STATIC), "Extract error, maybe caused by wrong password,\nretype password:");
+		HMENU hSysMenu = GetSystemMenu(hwnd, FALSE);
+		InsertMenu(hSysMenu, SC_CLOSE, MF_STRING | (p->m_bTopMost ? MF_CHECKED : 0), IDM_TOPMOST, TEXT("TopMost"));
+		InsertMenu(hSysMenu, SC_CLOSE, MF_SEPARATOR, 0, 0);
+		if(p->m_bTopMost) {
+			SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
+		} else {
+			SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
+		}
+		return TRUE;
+	}
+	case WM_INITMENUPOPUP:
+	{
+		HMENU hSysMenu = GetSystemMenu(hwnd, FALSE);
+		if(hSysMenu == static_cast<HANDLE>(reinterpret_cast<void*>(wParam))) {
+			PasswordManager* p = static_cast<PasswordManager*>(reinterpret_cast<void*>(GetWindowLongPtr(hwnd, DWLP_USER)));
+			ModifyMenu(hSysMenu, IDM_TOPMOST, MF_BYCOMMAND | MF_STRING | (p->m_bTopMost ? MF_CHECKED : 0), IDM_TOPMOST, TEXT("TopMost"));
+		}
+		return TRUE;
+	}
+	case WM_SYSCOMMAND:
+		if((wParam & 0xFFF0) == IDM_TOPMOST) {
+			PasswordManager* p = static_cast<PasswordManager*>(reinterpret_cast<void*>(GetWindowLongPtr(hwnd, DWLP_USER)));
+			p->m_bTopMost = !p->m_bTopMost;
+			if(p->m_bTopMost) {
+				SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
+			} else {
+				SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
+			}
+			return TRUE;
+		}
+		return FALSE;
+	case WM_COMMAND:
+		switch(LOWORD(wParam)) {
+		case IDOK:
+		{
+			PasswordManager* p = static_cast<PasswordManager*>(reinterpret_cast<void*>(GetWindowLongPtr(hwnd, DWLP_USER)));
+			char buf[4096+1];
+			GetDlgItemText(hwnd, IDC_PASSWORD_EDIT, buf, sizeof(buf));
+			AString oemPassword = buf;
+			p->m_usPassword = MultiByteToUnicodeString(oemPassword, CP_OEMCP);
+			p->m_bPassword = true;
+			p->m_bArchiveChanged = false;
+			EndDialog(hwnd, TRUE);
+			break;
+		}
+		case IDC_SKIP_BUTTON:
+		{
+			PasswordManager* p = static_cast<PasswordManager*>(reinterpret_cast<void*>(GetWindowLongPtr(hwnd, DWLP_USER)));
+			p->m_bSkip = true;
+			p->m_bPassword = false;
+			EndDialog(hwnd, FALSE);
+			break;
+		}
+		case IDC_SKIPARC_BUTTON:
+		{
+			PasswordManager* p = static_cast<PasswordManager*>(reinterpret_cast<void*>(GetWindowLongPtr(hwnd, DWLP_USER)));
+			p->m_bSkipArc = true;
+			p->m_bPassword = false;
+			EndDialog(hwnd, FALSE);
+			break;
+		}
+		default:
+			return FALSE;
+		}
+	default:
+		return FALSE;
+	}
+	return FALSE; // not reached
+}
\ No newline at end of file
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/7z/7zip/Bundles/ax7z/PasswordManager.h ./7z/7zip/Bundles/ax7z/PasswordManager.h
--- /var/tmp/ax7z_src-orig/7z/7zip/Bundles/ax7z/PasswordManager.h	1970-01-01 09:00:00.000000000 +0900
+++ ./7z/7zip/Bundles/ax7z/PasswordManager.h	2013-04-12 00:17:01.665373900 +0900
@@ -0,0 +1,45 @@
+//PasswordManager.h
+
+#pragma once
+
+#ifndef PASSWORDMANAGER_H
+#define PASSWORDMANAGER_H
+
+#include "../../../Common/MyString.h"
+
+class PasswordManager
+{
+public:
+	static PasswordManager& Get();
+	bool IsRetry() const;
+	bool IsDefined() const { return m_bPassword; }
+	bool IsValid() const;
+	const UString& GetPassword(bool bFilename);
+	void NotifyArchive(const UString& usArchive);
+	void NotfiyEndFile();
+	void NotifyError();
+	void ClearError();
+	void Reset();
+	bool SetTopMost(bool flag)
+	{
+		bool bPrev = m_bTopMost;
+		m_bTopMost = flag;
+		return bPrev;
+	}
+	bool GetTopMost() const { return m_bTopMost; }
+private:
+	static INT_PTR CALLBACK PasswordDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
+	PasswordManager() : m_bPassword(false), m_bPasswordUsed(false), m_bArchiveChanged(false), m_bError(false), m_bSkip(false), m_bSkipArc(false) {}
+	bool m_bPassword;
+	bool m_bPasswordUsed;
+	bool m_bArchiveChanged;
+	bool m_bError;
+	bool m_bFilename;
+	bool m_bSkip;
+	bool m_bSkipArc;
+	bool m_bTopMost;
+	UString m_usPassword;
+	UString m_usArchive;
+};
+
+#endif
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/7z/7zip/Bundles/ax7z/SolidArchiveExtractCallback.cpp ./7z/7zip/Bundles/ax7z/SolidArchiveExtractCallback.cpp
--- /var/tmp/ax7z_src-orig/7z/7zip/Bundles/ax7z/SolidArchiveExtractCallback.cpp	2005-09-26 02:36:18.000000000 +0900
+++ ./7z/7zip/Bundles/ax7z/SolidArchiveExtractCallback.cpp	2015-01-09 01:11:53.063920500 +0900
@@ -1,10 +1,12 @@
 // SolidArchiveExtractCallback.h
 #include <windows.h>
 #include "SolidArchiveExtractCallback.h"
+#include "PasswordManager.h"
 #include "Common/StringConvert.h"
 #include "Windows/FileDir.h"
 #include "Windows/PropVariant.h"
 #include "Windows/PropVariantConversions.h"
+#include "resource.h"
 #include <assert.h>
 
 using namespace NWindows;
@@ -110,27 +112,26 @@
     {
       break;
     }
+    case NArchive::NExtract::NOperationResult::kDataError:
+    case NArchive::NExtract::NOperationResult::kCRCError:
+    {
+      PasswordManager::Get().NotifyError();
+    }
     default:
     {
       m_NumErrors++;
     }
   }
+  PasswordManager::Get().NotfiyEndFile();
   return S_OK;
 }
 
 STDMETHODIMP CSolidArchiveExtractCallbackImp::CryptoGetTextPassword(BSTR *password)
 {
-  /*
-  if (!m_PasswordIsDefined)
-  {
-    g_StdOut << "\nEnter password:";
-    AString oemPassword = g_StdIn.ScanStringUntilNewLine();
-    m_Password = MultiByteToUnicodeString(oemPassword, CP_OEMCP); 
-    m_PasswordIsDefined = true;
-  }
-  CMyComBSTR tempName(m_Password);
+  UString usPassword = PasswordManager::Get().GetPassword(false);
+  CMyComBSTR tempName(usPassword);
   *password = tempName.Detach();
-  */
+
   return S_OK;
 }
   
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/7z/7zip/Bundles/ax7z/SolidArchiveExtractCallback.h ./7z/7zip/Bundles/ax7z/SolidArchiveExtractCallback.h
--- /var/tmp/ax7z_src-orig/7z/7zip/Bundles/ax7z/SolidArchiveExtractCallback.h	2005-09-26 02:36:38.000000000 +0900
+++ ./7z/7zip/Bundles/ax7z/SolidArchiveExtractCallback.h	2013-04-12 00:17:01.667374100 +0900
@@ -5,7 +5,7 @@
 #ifndef __SOLIDARCHIVEEXTRACTCALLBACK_H
 #define __SOLIDARCHIVEEXTRACTCALLBACK_H
 
-#include "Common/String.h"
+//#include "Common/String.h"
 #include "../../Common/FileStreams.h"
 #include "../../IPassword.h"
 #include "../../Archive/IArchive.h"
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/7z/7zip/Bundles/ax7z/bridge.cpp ./7z/7zip/Bundles/ax7z/bridge.cpp
--- /var/tmp/ax7z_src-orig/7z/7zip/Bundles/ax7z/bridge.cpp	2005-09-26 01:35:36.000000000 +0900
+++ ./7z/7zip/Bundles/ax7z/bridge.cpp	2015-01-09 01:11:53.068921000 +0900
@@ -2,7 +2,10 @@
 7-zip decode engine - susie bridge
 */
 
+#define NOMINMAX
 #include <windows.h>
+#undef NOMINMAX
+#include <commctrl.h>
 #include <initguid.h>
 #include <time.h>
 #include <vector>
@@ -25,17 +28,18 @@
 #include "ExtractCallback.h"
 #include "SolidArchiveExtractCallback.h"
 #include "OpenCallback.h"
+#include "PasswordManager.h"
+#include "resource.h"
 
-HINSTANCE g_hInstance = 0;
+extern HINSTANCE g_hInstance;
+extern int g_nSolidEnable7z;
+extern int g_nSolidEnableRar;
 
 using namespace NWindows;
 using namespace NFile;
 
-static bool MyOpenArchive(const UString &archiveName, 
+static bool MyOpenArchive(CCodecs *cc, const UString &archiveName, 
                          const NFind::CFileInfoW &archiveFileInfo,
-#ifndef EXCLUDE_COM
-                         HMODULE *module,
-#endif
                          IInArchive **archiveHandler,
                          UString &defaultItemName,
                          bool &passwordEnabled, 
@@ -43,11 +47,8 @@
 {
     COpenCallbackImp2 *openCallbackSpec = new COpenCallbackImp2;
     CMyComPtr<IArchiveOpenCallback> openCallback = openCallbackSpec;
-    if (passwordEnabled)
-    {
-        openCallbackSpec->PasswordIsDefined = passwordEnabled;
-        openCallbackSpec->Password = password;
-    }
+
+    PasswordManager::Get().NotifyArchive(archiveName);
 
     UString fullName;
     int fileNamePartStartIndex;
@@ -56,26 +57,22 @@
         fullName.Left(fileNamePartStartIndex), 
         fullName.Mid(fileNamePartStartIndex));
 
-    CArchiverInfo archiverInfo;
-    HRESULT result = OpenArchive(archiveName, 
-#ifndef EXCLUDE_COM
-        module,
-#endif
-        archiveHandler, 
-        archiverInfo, 
-        defaultItemName,
-        openCallback);
-    if (result == S_FALSE) {
-        return false;
-    }
-    if (result != S_OK) {
-        return false;
-    }
-//    defaultItemName = GetDefaultName(archiveName, 
-//        archiverInfo.Extensions[subExtIndex].Extension, 
-//        archiverInfo.Extensions[subExtIndex].AddExtension);
-    passwordEnabled = openCallbackSpec->PasswordIsDefined;
-    password = openCallbackSpec->Password;
+    int dummy;
+    HRESULT result;
+	do {
+		result = OpenArchive(cc, archiveName, 
+			archiveHandler, 
+			dummy,
+			defaultItemName,
+			openCallback);
+		if (result != S_OK) {
+			PasswordManager::Get().NotifyError();
+			if(!PasswordManager::Get().IsRetry())
+				return false;
+		} else {
+			PasswordManager::Get().ClearError();
+		}
+	} while(result != S_OK && PasswordManager::Get().IsRetry());
 
     return true;
 }
@@ -93,13 +90,35 @@
     return true;
 }
 
-static bool IsSolid(IInArchive* archive, const NFind::CFileInfoW& archiverInfo, UINT32 numItems)
+enum SOLID_TYPE
+{
+    SOLID_NONE,
+    SOLID_RAR,
+    SOLID_7Z
+};
+
+static SOLID_TYPE IsSolid(IInArchive* archive, const NFind::CFileInfoW& archiverInfo, UINT32 numItems)
 {
     // rar ‚Ì�ê�‡‚Í kpidSolid‚ª�Ý’è‚³‚ê‚Ä‚¢‚é‚æ‚¤‚È‚Ì‚Å‚»‚¿‚ç‚ðŽg—p
+    // 7z ‚Ì�ê�‡‚Å‚à�Ý’è‚³‚ê‚Ä‚¢‚é�ê�‡‚ ‚è
     NCOM::CPropVariant propVariant;
     if (S_OK == archive->GetArchiveProperty(kpidSolid, &propVariant)) {
         if (propVariant.vt == VT_BOOL) {
-            return propVariant.bVal ? true : false;
+            if(propVariant.bVal) {
+                UString extension;
+                {
+                    int dotPos = archiverInfo.Name.ReverseFind(L'.');
+                    if (dotPos >= 0)
+                        extension = archiverInfo.Name.Mid(dotPos + 1);
+                }
+                if (extension.CompareNoCase(L"7z") == 0) {
+                    return SOLID_7Z;
+                } else {
+                    return SOLID_RAR;
+                }
+            } else {
+                return SOLID_NONE;
+            }
         }
     }
 
@@ -111,23 +130,23 @@
             extension = archiverInfo.Name.Mid(dotPos + 1);
     }
     if (extension.CompareNoCase(L"7z") == 0) {
-		NWindows::NCOM::CPropVariant aPropVariant;
-		BOOL bFlag = 0;
+        NWindows::NCOM::CPropVariant aPropVariant;
+        BOOL bFlag = 0;
         for (size_t i = 0; i < numItems; ++i) {
-			archive->GetProperty(i, kpidBlock, &aPropVariant);
+            archive->GetProperty(i, kpidBlock, &aPropVariant);
             if (aPropVariant.vt == 0) {
-				continue;
+                continue;
             }
             if (aPropVariant.ulVal > 0) {
-				break;
+                break;
             }
             if (bFlag) {
-                return true;
-			}
-			bFlag = TRUE;
-		}
+                return SOLID_7Z;
+            }
+            bFlag = TRUE;
+        }
     }
-    return false;
+    return SOLID_NONE;
 }
 
 int GetArchiveInfoEx(LPSTR filename, long len, HLOCAL *lphInf)
@@ -143,9 +162,15 @@
         return SPI_FILE_READ_ERROR;
     }
 
-#ifndef EXCLUDE_COM
-    NDLL::CLibrary library;
-#endif
+  CCodecs *codecs = new CCodecs;
+  CMyComPtr<
+    #ifdef EXTERNAL_CODECS
+    ICompressCodecsInfo
+    #else
+    IUnknown
+    #endif
+    > compressCodecsInfo = codecs;
+  HRESULT result0 = codecs->Load();
 
     bool passwordEnabled = false;
     UString password;
@@ -153,10 +178,7 @@
 
     // �‘ŒÉ‚ðŠJ‚­
     CMyComPtr<IInArchive> archiveHandler;
-    if (!MyOpenArchive(archiveName, archiveFileInfo, 
-#ifndef EXCLUDE_COM
-        &library,
-#endif
+    if (!MyOpenArchive(codecs, archiveName, archiveFileInfo, 
         &archiveHandler, 
         defaultItemName, passwordEnabled, password)) {
         return SPI_FILE_READ_ERROR;
@@ -168,7 +190,7 @@
     }
 
     // solid?
-    bool bSolid = IsSolid(archiveHandler, archiveFileInfo, numItems);
+    SOLID_TYPE stSolid = IsSolid(archiveHandler, archiveFileInfo, numItems);
 
     std::vector<fileInfo> vFileInfos;
     for (UINT32 i = 0; i < numItems; i++) {
@@ -178,7 +200,7 @@
         }
         UString filePath;
         if (propVariant.vt == VT_EMPTY) {
-            continue;
+            filePath = defaultItemName;
         } else if(propVariant.vt != VT_BSTR) {
             continue;
         } else {
@@ -187,9 +209,9 @@
 
         UINT64 unpackSize = 0;
         if (!GetUINT64Value(archiveHandler, i, kpidSize, unpackSize)) {
-            continue;
-        }
-        if (unpackSize == 0) {
+            // Archive handlers for, at least, bzip2 can return no unpackSize.
+            //continue;
+        } else  if (unpackSize == 0) {
             continue;
         }
 
@@ -203,7 +225,10 @@
             continue;
         }
         if (property.vt != VT_FILETIME) {
-            continue;
+            // Archive handlers for, at least, bzip2 and gzip can return no modified time.
+			property.filetime.dwHighDateTime = 0;
+			property.filetime.dwLowDateTime = 0;
+            //continue;
         }
         FILETIME fileTime = property.filetime;
         // first convert file time (UTC time) to local time
@@ -225,18 +250,26 @@
         atm.tm_year = sysTime.wYear - 1900;     // tm_year is 1900 based
         atm.tm_isdst = -1;
         time_t time = mktime(&atm);
-	
+    
         vFileInfos.push_back(fileInfo());
         fileInfo* pinfo = &vFileInfos.back();
-        if (bSolid) {
-    		lstrcpy((char*)pinfo->method, "7zip_s");
-        } else {
-    		lstrcpy((char*)pinfo->method, "7zip");
-        }
-		pinfo->position = i;
-		pinfo->compsize = static_cast<unsigned long>(packSize);
-		pinfo->filesize = static_cast<unsigned long>(unpackSize);
-		pinfo->timestamp = time;
+        switch(stSolid) {
+        case SOLID_NONE:
+            lstrcpy((char*)pinfo->method, "7zip");
+            break;
+        case SOLID_RAR:
+            lstrcpy((char*)pinfo->method, "7zip_s");
+            pinfo->method[7] = 'R';
+            break;
+        case SOLID_7Z:
+            lstrcpy((char*)pinfo->method, "7zip_s");
+            pinfo->method[7] = '7';
+            break;
+        }
+        pinfo->position = i;
+        pinfo->compsize = static_cast<unsigned long>(packSize);
+        pinfo->filesize = static_cast<unsigned long>(unpackSize);
+        pinfo->timestamp = time;
         // path
         UStringVector vPaths;
         SplitPathToParts(filePath, vPaths);
@@ -266,14 +299,20 @@
             s = s.Left(199);
         }
         strcpy(pinfo->filename, (LPCSTR)s);
-		pinfo->crc = 0;
+
+        pinfo->crc = 0;
+        if (S_OK == archiveHandler->GetProperty(i, kpidCRC, &property)) {
+            if (property.vt == VT_UI4) {
+                pinfo->crc = property.ulVal;
+            }
+        }
     }
 
-	/* �o—Í—p‚Ìƒ�ƒ‚ƒŠ‚ÌŠ„‚è“–‚Ä(ƒtƒ@ƒCƒ‹�”+1‚¾‚¯‚Ì—Ìˆæ‚ª•K—v)�A0‚Å�‰Šú‰»‚µ‚Ä‚¨‚­ */
-	*lphInf = LocalAlloc(LPTR, sizeof(fileInfo) * (vFileInfos.size() + 1));
-	if (*lphInf == NULL) {
-		return SPI_NO_MEMORY;
-	}
+    /* �o—Í—p‚Ìƒ�ƒ‚ƒŠ‚ÌŠ„‚è“–‚Ä(ƒtƒ@ƒCƒ‹�”+1‚¾‚¯‚Ì—Ìˆæ‚ª•K—v)�A0‚Å�‰Šú‰»‚µ‚Ä‚¨‚­ */
+    *lphInf = LocalAlloc(LPTR, sizeof(fileInfo) * (vFileInfos.size() + 1));
+    if (*lphInf == NULL) {
+        return SPI_NO_MEMORY;
+    }
 
     // Œ‹‰Ê‚Ì�ì�¬
     memcpy(*lphInf, &vFileInfos[0], sizeof(fileInfo) * vFileInfos.size());
@@ -281,7 +320,7 @@
     fileInfo* pLast = pFirst + vFileInfos.size();
     pLast->method[0] = '\0';
 
-	return SPI_ALL_RIGHT;
+    return SPI_ALL_RIGHT;
 }
 
 static int GetArchiveInfoWEx_impl(LPCWSTR filename, std::vector<fileInfoW>& vFileInfos)
@@ -297,9 +336,15 @@
         return SPI_FILE_READ_ERROR;
     }
 
-#ifndef EXCLUDE_COM
-    NDLL::CLibrary library;
-#endif
+    CCodecs *codecs = new CCodecs;
+    CMyComPtr<
+        #ifdef EXTERNAL_CODECS
+        ICompressCodecsInfo
+        #else
+        IUnknown
+        #endif
+    > compressCodecsInfo = codecs;
+    HRESULT result = codecs->Load();
 
     bool passwordEnabled = false;
     UString password;
@@ -307,10 +352,7 @@
 
     // �‘ŒÉ‚ðŠJ‚­
     CMyComPtr<IInArchive> archiveHandler;
-    if (!MyOpenArchive(archiveName, archiveFileInfo, 
-#ifndef EXCLUDE_COM
-        &library,
-#endif
+    if (!MyOpenArchive(codecs, archiveName, archiveFileInfo, 
         &archiveHandler, 
         defaultItemName, passwordEnabled, password)) {
         return SPI_FILE_READ_ERROR;
@@ -322,7 +364,7 @@
     }
 
     // solid?
-    bool bSolid = IsSolid(archiveHandler, archiveFileInfo, numItems);
+    SOLID_TYPE stSolid = IsSolid(archiveHandler, archiveFileInfo, numItems);
 
     for (UINT32 i = 0; i < numItems; i++) {
         NCOM::CPropVariant propVariant;
@@ -331,7 +373,7 @@
         }
         UString filePath;
         if (propVariant.vt == VT_EMPTY) {
-            continue;
+            filePath = defaultItemName;
         } else if(propVariant.vt != VT_BSTR) {
             continue;
         } else {
@@ -340,9 +382,9 @@
 
         UINT64 unpackSize = 0;
         if (!GetUINT64Value(archiveHandler, i, kpidSize, unpackSize)) {
-            continue;
-        }
-        if (unpackSize == 0) {
+            // Archive handlers for, at least, bzip2 can return no unpackSize.
+            //continue;
+        } else if (unpackSize == 0) {
             continue;
         }
 
@@ -356,7 +398,10 @@
             continue;
         }
         if (property.vt != VT_FILETIME) {
-            continue;
+            // Archive handlers for, at least, bzip2 and gzip can return no modified time.
+            property.filetime.dwHighDateTime = 0;
+            property.filetime.dwLowDateTime = 0;
+            //continue;
         }
         FILETIME fileTime = property.filetime;
         // first convert file time (UTC time) to local time
@@ -378,18 +423,26 @@
         atm.tm_year = sysTime.wYear - 1900;     // tm_year is 1900 based
         atm.tm_isdst = -1;
         time_t time = mktime(&atm);
-	
+    
         vFileInfos.push_back(fileInfoW());
         fileInfoW* pinfo = &vFileInfos.back();
-        if (bSolid) {
-    		lstrcpy((char*)pinfo->method, "7zip_s");
-        } else {
-    		lstrcpy((char*)pinfo->method, "7zip");
-        }
-		pinfo->position = i;
-		pinfo->compsize = static_cast<unsigned long>(packSize);
-		pinfo->filesize = static_cast<unsigned long>(unpackSize);
-		pinfo->timestamp = time;
+        switch(stSolid) {
+        case SOLID_NONE:
+            lstrcpy((char*)pinfo->method, "7zip");
+            break;
+        case SOLID_RAR:
+            lstrcpy((char*)pinfo->method, "7zip_s");
+            pinfo->method[7] = 'R';
+            break;
+        case SOLID_7Z:
+            lstrcpy((char*)pinfo->method, "7zip_s");
+            pinfo->method[7] = '7';
+            break;
+        }
+        pinfo->position = i;
+        pinfo->compsize = static_cast<unsigned long>(packSize);
+        pinfo->filesize = static_cast<unsigned long>(unpackSize);
+        pinfo->timestamp = time;
         // path
         UStringVector vPaths;
         SplitPathToParts(filePath, vPaths);
@@ -419,7 +472,12 @@
             s = s.Left(199);
         }
         wcscpy(pinfo->filename, (LPCWSTR)s);
-		pinfo->crc = 0;
+        pinfo->crc = 0;
+        if (S_OK == archiveHandler->GetProperty(i, kpidCRC, &property)) {
+            if (property.vt == VT_UI4) {
+                pinfo->crc = property.ulVal;
+            }
+        }
     }
     return SPI_ALL_RIGHT;
 }
@@ -432,11 +490,11 @@
         return nRet;
     }
 
-	/* �o—Í—p‚Ìƒ�ƒ‚ƒŠ‚ÌŠ„‚è“–‚Ä(ƒtƒ@ƒCƒ‹�”+1‚¾‚¯‚Ì—Ìˆæ‚ª•K—v)�A0‚Å�‰Šú‰»‚µ‚Ä‚¨‚­ */
-	*lphInf = LocalAlloc(LPTR, sizeof(fileInfoW) * (vFileInfos.size() + 1));
-	if (*lphInf == NULL) {
-		return SPI_NO_MEMORY;
-	}
+    /* �o—Í—p‚Ìƒ�ƒ‚ƒŠ‚ÌŠ„‚è“–‚Ä(ƒtƒ@ƒCƒ‹�”+1‚¾‚¯‚Ì—Ìˆæ‚ª•K—v)�A0‚Å�‰Šú‰»‚µ‚Ä‚¨‚­ */
+    *lphInf = LocalAlloc(LPTR, sizeof(fileInfoW) * (vFileInfos.size() + 1));
+    if (*lphInf == NULL) {
+        return SPI_NO_MEMORY;
+    }
 
     // Œ‹‰Ê‚Ì�ì�¬
     memcpy(*lphInf, &vFileInfos[0], sizeof(fileInfoW) * vFileInfos.size());
@@ -444,11 +502,11 @@
     fileInfoW* pLast = pFirst + vFileInfos.size();
     pLast->method[0] = '\0';
 
-	return SPI_ALL_RIGHT;
+    return SPI_ALL_RIGHT;
 }
 
 int GetFileEx(char *filename, HLOCAL *dest, const char* pOutFile, fileInfo *pinfo,
-			SPI_PROGRESS lpPrgressCallback, long lData)
+            SPI_PROGRESS lpPrgressCallback, long lData)
 {
     UString archiveName = MultiByteToUnicodeString(filename);
 
@@ -461,9 +519,15 @@
         return SPI_FILE_READ_ERROR;
     }
 
-#ifndef EXCLUDE_COM
-    NDLL::CLibrary library;
-#endif
+    CCodecs *codecs = new CCodecs;
+    CMyComPtr<
+        #ifdef EXTERNAL_CODECS
+        ICompressCodecsInfo
+        #else
+        IUnknown
+        #endif
+    > compressCodecsInfo = codecs;
+    HRESULT result0 = codecs->Load();
 
     bool passwordEnabled = false;
     UString password;
@@ -471,10 +535,7 @@
 
     CMyComPtr<IInArchive> archiveHandler;
 
-    if (!MyOpenArchive(archiveName, archiveFileInfo, 
-#ifndef EXCLUDE_COM
-        &library,
-#endif
+    if (!MyOpenArchive(codecs, archiveName, archiveFileInfo, 
         &archiveHandler, 
         defaultItemName, passwordEnabled, password)) {
             return SPI_FILE_READ_ERROR;
@@ -484,7 +545,8 @@
     UINT32 iExtractFileIndex = pinfo->position;
     UINT64 unpackSize = 0;
     if (!GetUINT64Value(archiveHandler, iExtractFileIndex, kpidSize, unpackSize)) {
-        return SPI_FILE_READ_ERROR;
+        // Archive handlers for, at least, bzip2 can return no unpackSize.
+        //return SPI_FILE_READ_ERROR;
     }
 
     // ‰ð“€
@@ -496,31 +558,50 @@
         *dest = LocalAlloc(LMEM_FIXED, static_cast<size_t>(unpackSize));
         if (*dest == NULL) {
             return SPI_NO_MEMORY;
-        }
-        extractCallbackSpec->Init(archiveHandler, (char*)*dest, static_cast<UINT32>(unpackSize), NULL, iExtractFileIndex);
+		}
+        extractCallbackSpec->Init(archiveHandler, (char**)dest, static_cast<UINT32>(unpackSize), NULL, iExtractFileIndex);
     } else {
         fp = fopen(pOutFile, "wb");
         if (fp == NULL) {
             return SPI_FILE_WRITE_ERROR;
-        }
+		}
         extractCallbackSpec->Init(archiveHandler, NULL, static_cast<UINT32>(unpackSize), fp, iExtractFileIndex);
     }
 
-    HRESULT result = archiveHandler->Extract(&iExtractFileIndex, 1, false, extractCallback);
+    HRESULT result;
+
+    // It seems that password retry can not work for solid RAR
+    if(!lstrcmp((LPSTR)pinfo->method, "7zip_s") && pinfo->method[7] == 'R' && !PasswordManager::Get().IsValid())
+        PasswordManager::Get().Reset();
+
+    do {
+        extractCallbackSpec->m_NumErrors = 0;
+        result = archiveHandler->Extract(&iExtractFileIndex, 1, false, extractCallback);
+        if(PasswordManager::Get().IsRetry()) {
+            if (fp) rewind(fp);
+        }
+    } while(extractCallbackSpec->m_NumErrors != 0 && PasswordManager::Get().IsRetry());
 
     if (fp) {
         fclose(fp);
     }
 
     if (extractCallbackSpec->m_NumErrors != 0) {
-        ::DeleteFile(pOutFile);
+        if (dest) {
+            LocalFree(*dest);
+            *dest = NULL;
+        } else {
+            ::DeleteFile(pOutFile);
+        }
+        PasswordManager::Get().NotfiyEndFile();
         return SPI_FILE_READ_ERROR;
     }
 
-	return SPI_ALL_RIGHT;
+   PasswordManager::Get().NotfiyEndFile();
+   return SPI_ALL_RIGHT;
 }
 int GetFileWEx(wchar_t *filename, HLOCAL *dest, const wchar_t* pOutFile, fileInfoW *pinfo,
-			SPI_PROGRESS lpPrgressCallback, long lData)
+            SPI_PROGRESS lpPrgressCallback, long lData)
 {
     UString archiveName = filename;
 
@@ -533,9 +614,15 @@
         return SPI_FILE_READ_ERROR;
     }
 
-#ifndef EXCLUDE_COM
-    NDLL::CLibrary library;
-#endif
+    CCodecs *codecs = new CCodecs;
+    CMyComPtr<
+        #ifdef EXTERNAL_CODECS
+        ICompressCodecsInfo
+        #else
+        IUnknown
+        #endif
+    > compressCodecsInfo = codecs;
+    HRESULT result0 = codecs->Load();
 
     bool passwordEnabled = false;
     UString password;
@@ -543,10 +630,7 @@
 
     CMyComPtr<IInArchive> archiveHandler;
 
-    if (!MyOpenArchive(archiveName, archiveFileInfo, 
-#ifndef EXCLUDE_COM
-        &library,
-#endif
+    if (!MyOpenArchive(codecs, archiveName, archiveFileInfo, 
         &archiveHandler, 
         defaultItemName, passwordEnabled, password)) {
             return SPI_FILE_READ_ERROR;
@@ -556,7 +640,8 @@
     UINT32 iExtractFileIndex = pinfo->position;
     UINT64 unpackSize = 0;
     if (!GetUINT64Value(archiveHandler, iExtractFileIndex, kpidSize, unpackSize)) {
-        return SPI_FILE_READ_ERROR;
+        // Archive handlers for, at least, bzip2 can return no unpackSize.  
+        //return SPI_FILE_READ_ERROR;
     }
 
     // ‰ð“€
@@ -569,7 +654,7 @@
         if (*dest == NULL) {
             return SPI_NO_MEMORY;
         }
-        extractCallbackSpec->Init(archiveHandler, (char*)*dest, static_cast<UINT32>(unpackSize), NULL, iExtractFileIndex);
+        extractCallbackSpec->Init(archiveHandler, (char**)dest, static_cast<UINT32>(unpackSize), NULL, iExtractFileIndex);
     } else {
         fp = _wfopen(pOutFile, L"wb");
         if (fp == NULL) {
@@ -578,22 +663,45 @@
         extractCallbackSpec->Init(archiveHandler, NULL, static_cast<UINT32>(unpackSize), fp, iExtractFileIndex);
     }
 
-    HRESULT result = archiveHandler->Extract(&iExtractFileIndex, 1, false, extractCallback);
+    HRESULT result;
+
+    // It seems that password retry can not work for solid RAR
+    if(!lstrcmp((LPSTR)pinfo->method, "7zip_s") && pinfo->method[7] == 'R' && !PasswordManager::Get().IsValid())
+        PasswordManager::Get().Reset();
+
+	do {
+        extractCallbackSpec->m_NumErrors = 0;
+		result = archiveHandler->Extract(&iExtractFileIndex, 1, false, extractCallback);
+		if(PasswordManager::Get().IsRetry()) {
+			if (fp) rewind(fp);
+		}
+	} while(extractCallbackSpec->m_NumErrors != 0 && PasswordManager::Get().IsRetry());
 
     if (fp) {
         fclose(fp);
     }
 
     if (extractCallbackSpec->m_NumErrors != 0) {
-        ::DeleteFileW(pOutFile);
+        if (dest) {
+            LocalFree(*dest);
+            *dest = NULL;
+        } else {
+            ::DeleteFileW(pOutFile);
+        }
+        PasswordManager::Get().NotfiyEndFile();
         return SPI_FILE_READ_ERROR;
     }
 
-	return SPI_ALL_RIGHT;
+   PasswordManager::Get().NotfiyEndFile();
+    return SPI_ALL_RIGHT;
 }
 
 int ExtractSolidArchiveEx(LPCWSTR filename, SPI_OnWriteCallback pCallback)
 {
+	// Currently, password retry do not work for solid archive.
+	// Therefore, password is force flushed.
+	if(!PasswordManager::Get().IsValid()) PasswordManager::Get().Reset();
+
     // ‰ð“€‚·‚×‚«ƒtƒ@ƒCƒ‹‚ÌƒCƒ“ƒfƒbƒNƒX‚ð‹�‚ß‚é
     std::vector<fileInfoW> vFileInfos;
     int nRet = GetArchiveInfoWEx_impl(filename, vFileInfos);
@@ -621,9 +729,15 @@
         return SPI_FILE_READ_ERROR;
     }
 
-#ifndef EXCLUDE_COM
-    NDLL::CLibrary library;
-#endif
+    CCodecs *codecs = new CCodecs;
+    CMyComPtr<
+        #ifdef EXTERNAL_CODECS
+        ICompressCodecsInfo
+        #else
+        IUnknown
+        #endif
+    > compressCodecsInfo = codecs;
+    HRESULT result0 = codecs->Load();
 
     bool passwordEnabled = false;
     UString password;
@@ -631,10 +745,7 @@
 
     CMyComPtr<IInArchive> archiveHandler;
 
-    if (!MyOpenArchive(archiveName, archiveFileInfo, 
-#ifndef EXCLUDE_COM
-        &library,
-#endif
+    if (!MyOpenArchive(codecs, archiveName, archiveFileInfo, 
         &archiveHandler, 
         defaultItemName, passwordEnabled, password)) {
             return SPI_FILE_READ_ERROR;
@@ -652,5 +763,32 @@
         return SPI_FILE_READ_ERROR;
     }
 
-	return SPI_ALL_RIGHT;
+    return SPI_ALL_RIGHT;
+}
+
+void GetFormats(std::vector<std::pair<std::string, std::string> > &res)
+{
+	std::map<std::string, std::string> mTable;
+	CCodecs *codecs = new CCodecs;
+    CMyComPtr<
+        #ifdef EXTERNAL_CODECS
+        ICompressCodecsInfo
+        #else
+        IUnknown
+        #endif
+    > compressCodecsInfo = codecs;
+	HRESULT result = codecs->Load();
+    int num = codecs->Formats.Size();
+	res.clear();
+	for(int i = 0; i < num; ++i) {
+        const CArcInfoEx &arc = codecs->Formats[i];
+        std::string arcname = UnicodeStringToMultiByte(arc.Name, CP_OEMCP);
+		int num_ext = arc.Exts.Size();
+		for(int j = 0; j < num_ext; ++j) {
+			if(!arc.Exts[j].Ext.IsEmpty()) {
+				std::string extname = UnicodeStringToMultiByte(arc.Exts[j].Ext, CP_OEMCP);
+				res.push_back(std::make_pair(extname, arcname));
+			}
+		}
+	}
 }
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/ax7z.def ./ax7z.def
--- /var/tmp/ax7z_src-orig/ax7z.def	2005-09-26 00:29:40.000000000 +0900
+++ ./ax7z.def	2013-08-24 11:36:30.042761100 +0900
@@ -9,4 +9,4 @@
 	GetFileInfoW
 	GetFileW
 	ConfigurationDlg
-    ExtractSolidArchive
\ No newline at end of file
+	ExtractSolidArchive
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/ax7z.rc ./ax7z.rc
--- /var/tmp/ax7z_src-orig/ax7z.rc	2005-08-25 23:08:40.000000000 +0900
+++ ./ax7z.rc	2015-01-09 01:11:53.082922400 +0900
@@ -1,6 +1,7 @@
 // Microsoft Visual C++ generated resource script.
 //
 #include "resource.h"
+#include "release.h"
 
 #define APSTUDIO_READONLY_SYMBOLS
 /////////////////////////////////////////////////////////////////////////////
@@ -13,13 +14,11 @@
 #undef APSTUDIO_READONLY_SYMBOLS
 
 /////////////////////////////////////////////////////////////////////////////
-// “ú–{Œê resources
+// “ú–{Œê (“ú–{) resources
 
 #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN)
-#ifdef _WIN32
 LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
 #pragma code_page(932)
-#endif //_WIN32
 
 #ifdef APSTUDIO_INVOKED
 /////////////////////////////////////////////////////////////////////////////
@@ -46,7 +45,7 @@
 
 #endif    // APSTUDIO_INVOKED
 
-#endif    // “ú–{Œê resources
+#endif    // “ú–{Œê (“ú–{) resources
 /////////////////////////////////////////////////////////////////////////////
 
 
@@ -54,50 +53,97 @@
 // ‰pŒê (•Ä�‘) resources
 
 #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 #pragma code_page(1252)
-#endif //_WIN32
 
 /////////////////////////////////////////////////////////////////////////////
 //
 // Dialog
 //
 
-IDD_CONFIG_DIALOG DIALOGEX 0, 0, 162, 55
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | 
-    WS_SYSMENU
+IDD_CONFIG_DIALOG DIALOGEX 0, 0, 211, 167
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "ax7z.spi config"
 FONT 8, "MS Shell Dlg", 400, 0, 0x1
 BEGIN
-    CONTROL         "7z",IDC_7Z_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
-                    7,7,23,10
-    CONTROL         "rar",IDC_RAR_CHECK,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,46,7,25,10
-    CONTROL         "cbr",IDC_CBR_CHECK,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,85,7,26,10
-    CONTROL         "cab",IDC_CAB_CHECK,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,122,7,27,10
-    CONTROL         "arj",IDC_ARJ_CHECK,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,7,20,25,10
-    CONTROL         "lzh",IDC_LZH_CHECK,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,46,20,25,10
-    DEFPUSHBUTTON   "OK",IDOK,7,34,43,14
-    PUSHBUTTON      "Cancel",IDCANCEL,58,34,40,14
-    PUSHBUTTON      "Load Default",IDC_DEFAULT_BUTTON,103,34,52,14
-END
-
-IDD_ABOUT_DIALOG DIALOGEX 0, 0, 167, 61
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | 
-    WS_SYSMENU
+    LTEXT           "&DLL defined:",IDC_STATIC,7,7,41,8
+    LISTBOX         IDC_EXTENSION_LIST,7,17,131,63,LBS_SORT | LBS_MULTIPLESEL | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
+    PUSHBUTTON      "S&elect all",IDC_SELECT_ALL_BUTTON,152,17,52,14
+    PUSHBUTTON      "&Unselect all",IDC_UNSELECT_ALL_BUTTON,152,38,52,14
+    PUSHBUTTON      "&Load Default",IDC_DEFAULT_BUTTON,152,59,52,14
+    LTEXT           "Use&r defined: (semi-colon separated list like bin;img;mdf)",IDC_STATIC,7,88,197,8
+    EDITTEXT        IDC_EXTENSION_EDIT,7,100,197,14,ES_AUTOHSCROLL
+    CONTROL         "S&tay password dialog on top",IDC_TOPMOST_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,120,107,10
+    CONTROL         "&Per-user configuration (ini in AppData)",IDC_PERUSERCONF_CHECK,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,134,140,10
+    DEFPUSHBUTTON   "&OK",IDOK,51,147,43,14
+    PUSHBUTTON      "&Cancel",IDCANCEL,114,147,40,14
+END
+
+IDD_ABOUT_DIALOG DIALOGEX 0, 0, 167, 72
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "About ax7z.spi"
 FONT 8, "MS Shell Dlg", 400, 0, 0x1
 BEGIN
-    DEFPUSHBUTTON   "OK",IDOK,55,40,50,14
-    LTEXT           "ax7z.spi  v0.4",IDC_STATIC,7,7,62,12
-    LTEXT           "7Z/RAR/CBR/CAB/ARJ plug-in using 7z",IDC_STATIC,7,18,
-                    151,21
+    DEFPUSHBUTTON   "OK",IDOK,55,51,50,14
+    LTEXT           "ax7z.spi  v0.7",IDC_STATIC,7,7,62,10
+    LTEXT           "7Z/RAR/CBR/CAB/ARJ etc. plug-in using 7z",IDC_STATIC,7,28,151,12
     LTEXT           "(c) Makito Miyano",IDC_STATIC,98,7,62,12
+    LTEXT           RELEASE_LONG_STR,IDC_STATIC,22,17,74,10
+    LTEXT           "Enhanced by Yak!",IDC_STATIC,98,17,62,12
+    LTEXT           "Using 7z.dll version",IDC_STATIC,27,40,62,8
+    LTEXT           "",IDC_7ZVERSION,92,40,70,8
+END
+
+IDD_PASSWORD DIALOGEX 0, 0, 186, 71
+STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "ax7z.spi password"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+    EDITTEXT        IDC_PASSWORD_EDIT,7,28,172,14,ES_PASSWORD | ES_AUTOHSCROLL
+    DEFPUSHBUTTON   "OK",IDOK,7,50,50,14
+    PUSHBUTTON      "&Skip",IDC_SKIP_BUTTON,68,50,50,14
+    PUSHBUTTON      "Skip &Archive",IDC_SKIPARC_BUTTON,129,50,50,14
+    LTEXT           "Input password:",IDC_GUIDE_STATIC,9,8,170,17
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+IDV_VERSIONINFO VERSIONINFO
+ FILEVERSION 0,7,PATCH_MAJOR,PATCH_MINOR
+ PRODUCTVERSION 0,7,PATCH_MAJOR,PATCH_MINOR
+ FILEFLAGSMASK 0x0L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904E4"
+        BEGIN
+            VALUE "CompanyName", "Yak!"
+            VALUE "FileDescription", "ax7z.spi - 7Z/RAR/CBR/CAB/ARJ etc. plug-in using 7z"
+            VALUE "FileVersion", "v0.7 " RELEASE_STR
+            VALUE "InternalName", "ax7z.spi"
+            VALUE "LegalCopyright", "(c) Makito Miyano, enhanced by Yak!"
+            VALUE "OriginalFilename", "ax7z.spi"
+            VALUE "ProductName", "ax7z.spi"
+            VALUE "ProductVersion", "v0.7 " RELEASE_STR
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1252
+    END
 END
 
 
@@ -107,14 +153,14 @@
 //
 
 #ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO 
+GUIDELINES DESIGNINFO
 BEGIN
     IDD_CONFIG_DIALOG, DIALOG
     BEGIN
         LEFTMARGIN, 7
-        RIGHTMARGIN, 155
+        RIGHTMARGIN, 204
         TOPMARGIN, 7
-        BOTTOMMARGIN, 48
+        BOTTOMMARGIN, 143
     END
 
     IDD_ABOUT_DIALOG, DIALOG
@@ -122,7 +168,15 @@
         LEFTMARGIN, 7
         RIGHTMARGIN, 160
         TOPMARGIN, 7
-        BOTTOMMARGIN, 54
+        BOTTOMMARGIN, 65
+    END
+
+    IDD_PASSWORD, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 179
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 64
     END
 END
 #endif    // APSTUDIO_INVOKED
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/critsect.h ./critsect.h
--- /var/tmp/ax7z_src-orig/critsect.h	2000-11-11 11:30:02.000000000 +0900
+++ ./critsect.h	2013-08-25 21:56:26.830986500 +0900
@@ -14,24 +14,24 @@
 class CriticalSection
 {
 public:
-    CriticalSection()
-    {
-        InitializeCriticalSection(&crit_sect);
-    };
-    ~CriticalSection()
-    {
-        DeleteCriticalSection(&crit_sect);
-    };
-    void Enter()
-    {
-        EnterCriticalSection(&crit_sect);
-    };
-    void Leave()
-    {
-        LeaveCriticalSection(&crit_sect);
-    };
+	CriticalSection()
+	{
+		InitializeCriticalSection(&crit_sect);
+	};
+	~CriticalSection()
+	{
+		DeleteCriticalSection(&crit_sect);
+	};
+	void Enter()
+	{
+		EnterCriticalSection(&crit_sect);
+	};
+	void Leave()
+	{
+		LeaveCriticalSection(&crit_sect);
+	};
 private:
-    CRITICAL_SECTION crit_sect;
+	CRITICAL_SECTION crit_sect;
 };
 
 #endif
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/entryFuncs.cpp ./entryFuncs.cpp
--- /var/tmp/ax7z_src-orig/entryFuncs.cpp	2006-06-18 23:04:06.000000000 +0900
+++ ./entryFuncs.cpp	2015-01-09 01:11:53.108925000 +0900
@@ -2,103 +2,446 @@
 ax7z entry funcs
 */
 
+#define NOMINMAX
 #include <windows.h>
+#undef NOMINMAX
+#include <commctrl.h>
+#include <shlobj.h>
 #include <vector>
 #include <algorithm>
+#include <numeric>
+#include <map>
+#include <set>
 #include "entryFuncs.h"
 #include "infcache.h"
 #include <sstream>
 #include "resource.h"
+#include "7z/7zip/Bundles/ax7z/PasswordManager.h"
+#include <boost/algorithm/string/split.hpp>
+#include <boost/algorithm/string/classification.hpp>
+#include "version.hpp"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include "release.h"
+
+#ifdef NDEBUG
+#define OutputDebugPrintf (void)
+#else
+static void OutputDebugPrintf(char* format, ...)
+{
+	va_list ap;
+	va_start(ap, format);
+	char buf[2048];
+	std::vsprintf(buf, format, ap);
+	OutputDebugString(buf);
+	va_end(ap);
+}
+#endif
+
+struct NoCaseLess
+{
+	bool operator()(const std::string &s1, const std::string &s2) const
+	{
+		return _stricmp(s1.c_str(), s2.c_str()) < 0;
+	}
+};
+
+//Šg’£ŽqŠÇ—�ƒNƒ‰ƒX
+class ExtManager
+{
+private:
+	typedef std::string Ext;
+	struct Info
+	{
+		std::vector<std::string> methods;
+		bool enable;
+	};
+	std::map<Ext, Info, NoCaseLess> m_mTable;
+	std::set<Ext, NoCaseLess> m_sTableUser;
+public:
+	static const char* const SECTION_NAME;
+	static const char* const DEFAULT_EXTENSIONS;
+	ExtManager() {}
+	typedef std::vector<std::pair<std::string, std::string> > Conf;
+	void Init(const Conf& conf);
+	bool IsEnable(LPSTR filename) const;
+	bool IsEnable(LPWSTR filename) const;
+	void SetEnable(const std::string &sExt, bool fEnable)
+	{
+		m_mTable[sExt].enable = fEnable;
+	}
+	typedef std::map<Ext, Info, NoCaseLess>::value_type EachValueType;
+	template<typename Functor>
+	void Each(Functor f) const
+	{
+		std::for_each(m_mTable.begin(), m_mTable.end(), f);
+	}
+	void SetDefault();
+	void Save(const std::string &sIniFileName) const;
+	void Load(const std::string &sIniFileName);
+	void SetPluginInfo(std::vector<std::string> &info) const;
+	void AddUserExt(const std::string& sExt);
+	void RemoveUserExt(const std::string& sExt);
+	void SetUserExtensions(const std::string& sExts);
+	std::string GetUserExtensions() const;
+};
+
+const char* const ExtManager::SECTION_NAME = "ax7z";
+const char* const ExtManager::DEFAULT_EXTENSIONS = "bin;img;mdf";
+
+void ExtManager::Init(const Conf& conf)
+{
+	Conf::const_iterator ciEnd = conf.end();
+	for(Conf::const_iterator ci = conf.begin(); ci != ciEnd; ++ci) {
+		m_mTable[ci->first].enable = true;
+		m_mTable[ci->first].methods.push_back(ci->second);
+	}
+}
+
+bool ExtManager::IsEnable(LPSTR filename) const
+{
+	char buf[_MAX_EXT];
+	_splitpath(filename, NULL, NULL, NULL, buf);
+	if(buf[0] == 0) buf[1] = 0; // guard
+	std::string sBuf(buf+1); // skip period
+	std::map<Ext, Info, NoCaseLess>::const_iterator ci = m_mTable.find(sBuf);
+	if(ci != m_mTable.end()) {
+		return ci->second.enable;
+	}
+	std::set<Ext, NoCaseLess>::const_iterator ciUser = m_sTableUser.find(sBuf);
+	if(ciUser != m_sTableUser.end()) {
+		return true;
+	}
+	return false;
+}
+
+// TODO: Fix just a quick hack
+bool ExtManager::IsEnable(LPWSTR filename) const
+{
+	WCHAR buf_[_MAX_EXT];
+	_wsplitpath(filename, NULL, NULL, NULL, buf_);
+	char buf[_MAX_EXT];
+	if(wcstombs(buf, buf_, sizeof(buf)) == static_cast<std::size_t>(-1)) return false;
+	if(buf[0] == 0) buf[1] = 0; // guard
+	std::string sBuf(buf+1); // skip period
+	std::map<Ext, Info, NoCaseLess>::const_iterator ci = m_mTable.find(sBuf);
+	if(ci != m_mTable.end()) {
+		return ci->second.enable;
+	}
+	std::set<Ext, NoCaseLess>::const_iterator ciUser = m_sTableUser.find(sBuf);
+	if(ciUser != m_sTableUser.end()) {
+		return true;
+	}
+	return false;
+}
+
+void ExtManager::SetDefault()
+{
+	std::map<Ext, Info, NoCaseLess>::iterator it, itEnd = m_mTable.end();
+	for(it = m_mTable.begin(); it != itEnd; ++it) {
+		it->second.enable = true;
+	}
+}
+
+void ExtManager::Save(const std::string &sIniFileName) const
+{
+	if(m_sTableUser.size()) {
+		const std::string &sResult = GetUserExtensions();
+		WritePrivateProfileString(SECTION_NAME, "user_extensions", sResult.c_str(), sIniFileName.c_str());
+	} else {
+		WritePrivateProfileString(SECTION_NAME, "user_extensions", NULL, sIniFileName.c_str());
+	}
+
+	std::map<Ext, Info, NoCaseLess>::const_iterator ci, ciEnd = m_mTable.end();
+	for(ci = m_mTable.begin(); ci != ciEnd; ++ci) {
+		WritePrivateProfileString(SECTION_NAME, ci->first.c_str(), ci->second.enable ? "1" : "0", sIniFileName.c_str());
+	}
+}
+
+void ExtManager::Load(const std::string &sIniFileName)
+{
+	std::vector<char> vBuf(1024);
+
+	DWORD dwSize;
+	do {
+		vBuf.resize(vBuf.size() * 2);
+		dwSize = GetPrivateProfileString(SECTION_NAME, "user_extensions", DEFAULT_EXTENSIONS, &vBuf[0], vBuf.size(), sIniFileName.c_str());
+	} while(dwSize == vBuf.size() - 1);
+	std::string sResult(&vBuf[0]);
+	SetUserExtensions(sResult);
+
+	std::map<Ext, Info, NoCaseLess>::iterator mi, miEnd = m_mTable.end();
+	for(mi = m_mTable.begin(); mi != miEnd; ++mi) {
+		mi->second.enable = GetPrivateProfileInt(SECTION_NAME, mi->first.c_str(), 1, sIniFileName.c_str()) != 0;
+	}
+}
+
+struct MyConcat2
+{
+	std::string operator()(const std::string &s1, const std::string &s2) const
+	{
+		if(s1 == "")
+			return "*." + s2;
+		return s1 + ";" + "*." + s2;
+	}
+};
+
+void ExtManager::SetPluginInfo(std::vector<std::string> &vsPluginInfo) const
+{
+	std::map<std::string, std::string> mResmap;
+	std::map<Ext, Info, NoCaseLess>::const_iterator ci, ciEnd = m_mTable.end();	
+	for(ci = m_mTable.begin(); ci != ciEnd; ++ci) {
+		if(!ci->second.enable) continue;
+		std::vector<std::string>::const_iterator ci2, ciEnd2 = ci->second.methods.end();
+		for(ci2 = ci->second.methods.begin(); ci2 != ciEnd2; ++ci2) {
+			if(!mResmap[*ci2].empty()) {
+				mResmap[*ci2] += ";";
+			}
+			mResmap[*ci2] += "*.";
+			mResmap[*ci2] += ci->first;
+		}
+	}
+
+	vsPluginInfo.clear();
+	vsPluginInfo.push_back("00AM");
+	vsPluginInfo.push_back("7z extract library v0.7 for 7-zip 4.57+ " RELEASE_STR " (C) Makito Miyano / enhanced by Yak!"); 
+
+	std::map<std::string, std::string>::const_iterator ci2, ciEnd2 = mResmap.end();
+	for(ci2 = mResmap.begin(); ci2 != ciEnd2; ++ci2) {
+		vsPluginInfo.push_back(ci2->second);
+		vsPluginInfo.push_back(ci2->first + " files");
+	}
+	if(m_sTableUser.size()) {
+		vsPluginInfo.push_back(std::accumulate(m_sTableUser.begin(), m_sTableUser.end(), std::string(), MyConcat2()));
+		vsPluginInfo.push_back("User-defined");
+	}
+}
+
+void ExtManager::AddUserExt(const std::string& sExt)
+{
+	m_sTableUser.insert(sExt);
+}
+
+void ExtManager::RemoveUserExt(const std::string& sExt)
+{
+	m_sTableUser.erase(sExt);
+}
+
+struct MyConcat
+{
+	std::string operator()(const std::string &s1, const std::string &s2) const
+	{
+		if(s1 == "") return s2;
+		return s1 + ";" + s2;
+	}
+};
+
+std::string ExtManager::GetUserExtensions() const
+{
+	return std::accumulate(m_sTableUser.begin(), m_sTableUser.end(), std::string(), MyConcat());
+}
+
+void ExtManager::SetUserExtensions(const std::string& sExts)
+{
+	boost::algorithm::split(m_sTableUser, sExts, boost::algorithm::is_any_of(";"), boost::algorithm::token_compress_on);
+	m_sTableUser.erase("");
+}
 
 //ƒOƒ��[ƒoƒ‹•Ï�”
 static InfoCache infocache; //ƒA�[ƒJƒCƒu�î•ñƒLƒƒƒbƒVƒ…ƒNƒ‰ƒX
 static InfoCacheW infocacheW; //ƒA�[ƒJƒCƒu�î•ñƒLƒƒƒbƒVƒ…ƒNƒ‰ƒX
 static std::string g_sIniFileName; // ini ƒtƒ@ƒCƒ‹–¼
-static int s_nEnable7z = 1;
-static int s_nEnableRar = 1;
-static int s_nEnableCbr = 1;
-static int s_nEnableCab = 1;
-static int s_nEnableArj = 1;
-static int s_nEnableLzh = 1;
-static HANDLE s_hInstance;
+static ExtManager g_extManager;
+static bool g_fSharedConf;
+HINSTANCE g_hInstance;
+
+#ifndef _UNICODE
+bool g_IsNT = false;
+static inline bool IsItWindowsNT()
+{
+	OSVERSIONINFO versionInfo;
+	versionInfo.dwOSVersionInfoSize = sizeof(versionInfo);
+	if (!::GetVersionEx(&versionInfo)) 
+		return false;
+	return (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT);
+}
+#endif
 
 void SetParamDefault()
 {
-    s_nEnable7z = 1;
-    s_nEnableRar = 1;
-    s_nEnableCbr = 1;
-    s_nEnableCab = 1;
-    s_nEnableArj = 1;
-    s_nEnableLzh = 1;
+	g_extManager.SetDefault();
+	g_extManager.SetUserExtensions(ExtManager::DEFAULT_EXTENSIONS);
+	g_fSharedConf = false;
 }
 
 std::string GetIniFileName()
 {
-    return g_sIniFileName;
+	return g_sIniFileName;
 }
 
 void LoadFromIni()
 {
-    SetParamDefault();
+	SetParamDefault();
 
-    std::string sIniFileName = GetIniFileName();
+	std::string sIniFileName = GetIniFileName();
 
-    s_nEnable7z = GetPrivateProfileInt("ax7z", "7z", s_nEnable7z, sIniFileName.c_str());
-    s_nEnableRar = GetPrivateProfileInt("ax7z", "rar", s_nEnableRar, sIniFileName.c_str());
-    s_nEnableCbr = GetPrivateProfileInt("ax7z", "cbr", s_nEnableCbr, sIniFileName.c_str());
-    s_nEnableCab = GetPrivateProfileInt("ax7z", "cab", s_nEnableCab, sIniFileName.c_str());
-    s_nEnableArj = GetPrivateProfileInt("ax7z", "arj", s_nEnableArj, sIniFileName.c_str());
-    s_nEnableLzh = GetPrivateProfileInt("ax7z", "lzh", s_nEnableLzh, sIniFileName.c_str());
+	g_extManager.Load(sIniFileName);
+
+	std::vector<char> vBuf(1024);
+
+	DWORD dwSize;
+	do {
+		vBuf.resize(vBuf.size() * 2);
+		dwSize = GetPrivateProfileString(ExtManager::SECTION_NAME, "topmost", "false", &vBuf[0], vBuf.size(), sIniFileName.c_str());
+	} while(dwSize == vBuf.size() - 1);
+	std::string sResult(&vBuf[0]);
+	PasswordManager::Get().SetTopMost(sResult == "true");
+	int nShared = GetPrivateProfileInt(ExtManager::SECTION_NAME, "shared", -1, sIniFileName.c_str());
+	if(nShared != -1) g_fSharedConf = nShared;
 }
 
-void SaveToIni()
+bool SaveToIni()
 {
-    std::string sIniFileName = GetIniFileName();
+	std::string sIniFileName = GetIniFileName();
+
+	g_extManager.Save(sIniFileName);
+
+	int nResult = 1;
+	nResult &= WritePrivateProfileString(ExtManager::SECTION_NAME, "topmost", PasswordManager::Get().GetTopMost() ? "true" : "false", sIniFileName.c_str());
+	if(g_fSharedConf)
+		nResult &= WritePrivateProfileString(ExtManager::SECTION_NAME, "shared", "1", sIniFileName.c_str());
 
-    WritePrivateProfileString("ax7z", "7z", s_nEnable7z ? "1" : "0", sIniFileName.c_str());
-    WritePrivateProfileString("ax7z", "rar", s_nEnableRar ? "1" : "0", sIniFileName.c_str());
-    WritePrivateProfileString("ax7z", "cbr", s_nEnableCbr ? "1" : "0", sIniFileName.c_str());
-    WritePrivateProfileString("ax7z", "cab", s_nEnableCab ? "1" : "0", sIniFileName.c_str());
-    WritePrivateProfileString("ax7z", "arj", s_nEnableArj ? "1" : "0", sIniFileName.c_str());
-    WritePrivateProfileString("ax7z", "lzh", s_nEnableLzh ? "1" : "0", sIniFileName.c_str());
+	return nResult;
+}
+
+std::string GetSharedIniFileName(HANDLE hModule)
+{
+	std::vector<char> vModulePath(1024);
+	size_t nLen = GetModuleFileName((HMODULE)hModule, &vModulePath[0], (DWORD)vModulePath.size());
+	vModulePath.resize(nLen + 1);
+
+	std::string sResult(&vModulePath[0]);
+	sResult += ".ini";
+	return sResult;
+}
+
+void MakePersonalIniFolder()
+{
+	char p[MAX_PATH];
+	SHGetFolderPath(0, CSIDL_APPDATA, 0, SHGFP_TYPE_CURRENT, p);
+	std::string s(p);
+	s += "\\ax7z";
+	CreateDirectory(s.c_str(), 0);
+}
+
+std::string GetPersonalIniFileName(HANDLE hModule)
+{
+	char p[MAX_PATH];
+	SHGetFolderPath(0, CSIDL_APPDATA, 0, SHGFP_TYPE_CURRENT, p);
+	std::string s(p);
+	s += "\\ax7z";
+	std::vector<char> vModulePath(1024);
+	size_t nLen = GetModuleFileName((HMODULE)hModule, &vModulePath[0], (DWORD)vModulePath.size());
+	vModulePath.resize(nLen + 1);
+	std::vector<char>::reverse_iterator it = find(vModulePath.rbegin(), vModulePath.rend(), '\\');
+	s += "\\";
+	s += std::string(&*it.base());
+	s += ".ini";
+	return s;
 }
 
 void SetIniFileName(HANDLE hModule)
 {
-    std::vector<char> vModulePath(1024);
-    size_t nLen = GetModuleFileName((HMODULE)hModule, &vModulePath[0], (DWORD)vModulePath.size());
-    vModulePath.resize(nLen + 1);
-    // –{—ˆ‚Í2ƒoƒCƒg•¶Žš‘Î�ô‚ª•K—v‚¾‚ª�Aƒvƒ‰ƒOƒCƒ“–¼‚É“ú–{Œê‚Í‚È‚¢‚Æ”»’f‚µ‚ÄŽè”²‚«
-    while (!vModulePath.empty() && vModulePath.back() != '\\') {
-        vModulePath.pop_back();
-    }
+	std::string sPersonal(GetPersonalIniFileName(hModule));
+	struct __stat64 st;
+	if(!_stat64(sPersonal.c_str(), &st)) { // If personal ini file found, always used
+		g_sIniFileName = sPersonal;
+		g_fSharedConf = false;
+		return;
+	}
+	std::string sShared(GetSharedIniFileName(hModule));
+	if(!_stat64(sShared.c_str(), &st)) { // Found
+		int nShared = GetPrivateProfileInt(ExtManager::SECTION_NAME, "shared", -1, sShared.c_str());
+		if(nShared == 1) {
+			g_sIniFileName = sShared;
+			g_fSharedConf = true;
+			return;
+		}
+		char buf[1024];
+		wsprintf(buf,
+			"The %s.spi.ini file is found where the %s.spi file exists.\n"
+			"To support multiple users, the default place of the %s.spi.ini file is changed to your AppData folder.\n"
+			"\n"
+			"Do you want to move the %s.spi.ini file to your AppData folder?\n"
+			"If you can not understand what it is, please select NO.",
+			ExtManager::SECTION_NAME, ExtManager::SECTION_NAME, ExtManager::SECTION_NAME, ExtManager::SECTION_NAME);
+		int nRet = MessageBox(NULL, buf,
+			ExtManager::SECTION_NAME, MB_TASKMODAL | MB_ICONWARNING | MB_YESNO);
+		if(nRet == IDNO) {
+			WritePrivateProfileString(ExtManager::SECTION_NAME, "shared", "1", sShared.c_str());
+			g_sIniFileName = sShared;
+			g_fSharedConf = true;
+			return;
+		} else {
+			MakePersonalIniFolder();
+			if(!CopyFile(sShared.c_str(), sPersonal.c_str(), TRUE)) {
+				MessageBox(NULL, "Copy of the ini file is failed. Use the old ini file.", ExtManager::SECTION_NAME, MB_TASKMODAL | MB_ICONWARNING | MB_OK);
+				g_sIniFileName = sShared;
+				g_fSharedConf = true;
+				return;
+			}
+			if(!DeleteFile(sShared.c_str())) {
+				MessageBox(NULL, "Delete of the old ini file is failed. Leave as it is.", ExtManager::SECTION_NAME, MB_TASKMODAL | MB_ICONWARNING | MB_OK);
+			}
+		}
+	}
+	g_sIniFileName = sPersonal;
+	g_fSharedConf = false;
+}
 
-    g_sIniFileName = &vModulePath[0];
-    g_sIniFileName +=".ini";
+void handle_exception(const std::string &s)
+{
+	try {
+		throw;
+	} catch (std::exception &e) {
+		OutputDebugPrintf("%s: exception %s thrown", s.c_str(), e.what());
+	} catch (...) {
+		OutputDebugPrintf("%s: unknown exception thrown", s.c_str());
+	}
 }
 
 /* ƒGƒ“ƒgƒŠƒ|ƒCƒ“ƒg */
 BOOL APIENTRY SpiEntryPoint(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
 {
-    bool bInitPath = false;
-	switch (ul_reason_for_call) {
-		case DLL_PROCESS_ATTACH:
-            CoInitialize(NULL);
-            SetIniFileName(hModule);
-            LoadFromIni();
-            bInitPath = true;
-			break;
-		case DLL_THREAD_ATTACH:
-            CoInitialize(NULL);
-            SetIniFileName(hModule);
-            LoadFromIni();
-            break;
-		case DLL_THREAD_DETACH:
-            CoUninitialize();
-			break;
-		case DLL_PROCESS_DETACH:
-            CoUninitialize();
-			break;
+	try {
+		bool bInitPath = false;
+		switch (ul_reason_for_call) {
+			case DLL_PROCESS_ATTACH:
+#ifndef _UNICODE
+				g_IsNT = IsItWindowsNT();
+#endif
+			{
+				extern void GetFormats(ExtManager::Conf &res);
+				ExtManager::Conf v;
+				GetFormats(v);
+				g_extManager.Init(v);
+			}
+				SetIniFileName(hModule);
+				LoadFromIni();
+				bInitPath = true;
+				break;
+			case DLL_THREAD_ATTACH:
+				SetIniFileName(hModule);
+				LoadFromIni();
+				break;
+			case DLL_THREAD_DETACH:
+				break;
+			case DLL_PROCESS_DETACH:
+				break;
+		}
+	} catch (...) {
+		handle_exception(__FUNCTION__);
+		return FALSE;
 	}
 
 	return TRUE;
@@ -108,15 +451,15 @@
 /* ƒGƒ“ƒgƒŠƒ|ƒCƒ“ƒg */
 BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
 {
-    int a = sizeof(fileInfoW);
+	int a = sizeof(fileInfoW);
 	switch (ul_reason_for_call) {
 		case DLL_PROCESS_DETACH:
 			infocache.Clear();
-            infocacheW.Clear();
+			infocacheW.Clear();
 			break;
 	}
-    s_hInstance = hModule;
-    return SpiEntryPoint(hModule, ul_reason_for_call, lpReserved);
+	g_hInstance = (HINSTANCE)hModule;
+	return SpiEntryPoint(hModule, ul_reason_for_call, lpReserved);
 }
 
 /***************************************************************************
@@ -125,111 +468,70 @@
 //---------------------------------------------------------------------------
 int __stdcall GetPluginInfo(int infono, LPSTR buf, int buflen)
 {
-    std::vector<std::string> vsPluginInfo;
-    vsPluginInfo.push_back("00AM");
-    vsPluginInfo.push_back("7z extract library v0.7 (C) Makito Miyano");
-    if (s_nEnable7z) {
-        vsPluginInfo.push_back("*.7z");
-        vsPluginInfo.push_back("7-zip files");
-    }
-    if (s_nEnableRar) {
-        vsPluginInfo.push_back("*.rar");
-        vsPluginInfo.push_back("Rar files");
-    }
-    if (s_nEnableCbr) {
-        vsPluginInfo.push_back("*.cbr");
-        vsPluginInfo.push_back("Cbr(rar) files");
-    }
-    if (s_nEnableCab) {
-        vsPluginInfo.push_back("*.cab");
-        vsPluginInfo.push_back("Cab files");
-    }
-    if (s_nEnableArj) {
-        vsPluginInfo.push_back("*.arj");
-        vsPluginInfo.push_back("Arj files");
-    }
-    if (s_nEnableLzh) {
-        vsPluginInfo.push_back("*.lzh");
-        vsPluginInfo.push_back("LZH files");
-    }
+	try {
+		std::vector<std::string> vsPluginInfo;
 
-    if (infono < 0 || infono >= (int)vsPluginInfo.size()) {
-		return 0;
-    }
+		g_extManager.SetPluginInfo(vsPluginInfo);
+
+		if (infono < 0 || infono >= (int)vsPluginInfo.size()) {
+			return 0;
+		}
 
-    lstrcpyn(buf, vsPluginInfo[infono].c_str(), buflen);
+		lstrcpyn(buf, vsPluginInfo[infono].c_str(), buflen);
 
-	return lstrlen(buf);
+		return lstrlen(buf);
+	} catch (...) {
+		handle_exception(__FUNCTION__);
+		return 0;
+	}
 }
 
 static bool CheckFileExtension(const char* pFileName, const char* pExtension)
 {
-    int nExtensionLen = strlen(pExtension);
-    int nFileNameLen = strlen(pFileName);
+	int nExtensionLen = strlen(pExtension);
+	int nFileNameLen = strlen(pFileName);
 
-    // ƒsƒŠƒIƒh‚ð“ü‚ê‚Äƒtƒ@ƒCƒ‹–¼–{‘Ì‚ª‘¶�Ý‚·‚é‚©?
-    if (nFileNameLen <= nExtensionLen + 1) {
-        return false;
-    }
+	// ƒsƒŠƒIƒh‚ð“ü‚ê‚Äƒtƒ@ƒCƒ‹–¼–{‘Ì‚ª‘¶�Ý‚·‚é‚©?
+	if (nFileNameLen <= nExtensionLen + 1) {
+		return false;
+	}
 
-    return (strnicmp(pFileName + nFileNameLen - nExtensionLen, pExtension, nExtensionLen) == 0);
+	return (strnicmp(pFileName + nFileNameLen - nExtensionLen, pExtension, nExtensionLen) == 0);
 }
 static bool CheckFileExtensionW(const wchar_t* pFileName, const wchar_t* pExtension)
 {
-    int nExtensionLen = wcslen(pExtension);
-    int nFileNameLen = wcslen(pFileName);
+	int nExtensionLen = wcslen(pExtension);
+	int nFileNameLen = wcslen(pFileName);
 
-    // ƒsƒŠƒIƒh‚ð“ü‚ê‚Äƒtƒ@ƒCƒ‹–¼–{‘Ì‚ª‘¶�Ý‚·‚é‚©?
-    if (nFileNameLen <= nExtensionLen + 1) {
-        return false;
-    }
+	// ƒsƒŠƒIƒh‚ð“ü‚ê‚Äƒtƒ@ƒCƒ‹–¼–{‘Ì‚ª‘¶�Ý‚·‚é‚©?
+	if (nFileNameLen <= nExtensionLen + 1) {
+		return false;
+	}
 
-    return (wcsnicmp(pFileName + nFileNameLen - nExtensionLen, pExtension, nExtensionLen) == 0);
+	return (wcsnicmp(pFileName + nFileNameLen - nExtensionLen, pExtension, nExtensionLen) == 0);
 }
 
 //---------------------------------------------------------------------------
 int __stdcall IsSupported(LPSTR filename, DWORD dw)
 {
-    // Œ»Žž“_‚Å‚Í–¼‘O‚Ì‚Ý‚Å”»’f
-    int nLen = strlen(filename);
-    if (nLen < 4) {
-        // �Å’á‚Å‚à4•¶Žš‚Í•K—v‚È‚Í‚¸ (a.7z‚ª�Å’Z)
-        return 0;
-    }
-
-    if ((s_nEnable7z && CheckFileExtension(filename, "7z"))
-        || (s_nEnableRar && CheckFileExtension(filename, "rar"))
-        || (s_nEnableCbr && CheckFileExtension(filename, "cbr"))
-        || (s_nEnableCab && CheckFileExtension(filename, "cab"))
-        || (s_nEnableLzh && CheckFileExtension(filename, "lzh"))
-        || (s_nEnableArj && CheckFileExtension(filename, "arj"))) {
-        // ƒTƒ|�[ƒg‚µ‚Ä‚¢‚é‚Æ”»’f
-        return 1;
-    }
-
-    return 0;
+	try {
+		// Œ»Žž“_‚Å‚Í–¼‘O‚Ì‚Ý‚Å”»’f
+		return g_extManager.IsEnable(filename);
+	} catch(...) {
+		handle_exception(__FUNCTION__);
+		return 0;
+	}
 }
 
 int __stdcall IsSupportedW(LPWSTR filename, DWORD dw)
 {
-    // Œ»Žž“_‚Å‚Í–¼‘O‚Ì‚Ý‚Å”»’f
-    int nLen = wcslen(filename);
-    if (nLen < 4) {
-        // �Å’á‚Å‚à4•¶Žš‚Í•K—v‚È‚Í‚¸ (a.7z‚ª�Å’Z)
-        return 0;
-    }
-
-    if ((s_nEnable7z && CheckFileExtensionW(filename, L"7z"))
-        || (s_nEnableRar && CheckFileExtensionW(filename, L"rar"))
-        || (s_nEnableCbr && CheckFileExtensionW(filename, L"cbr"))
-        || (s_nEnableCab && CheckFileExtensionW(filename, L"cab"))
-        || (s_nEnableLzh && CheckFileExtensionW(filename, L"lzh"))
-        || (s_nEnableArj && CheckFileExtensionW(filename, L"arj"))) {
-        // ƒTƒ|�[ƒg‚µ‚Ä‚¢‚é‚Æ”»’f
-        return 1;
-    }
-
-    return 0;
+	try {
+		// Œ»Žž“_‚Å‚Í–¼‘O‚Ì‚Ý‚Å”»’f
+		return g_extManager.IsEnable(filename);
+	} catch(...) {
+		handle_exception(__FUNCTION__);
+		return 0;
+	}
 }
 
 //---------------------------------------------------------------------------
@@ -247,32 +549,39 @@
 	//ƒLƒƒƒbƒVƒ…
 	infocache.Add(filename, &hinfo);
 
-    if (phinfo != NULL) {
-        UINT size = LocalSize(hinfo);
-        /* �o—Í—p‚Ìƒ�ƒ‚ƒŠ‚ÌŠ„‚è“–‚Ä */
-        *phinfo = LocalAlloc(LMEM_FIXED, size);
-        if (*phinfo == NULL) {
-            return SPI_NO_MEMORY;
-        }
-
-        memcpy(*phinfo, (void*)hinfo, size);
-    } else {
-        fileInfo *ptmp = (fileInfo *)hinfo;
-        if (pinfo->filename[0] != '\0') {
-            for (;;) {
-                if (ptmp->method[0] == '\0') return SPI_NO_FUNCTION;
-                if (lstrcmpi(ptmp->filename, pinfo->filename) == 0) break;
-                ptmp++;
-            }
-        } else {
-            for (;;) {
-                if (ptmp->method[0] == '\0') return SPI_NO_FUNCTION;
-                if (ptmp->position == pinfo->position) break;
-                ptmp++;
-            }
-        }
-        *pinfo = *ptmp;
-    }
+	if (phinfo != NULL) {
+		UINT size = LocalSize(hinfo);
+		/* �o—Í—p‚Ìƒ�ƒ‚ƒŠ‚ÌŠ„‚è“–‚Ä */
+		*phinfo = LocalAlloc(LMEM_FIXED, size);
+		if (*phinfo == NULL) {
+			return SPI_NO_MEMORY;
+		}
+
+		memcpy(*phinfo, (void*)hinfo, size);
+	} else {
+		fileInfo *ptmp = (fileInfo *)hinfo;
+		if (pinfo->filename[0] != '\0') {
+			for (;;) {
+				if (ptmp->method[0] == '\0') return SPI_NO_FUNCTION;
+				// complete path relative to archive root
+				char path[sizeof(ptmp->path)+sizeof(ptmp->filename)];
+				strcpy(path, ptmp->path);
+				size_t len = strlen(path);
+				if(len && path[len-1] != '/' && path[len-1] != '\\') // need delimiter
+					strcat(path, "\\");
+				strcat(path, ptmp->filename);
+				if (lstrcmpi(path, pinfo->filename) == 0) break;
+				ptmp++;
+			}
+		} else {
+			for (;;) {
+				if (ptmp->method[0] == '\0') return SPI_NO_FUNCTION;
+				if (ptmp->position == pinfo->position) break;
+				ptmp++;
+			}
+		}
+		*pinfo = *ptmp;
+	}
 	return SPI_ALL_RIGHT;
 }
 int GetArchiveInfoCacheW(wchar_t *filename, long len, HLOCAL *phinfo, fileInfoW *pinfo)
@@ -288,229 +597,389 @@
 	//ƒLƒƒƒbƒVƒ…
 	infocacheW.Add(filename, &hinfo);
 
-    if (phinfo != NULL) {
-        UINT size = LocalSize(hinfo);
-        /* �o—Í—p‚Ìƒ�ƒ‚ƒŠ‚ÌŠ„‚è“–‚Ä */
-        *phinfo = LocalAlloc(LMEM_FIXED, size);
-        if (*phinfo == NULL) {
-            return SPI_NO_MEMORY;
-        }
-
-        memcpy(*phinfo, (void*)hinfo, size);
-    } else {
-        fileInfoW *ptmp = (fileInfoW *)hinfo;
-        if (pinfo->filename[0] != L'\0') {
-            for (;;) {
-                if (ptmp->method[0] == '\0') return SPI_NO_FUNCTION;
-                if (wcsicmp(ptmp->filename, pinfo->filename) == 0) break;
-                ptmp++;
-            }
-        } else {
-            for (;;) {
-                if (ptmp->method[0] == '\0') return SPI_NO_FUNCTION;
-                if (ptmp->position == pinfo->position) break;
-                ptmp++;
-            }
-        }
-        *pinfo = *ptmp;
-    }
+	if (phinfo != NULL) {
+		UINT size = LocalSize(hinfo);
+		/* �o—Í—p‚Ìƒ�ƒ‚ƒŠ‚ÌŠ„‚è“–‚Ä */
+		*phinfo = LocalAlloc(LMEM_FIXED, size);
+		if (*phinfo == NULL) {
+			return SPI_NO_MEMORY;
+		}
+
+		memcpy(*phinfo, (void*)hinfo, size);
+	} else {
+		fileInfoW *ptmp = (fileInfoW *)hinfo;
+		if (pinfo->filename[0] != L'\0') {
+			for (;;) {
+				if (ptmp->method[0] == '\0') return SPI_NO_FUNCTION;
+				// complete path relative to archive root
+				wchar_t path[sizeof(ptmp->path)+sizeof(ptmp->filename)];
+				wcscpy(path, ptmp->path);
+				size_t len = wcslen(path);
+				if(len && path[len-1] != L'/' && path[len-1] != L'\\') // need delimiter
+					wcscat(path, L"\\");
+				wcscat(path, ptmp->filename);
+				if (wcsicmp(path, pinfo->filename) == 0) break;
+				ptmp++;
+			}
+		} else {
+			for (;;) {
+				if (ptmp->method[0] == '\0') return SPI_NO_FUNCTION;
+				if (ptmp->position == pinfo->position) break;
+				ptmp++;
+			}
+		}
+		*pinfo = *ptmp;
+	}
 	return SPI_ALL_RIGHT;
 }
 //---------------------------------------------------------------------------
 int __stdcall GetArchiveInfo(LPSTR buf, long len, unsigned int flag, HLOCAL *lphInf)
 {
-	//ƒ�ƒ‚ƒŠ“ü—Í‚É‚Í‘Î‰ž‚µ‚È‚¢
-	if ((flag & 7) != 0) return SPI_NO_FUNCTION;
-
-	*lphInf = NULL;
-	return GetArchiveInfoCache(buf, len, lphInf, NULL);
+	try {
+		//ƒ�ƒ‚ƒŠ“ü—Í‚É‚Í‘Î‰ž‚µ‚È‚¢
+		if ((flag & 7) != 0) return SPI_NO_FUNCTION;
+
+		*lphInf = NULL;
+		return GetArchiveInfoCache(buf, len, lphInf, NULL);
+	} catch(...) {
+		handle_exception(__FUNCTION__);
+		return SPI_OTHER_ERROR;
+	}
 }
 int __stdcall GetArchiveInfoW(LPWSTR buf, long len, unsigned int flag, HLOCAL *lphInf)
 {
-	//ƒ�ƒ‚ƒŠ“ü—Í‚É‚Í‘Î‰ž‚µ‚È‚¢
-	if ((flag & 7) != 0) return SPI_NO_FUNCTION;
-
-	*lphInf = NULL;
-	return GetArchiveInfoCacheW(buf, len, lphInf, NULL);
+	try {
+		//ƒ�ƒ‚ƒŠ“ü—Í‚É‚Í‘Î‰ž‚µ‚È‚¢
+		if ((flag & 7) != 0) return SPI_NO_FUNCTION;
+
+		*lphInf = NULL;
+		return GetArchiveInfoCacheW(buf, len, lphInf, NULL);
+	} catch(...) {
+		handle_exception(__FUNCTION__);
+		return SPI_OTHER_ERROR;
+	}
 }
 
 //---------------------------------------------------------------------------
 int __stdcall GetFileInfo
 (LPSTR buf, long len, LPSTR filename, unsigned int flag, struct fileInfo *lpInfo)
 {
-	//ƒ�ƒ‚ƒŠ“ü—Í‚É‚Í‘Î‰ž‚µ‚È‚¢
-	if ((flag & 7) != 0) return SPI_NO_FUNCTION;
-
-	lstrcpy(lpInfo->filename, filename);
-
-	return GetArchiveInfoCache(buf, len, NULL, lpInfo);
+	try {
+		//ƒ�ƒ‚ƒŠ“ü—Í‚É‚Í‘Î‰ž‚µ‚È‚¢
+		if ((flag & 7) != 0) return SPI_NO_FUNCTION;
+
+		lstrcpy(lpInfo->filename, filename);
+
+		return GetArchiveInfoCache(buf, len, NULL, lpInfo);
+	} catch(...) {
+		handle_exception(__FUNCTION__);
+		return SPI_OTHER_ERROR;
+	}
 }
+
 int __stdcall GetFileInfoW
 (LPWSTR buf, long len, LPWSTR filename, unsigned int flag, struct fileInfoW *lpInfo)
 {
-	//ƒ�ƒ‚ƒŠ“ü—Í‚É‚Í‘Î‰ž‚µ‚È‚¢
-	if ((flag & 7) != 0) return SPI_NO_FUNCTION;
-
-	wcscpy(lpInfo->filename, filename);
-
-	return GetArchiveInfoCacheW(buf, len, NULL, lpInfo);
+	try {
+		//ƒ�ƒ‚ƒŠ“ü—Í‚É‚Í‘Î‰ž‚µ‚È‚¢
+		if ((flag & 7) != 0) return SPI_NO_FUNCTION;
+
+		wcscpy(lpInfo->filename, filename);
+
+		return GetArchiveInfoCacheW(buf, len, NULL, lpInfo);
+	} catch(...) {
+		handle_exception(__FUNCTION__);
+		return SPI_OTHER_ERROR;
+	}
 }
 //---------------------------------------------------------------------------
 int __stdcall GetFile(LPSTR src, long len,
 			   LPSTR dest, unsigned int flag,
 			   SPI_PROGRESS lpPrgressCallback, long lData)
 {
-	//ƒ�ƒ‚ƒŠ“ü—Í‚É‚Í‘Î‰ž‚µ‚È‚¢
-	if ((flag & 7) != 0) return SPI_NO_FUNCTION;
-
-	fileInfo info;
-	info.filename[0] = '\0';
-	info.position = len;
-	int ret = GetArchiveInfoCache(src, 0, NULL, &info);
-    if (ret != SPI_ALL_RIGHT) {
-        CoUninitialize();
-        return ret;
-    }
-
-    int nRet;
-    if ((flag & 0x700) == 0) {
-    	//ƒtƒ@ƒCƒ‹‚Ö‚Ì�o—Í‚Ì�ê�‡
-        std::string s = dest;
-        s += "\\";
-        s += info.filename;
-        nRet = GetFileEx(src, NULL, s.c_str(), &info, lpPrgressCallback, lData);
-    } else {
-        // ƒ�ƒ‚ƒŠ‚Ö‚Ì�o—Í‚Ì�ê�‡
-    	nRet = GetFileEx(src, (HLOCAL *)dest, NULL, &info, lpPrgressCallback, lData);
-    }
-    return nRet;
+	try {
+		//ƒ�ƒ‚ƒŠ“ü—Í‚É‚Í‘Î‰ž‚µ‚È‚¢
+		if ((flag & 7) != 0) return SPI_NO_FUNCTION;
+
+		fileInfo info;
+		info.filename[0] = '\0';
+		info.position = len;
+		int ret = GetArchiveInfoCache(src, 0, NULL, &info);
+		if (ret != SPI_ALL_RIGHT) {
+			return ret;
+		}
+
+		int nRet;
+		if ((flag & 0x700) == 0) {
+			//ƒtƒ@ƒCƒ‹‚Ö‚Ì�o—Í‚Ì�ê�‡
+			std::string s = dest;
+			s += "\\";
+			s += info.filename;
+			nRet = GetFileEx(src, NULL, s.c_str(), &info, lpPrgressCallback, lData);
+		} else {
+			// ƒ�ƒ‚ƒŠ‚Ö‚Ì�o—Í‚Ì�ê�‡
+			nRet = GetFileEx(src, (HLOCAL *)dest, NULL, &info, lpPrgressCallback, lData);
+		}
+		return nRet;
+	} catch(...) {
+		handle_exception(__FUNCTION__);
+		return SPI_OTHER_ERROR;
+	}
 }
 int __stdcall GetFileW(LPWSTR src, long len,
 			   LPWSTR dest, unsigned int flag,
 			   SPI_PROGRESS lpPrgressCallback, long lData)
 {
-	//ƒ�ƒ‚ƒŠ“ü—Í‚É‚Í‘Î‰ž‚µ‚È‚¢
-	if ((flag & 7) != 0) return SPI_NO_FUNCTION;
+	try {
+		//ƒ�ƒ‚ƒŠ“ü—Í‚É‚Í‘Î‰ž‚µ‚È‚¢
+		if ((flag & 7) != 0) return SPI_NO_FUNCTION;
+
+		fileInfoW info;
+		info.filename[0] = L'\0';
+		info.position = len;
+		int ret = GetArchiveInfoCacheW(src, 0, NULL, &info);
+		if (ret != SPI_ALL_RIGHT) {
+			return ret;
+		}
+
+		int nRet;
+		if ((flag & 0x700) == 0) {
+			//ƒtƒ@ƒCƒ‹‚Ö‚Ì�o—Í‚Ì�ê�‡
+			std::wstring s = dest;
+			s += L"\\";
+			s += info.filename;
+			nRet = GetFileWEx(src, NULL, s.c_str(), &info, lpPrgressCallback, lData);
+		} else {
+			// ƒ�ƒ‚ƒŠ‚Ö‚Ì�o—Í‚Ì�ê�‡
+			nRet = GetFileWEx(src, (HLOCAL *)dest, NULL, &info, lpPrgressCallback, lData);
+		}
+		return nRet;
+	} catch(...) {
+		handle_exception(__FUNCTION__);
+		return SPI_OTHER_ERROR;
+	}
+}
 
-	fileInfoW info;
-	info.filename[0] = L'\0';
-	info.position = len;
-	int ret = GetArchiveInfoCacheW(src, 0, NULL, &info);
-    if (ret != SPI_ALL_RIGHT) {
-        CoUninitialize();
-        return ret;
-    }
-
-    int nRet;
-    if ((flag & 0x700) == 0) {
-    	//ƒtƒ@ƒCƒ‹‚Ö‚Ì�o—Í‚Ì�ê�‡
-        std::wstring s = dest;
-        s += L"\\";
-        s += info.filename;
-        nRet = GetFileWEx(src, NULL, s.c_str(), &info, lpPrgressCallback, lData);
-    } else {
-        // ƒ�ƒ‚ƒŠ‚Ö‚Ì�o—Í‚Ì�ê�‡
-    	nRet = GetFileWEx(src, (HLOCAL *)dest, NULL, &info, lpPrgressCallback, lData);
-    }
-    return nRet;
+static std::string Get7zPath(HKEY hkParent)
+{
+	HKEY hkey;
+	if(RegOpenKey(hkParent, "Software\\7-zip", &hkey) == ERROR_SUCCESS) {
+		std::vector<BYTE> buf(4096);
+		DWORD dwSize = buf.size();
+		if(RegQueryValueEx(hkey, "Path", 0, 0, &buf[0], &dwSize) == ERROR_SUCCESS) {
+			buf.resize(dwSize ? dwSize - 1 : 0);
+			return std::string(buf.begin(), buf.end());
+		}
+	}
+	return std::string();
+}
+
+static HINSTANCE LoadLibrary7z()
+{
+	HINSTANCE h = LoadLibrary("7z.dll");
+	if(h) return h;
+	std::string s = Get7zPath(HKEY_CURRENT_USER) + "7z.dll";
+	h = LoadLibrary(s.c_str());
+	if(h) return h;
+	s = Get7zPath(HKEY_LOCAL_MACHINE) + "7z.dll";
+	h = LoadLibrary(s.c_str());
+	return h;
+}
+
+static std::string Find7zPath()
+{
+	HINSTANCE h = LoadLibrary7z();
+	if(!h) return std::string();
+	std::string s(4096, '\0');
+	DWORD dwLen = GetModuleFileName(h, &s[0], s.size());
+	s.resize(dwLen);
+	FreeLibrary(h);
+	return s;
 }
 //---------------------------------------------------------------------------
 LRESULT CALLBACK AboutDlgProc(HWND hDlgWnd, UINT msg, WPARAM wp, LPARAM lp)
 {
-    switch (msg) {
-        case WM_INITDIALOG:
-            return FALSE;
-        case WM_COMMAND:
-            switch (LOWORD(wp)) {
-                case IDOK:
-                    EndDialog(hDlgWnd, IDOK);
-                    break;
-                case IDCANCEL:
-                    EndDialog(hDlgWnd, IDCANCEL);
-                    break;
-                default:
-                    return FALSE;
-            }
-        default:
-            return FALSE;
-    }
-    return TRUE;
+	try {
+		switch (msg) {
+			case WM_INITDIALOG:
+			{
+OutputDebugPrintf("AboutDlgProc: 7z DLL path %s", Find7zPath().c_str());
+				yak::util::windows::VersionResource vr(Find7zPath().c_str());
+				std::string s = vr.GetValue(yak::util::windows::VersionResource::FILE_VERSION);
+OutputDebugPrintf("AboutDlgProc: 7z DLL version %s", s.c_str());
+				SendDlgItemMessage(hDlgWnd, IDC_7ZVERSION, WM_SETTEXT, 0, (LPARAM)s.c_str());
+				return FALSE;
+			}
+			case WM_COMMAND:
+				switch (LOWORD(wp)) {
+					case IDOK:
+						EndDialog(hDlgWnd, IDOK);
+						break;
+					case IDCANCEL:
+						EndDialog(hDlgWnd, IDCANCEL);
+						break;
+					default:
+						return FALSE;
+				}
+			default:
+				return FALSE;
+		}
+		return TRUE;
+	} catch(...) {
+		handle_exception(__FUNCTION__);
+		return SPI_OTHER_ERROR;
+	}
 }
 
+//---------------------------------------------------------------------------
+struct MyConcat3
+{
+	std::string operator()(const std::string &s1, const std::string &s2) const
+	{
+		if(s1 == "") return s2;
+		return s1 + ", " + s2;
+	}
+};
+
+struct ListUpdater
+{
+	ListUpdater(HWND hwnd, std::vector<std::string> &v) : hwnd(hwnd), v(v) {}
+	HWND hwnd;
+	std::vector<std::string> &v;
+	void operator()(const ExtManager::EachValueType& value)
+	{
+		std::string sLine("*.");
+		sLine += value.first;
+		if(value.first.size() < 8)
+			sLine += std::string(8 - value.first.size(), ' ');
+		sLine += std::accumulate(value.second.methods.begin(), value.second.methods.end(), std::string(), MyConcat3());
+		LRESULT lResult = SendMessage(hwnd, LB_ADDSTRING, 0, reinterpret_cast<LPARAM>(static_cast<const void*>(sLine.c_str())));
+		v.push_back(value.first);
+		SendMessage(hwnd, LB_SETSEL, value.second.enable, lResult);
+	}
+};
+
 void UpdateDialogItem(HWND hDlgWnd)
 {
-    std::ostringstream ost;
-    SendMessage(GetDlgItem(hDlgWnd, IDC_7Z_CHECK), BM_SETCHECK, (WPARAM)s_nEnable7z, 0L);
-    SendMessage(GetDlgItem(hDlgWnd, IDC_RAR_CHECK), BM_SETCHECK, (WPARAM)s_nEnableRar, 0L);
-    SendMessage(GetDlgItem(hDlgWnd, IDC_CBR_CHECK), BM_SETCHECK, (WPARAM)s_nEnableCbr, 0L);
-    SendMessage(GetDlgItem(hDlgWnd, IDC_CAB_CHECK), BM_SETCHECK, (WPARAM)s_nEnableCab, 0L);
-    SendMessage(GetDlgItem(hDlgWnd, IDC_ARJ_CHECK), BM_SETCHECK, (WPARAM)s_nEnableArj, 0L);
-    SendMessage(GetDlgItem(hDlgWnd, IDC_LZH_CHECK), BM_SETCHECK, (WPARAM)s_nEnableLzh, 0L);
-}
-
-int IsChecked(HWND hDlgWnd, int nID)
-{
-    if (IsDlgButtonChecked(hDlgWnd, nID) == BST_CHECKED) {
-        return 1;
-    } else {
-        return 0;
-    }
+	std::vector<std::string> *pvMap = static_cast<std::vector<std::string>*>(reinterpret_cast<void*>(GetWindowLongPtr(hDlgWnd, DWLP_USER)));
+
+	pvMap->clear();
+	SendDlgItemMessage(hDlgWnd, IDC_EXTENSION_LIST, LB_RESETCONTENT, 0L, 0L);
+
+	g_extManager.Each(ListUpdater(GetDlgItem(hDlgWnd, IDC_EXTENSION_LIST), *pvMap));
+	SendDlgItemMessage(hDlgWnd, IDC_EXTENSION_LIST, LB_SETCARETINDEX, 0, 0);
+
+	SendDlgItemMessage(hDlgWnd, IDC_EXTENSION_EDIT, WM_SETTEXT, 0, reinterpret_cast<LPARAM>(static_cast<const void*>(g_extManager.GetUserExtensions().c_str())));
+
+	SendDlgItemMessage(hDlgWnd, IDC_TOPMOST_CHECK, BM_SETCHECK, PasswordManager::Get().GetTopMost() ? BST_CHECKED : BST_UNCHECKED, 0);
+
+	SendDlgItemMessage(hDlgWnd, IDC_PERUSERCONF_CHECK, BM_SETCHECK, !g_fSharedConf ? BST_CHECKED : BST_UNCHECKED, 0);
 }
 
 bool UpdateValue(HWND hDlgWnd)
 {
-    s_nEnable7z = IsChecked(hDlgWnd, IDC_7Z_CHECK);
-    s_nEnableRar = IsChecked(hDlgWnd, IDC_RAR_CHECK);
-    s_nEnableCbr = IsChecked(hDlgWnd, IDC_CBR_CHECK);
-    s_nEnableCab = IsChecked(hDlgWnd, IDC_CAB_CHECK);
-    s_nEnableArj = IsChecked(hDlgWnd, IDC_ARJ_CHECK);
-    s_nEnableLzh = IsChecked(hDlgWnd, IDC_LZH_CHECK);
+	std::vector<std::string> *pvMap = static_cast<std::vector<std::string>*>(reinterpret_cast<void*>(GetWindowLongPtr(hDlgWnd, DWLP_USER)));
+
+	int nNum = pvMap->size();
+	for(int i = 0; i < nNum; ++i) {
+		g_extManager.SetEnable((*pvMap)[i], SendDlgItemMessage(hDlgWnd, IDC_EXTENSION_LIST, LB_GETSEL, i, 0) > 0);
+	}
 
-    return true;
+	LRESULT lLen = SendDlgItemMessage(hDlgWnd, IDC_EXTENSION_EDIT, WM_GETTEXTLENGTH, 0, 0);
+	std::vector<char> vBuf(lLen+1);
+	SendDlgItemMessage(hDlgWnd, IDC_EXTENSION_EDIT, WM_GETTEXT, lLen+1, reinterpret_cast<LPARAM>(&vBuf[0]));
+	g_extManager.SetUserExtensions(&vBuf[0]);
+
+	PasswordManager::Get().SetTopMost(SendDlgItemMessage(hDlgWnd, IDC_TOPMOST_CHECK, BM_GETCHECK, 0, 0) == BST_CHECKED);
+
+	bool fSharedConf = g_fSharedConf;
+	std::string sIniFileName = g_sIniFileName;
+	if(SendDlgItemMessage(hDlgWnd, IDC_PERUSERCONF_CHECK, BM_GETCHECK, 0, 0) == BST_CHECKED) {
+		g_fSharedConf = false;
+		g_sIniFileName = GetPersonalIniFileName(g_hInstance);
+		MakePersonalIniFolder();
+	} else {
+		g_fSharedConf = true;
+		g_sIniFileName = GetSharedIniFileName(g_hInstance);
+	}
+	if(fSharedConf != g_fSharedConf) {
+		if(SaveToIni()) {
+			DeleteFile(sIniFileName.c_str());
+		} else {
+			MessageBox(NULL, "Writing ini file is failed. Keep the old ini file location.", ExtManager::SECTION_NAME, MB_TASKMODAL | MB_ICONWARNING | MB_OK);
+			g_fSharedConf = fSharedConf;
+			g_sIniFileName = sIniFileName;
+		}
+	}
+
+	return true;
 }
 
 LRESULT CALLBACK ConfigDlgProc(HWND hDlgWnd, UINT msg, WPARAM wp, LPARAM lp)
 {
-    switch (msg) {
-        case WM_INITDIALOG:
-            UpdateDialogItem(hDlgWnd);
-            return TRUE;
-        case WM_COMMAND:
-            switch (LOWORD(wp)) {
-                case IDOK:
-                    if (UpdateValue(hDlgWnd)) {
-                        SaveToIni();
-                        EndDialog(hDlgWnd, IDOK);
-                    }
-                    break;
-                case IDCANCEL:
-                    EndDialog(hDlgWnd, IDCANCEL);
-                    break;
-                case IDC_DEFAULT_BUTTON:
-                    SetParamDefault();
-                    UpdateDialogItem(hDlgWnd);
-                    break;
-                default:
-                    return FALSE;
-            }
-        default:
-            return FALSE;
-    }
-    return TRUE;
+	try {
+		switch (msg) {
+			case WM_INITDIALOG:
+				SetWindowLongPtr(hDlgWnd, DWLP_USER, lp);
+				UpdateDialogItem(hDlgWnd);
+				return TRUE;
+			case WM_COMMAND:
+				switch (LOWORD(wp)) {
+					case IDOK:
+						if (UpdateValue(hDlgWnd)) {
+							SaveToIni();
+							EndDialog(hDlgWnd, IDOK);
+						}
+						break;
+					case IDCANCEL:
+						EndDialog(hDlgWnd, IDCANCEL);
+						break;
+					case IDC_DEFAULT_BUTTON:
+						SetParamDefault();
+						UpdateDialogItem(hDlgWnd);
+						break;
+					case IDC_SELECT_ALL_BUTTON:
+						SendDlgItemMessage(hDlgWnd, IDC_EXTENSION_LIST, LB_SELITEMRANGE, TRUE, MAKELPARAM(0, 0xFFFFU));
+						break;
+					case IDC_UNSELECT_ALL_BUTTON:
+						SendDlgItemMessage(hDlgWnd, IDC_EXTENSION_LIST, LB_SELITEMRANGE, FALSE, MAKELPARAM(0, 0xFFFFU));
+						break;
+					default:
+						return FALSE;
+				}
+			default:
+				return FALSE;
+		}
+		return TRUE;
+	} catch(...) {
+		handle_exception(__FUNCTION__);
+		return SPI_OTHER_ERROR;
+	}
 }
 
 int __stdcall ConfigurationDlg(HWND parent, int fnc)
 {
-    if (fnc == 0) {
-        //about
-        DialogBox((HINSTANCE)s_hInstance, MAKEINTRESOURCE(IDD_ABOUT_DIALOG), parent, (DLGPROC)AboutDlgProc);
-    } else {
-        DialogBox((HINSTANCE)s_hInstance, MAKEINTRESOURCE(IDD_CONFIG_DIALOG), parent, (DLGPROC)ConfigDlgProc);
-    }
-    return 0;
+	try {
+		if (fnc == 0) {
+			//about
+			DialogBox((HINSTANCE)g_hInstance, MAKEINTRESOURCE(IDD_ABOUT_DIALOG), parent, (DLGPROC)AboutDlgProc);
+		} else {
+			std::vector<std::string> vMap;
+			DialogBoxParam((HINSTANCE)g_hInstance, MAKEINTRESOURCE(IDD_CONFIG_DIALOG), parent, (DLGPROC)ConfigDlgProc, reinterpret_cast<LPARAM>(static_cast<void*>(&vMap)));
+		}
+		return 0;
+	} catch(...) {
+		handle_exception(__FUNCTION__);
+		return 0;
+	}
 }
 
 int __stdcall ExtractSolidArchive(LPCWSTR filename, SPI_OnWriteCallback pCallback)
 {
-    return ExtractSolidArchiveEx(filename, pCallback);
+	try {
+		return ExtractSolidArchiveEx(filename, pCallback);
+	} catch(...) {
+		handle_exception(__FUNCTION__);
+		return SPI_OTHER_ERROR;
+	}
 }
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/entryFuncs.h ./entryFuncs.h
--- /var/tmp/ax7z_src-orig/entryFuncs.h	2005-09-26 00:32:06.000000000 +0900
+++ ./entryFuncs.h	2013-08-24 11:36:30.042761100 +0900
@@ -1,7 +1,9 @@
 #ifndef spi00am_h
 #define spi00am_h
 
+#define NOMINMAX
 #include <windows.h>
+#undef NOMINMAX
 
 /*-------------------------------------------------------------------------*/
 // ƒtƒ@ƒCƒ‹�î•ñ�\‘¢‘Ì
@@ -51,7 +53,9 @@
 /*-------------------------------------------------------------------------*/
 // '00AM'ŠÖ�”‚Ìƒvƒ�ƒgƒ^ƒCƒv�éŒ¾
 /*-------------------------------------------------------------------------*/
-typedef int (CALLBACK *SPI_PROGRESS)(int, int, long);
+// Wrong calling convention
+typedef int (PASCAL *SPI_PROGRESS)(int nNum,int nDenom,long lData);
+//typedef int (CALLBACK *SPI_PROGRESS)(int, int, long);
 typedef void (CALLBACK *SPI_OnWriteCallback)(const void *data, UINT32 size, UINT32 processed, const fileInfoW* pFileInfo, UCHAR* pbStop);
 extern "C" {
 	int __declspec(dllexport) __stdcall GetPluginInfo
@@ -72,8 +76,8 @@
 	int __declspec(dllexport) __stdcall GetFileW(LPWSTR src,long len,
 			   LPWSTR dest, unsigned int flag,
 			   SPI_PROGRESS prgressCallback, long lData);
-    int __declspec(dllexport) __stdcall ConfigurationDlg(HWND parent, int fnc);
-    int __declspec(dllexport) __stdcall ExtractSolidArchive(LPCWSTR filename, SPI_OnWriteCallback pCallback);
+	int __declspec(dllexport) __stdcall ConfigurationDlg(HWND parent, int fnc);
+	int __declspec(dllexport) __stdcall ExtractSolidArchive(LPCWSTR filename, SPI_OnWriteCallback pCallback);
 }
 
 int GetArchiveInfoEx(LPSTR filename, long len, HLOCAL *lphInf);
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/infcache.cpp ./infcache.cpp
--- /var/tmp/ax7z_src-orig/infcache.cpp	2005-06-28 18:36:54.000000000 +0900
+++ ./infcache.cpp	2013-08-24 11:36:30.042761100 +0900
@@ -64,8 +64,8 @@
 //ƒLƒƒƒbƒVƒ…‚É‚ ‚ê‚ÎƒRƒs�[
 //ph:ƒA�[ƒJƒCƒu�î•ñ‚ðŽó‚¯Žæ‚éƒnƒ“ƒhƒ‹‚Ö‚Ìƒ|ƒCƒ“ƒ^
 //pinfo:ƒA�[ƒJƒCƒu‚Ìƒtƒ@ƒCƒ‹�î•ñ‚ðŽó‚¯Žæ‚éƒ|ƒCƒ“ƒ^
-//      ‚ ‚ç‚©‚¶‚ß pinfo ‚É filename ‚© position ‚ðƒZƒbƒg‚µ‚Ä‚¨‚­�B
-//      ƒLƒƒƒbƒVƒ…‚ª‚ ‚ê‚Î filename(position) ‚Ìˆê’v‚·‚é�î•ñ‚ð•Ô‚·�B
+//		‚ ‚ç‚©‚¶‚ß pinfo ‚É filename ‚© position ‚ðƒZƒbƒg‚µ‚Ä‚¨‚­�B
+//		ƒLƒƒƒbƒVƒ…‚ª‚ ‚ê‚Î filename(position) ‚Ìˆê’v‚·‚é�î•ñ‚ð•Ô‚·�B
 //ƒLƒƒƒbƒVƒ…‚É‚È‚¯‚ê‚Î�ASPI_NO_FUNCTION ‚ª•Ô‚é�B
 //ƒLƒƒƒbƒVƒ…‚É‚ ‚ê‚Î SPI_ALL_RIGHT ‚ª•Ô‚é�B
 //ƒA�[ƒJƒCƒu�î•ñ‚ÍƒLƒƒƒbƒVƒ…‚É‚ ‚é‚ª�Afilename(position) ‚ªˆê’v‚µ‚È‚¢�ê�‡‚Í
@@ -95,7 +95,14 @@
 					ret = SPI_NOT_SUPPORT;
 					break;
 				}
-				if (lstrcmpi(ptmp->filename, pinfo->filename) == 0) break;
+				// complete path relative to archive root
+				char path[sizeof(ptmp->path)+sizeof(ptmp->filename)];
+				strcpy(path, ptmp->path);
+				size_t len = strlen(path);
+				if(len && path[len-1] != '/' && path[len-1] != '\\') // need delimiter
+					strcat(path, "\\");
+				strcat(path, ptmp->filename);
+				if (lstrcmpi(path, pinfo->filename) == 0) break;
 				ptmp++;
 			}
 		} else {
@@ -185,8 +192,8 @@
 //ƒLƒƒƒbƒVƒ…‚É‚ ‚ê‚ÎƒRƒs�[
 //ph:ƒA�[ƒJƒCƒu�î•ñ‚ðŽó‚¯Žæ‚éƒnƒ“ƒhƒ‹‚Ö‚Ìƒ|ƒCƒ“ƒ^
 //pinfo:ƒA�[ƒJƒCƒu‚Ìƒtƒ@ƒCƒ‹�î•ñ‚ðŽó‚¯Žæ‚éƒ|ƒCƒ“ƒ^
-//      ‚ ‚ç‚©‚¶‚ß pinfo ‚É filename ‚© position ‚ðƒZƒbƒg‚µ‚Ä‚¨‚­�B
-//      ƒLƒƒƒbƒVƒ…‚ª‚ ‚ê‚Î filename(position) ‚Ìˆê’v‚·‚é�î•ñ‚ð•Ô‚·�B
+//		‚ ‚ç‚©‚¶‚ß pinfo ‚É filename ‚© position ‚ðƒZƒbƒg‚µ‚Ä‚¨‚­�B
+//		ƒLƒƒƒbƒVƒ…‚ª‚ ‚ê‚Î filename(position) ‚Ìˆê’v‚·‚é�î•ñ‚ð•Ô‚·�B
 //ƒLƒƒƒbƒVƒ…‚É‚È‚¯‚ê‚Î�ASPI_NO_FUNCTION ‚ª•Ô‚é�B
 //ƒLƒƒƒbƒVƒ…‚É‚ ‚ê‚Î SPI_ALL_RIGHT ‚ª•Ô‚é�B
 //ƒA�[ƒJƒCƒu�î•ñ‚ÍƒLƒƒƒbƒVƒ…‚É‚ ‚é‚ª�Afilename(position) ‚ªˆê’v‚µ‚È‚¢�ê�‡‚Í
@@ -197,43 +204,50 @@
 	HLOCAL hinfo;
 	int ret = GetCache(filepath, &hinfo);
 
-    if (ret) {
-        ret = SPI_ALL_RIGHT;
-        if (ph != NULL) {
-            UINT size = LocalSize(hinfo);
-            /* �o—Í—p‚Ìƒ�ƒ‚ƒŠ‚ÌŠ„‚è“–‚Ä */
-            *ph = LocalAlloc(LMEM_FIXED, size);
-            if (*ph == NULL) {
-                ret = SPI_NO_MEMORY;
-            } else {
-                memcpy(*ph, (void*)hinfo, size);
-            }
-        } else {
-            fileInfoW *ptmp = (fileInfoW *)hinfo;
-            if (pinfo->filename[0] != L'\0') {
-                for (;;) {
-                    if (ptmp->method[0] == '\0') {
-                        ret = SPI_NOT_SUPPORT;
-                        break;
-                    }
-                    if (wcsicmp(ptmp->filename, pinfo->filename) == 0) break;
-                    ptmp++;
-                }
-            } else {
-                for (;;) {
-                    if (ptmp->method[0] == '\0') {
-                        ret = SPI_NOT_SUPPORT;
-                        break;
-                    }
-                    if (ptmp->position == pinfo->position) break;
-                    ptmp++;
-                }
-            }
-            if (ret == SPI_ALL_RIGHT) *pinfo = *ptmp;
-        }
-    } else {
-        ret = SPI_NO_FUNCTION;
-    }
+	if (ret) {
+		ret = SPI_ALL_RIGHT;
+		if (ph != NULL) {
+			UINT size = LocalSize(hinfo);
+			/* �o—Í—p‚Ìƒ�ƒ‚ƒŠ‚ÌŠ„‚è“–‚Ä */
+			*ph = LocalAlloc(LMEM_FIXED, size);
+			if (*ph == NULL) {
+				ret = SPI_NO_MEMORY;
+			} else {
+				memcpy(*ph, (void*)hinfo, size);
+			}
+		} else {
+			fileInfoW *ptmp = (fileInfoW *)hinfo;
+			if (pinfo->filename[0] != L'\0') {
+				for (;;) {
+					if (ptmp->method[0] == '\0') {
+						ret = SPI_NOT_SUPPORT;
+						break;
+					}
+					// complete path relative to archive root
+					wchar_t path[sizeof(ptmp->path)+sizeof(ptmp->filename)];
+					wcscpy(path, ptmp->path);
+					size_t len = wcslen(path);
+					if(len && path[len-1] != L'/' && path[len-1] != L'\\') // need delimiter
+						wcscat(path, L"\\");
+					wcscat(path, ptmp->filename);
+					if (wcsicmp(path, pinfo->filename) == 0) break;
+					ptmp++;
+				}
+			} else {
+				for (;;) {
+					if (ptmp->method[0] == '\0') {
+						ret = SPI_NOT_SUPPORT;
+						break;
+					}
+					if (ptmp->position == pinfo->position) break;
+					ptmp++;
+				}
+			}
+			if (ret == SPI_ALL_RIGHT) *pinfo = *ptmp;
+		}
+	} else {
+		ret = SPI_NO_FUNCTION;
+	}
 
 	cs.Leave();
 	return ret;
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/release.h ./release.h
--- /var/tmp/ax7z_src-orig/release.h	1970-01-01 09:00:00.000000000 +0900
+++ ./release.h	2015-01-09 01:12:35.505164200 +0900
@@ -0,0 +1,9 @@
+#ifndef RELEASE_H
+#define RELEASE_H
+
+#define RELEASE_STR "y3b6"
+#define RELEASE_LONG_STR "for 7-zip 4.57+ y3b6"
+#define PATCH_MAJOR 3
+#define PATCH_MINOR 6
+
+#endif
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/resource.h ./resource.h
--- /var/tmp/ax7z_src-orig/resource.h	2005-08-25 23:08:40.000000000 +0900
+++ ./resource.h	2013-08-17 15:47:40.469925700 +0900
@@ -2,25 +2,53 @@
 // Microsoft Visual C++ generated include file.
 // Used by ax7z.rc
 //
+#define IDV_VERSIONINFO                 1
+#define IDC_BROWSE_BUTTON               3
 #define IDD_CONFIG_DIALOG               101
 #define IDD_ABOUT_DIALOG                102
+#define IDD_PROGRESS                    103
+#define IDD_SOLID_CONFIG_DIALOG         104
+#define IDD_PASSWORD                    105
 #define IDC_7Z_CHECK                    1001
 #define IDC_RAR_CHECK                   1002
 #define IDC_CBR_CHECK                   1003
 #define IDC_CAB_CHECK                   1004
 #define IDC_ARJ_CHECK                   1005
-#define IDC_ARJ_CHECK2                  1006
 #define IDC_LZH_CHECK                   1006
-#define IDC_BUTTON1                     1010
-#define IDC_DEFAULT_BUTTON              1010
+#define IDC_DEFAULT_BUTTON              1007
+#define IDC_PROGRESSBAR                 1008
+#define IDC_ISO_CHECK                   1008
+#define IDC_PROGRESSTEXT                1009
+#define IDC_SOLID_BUTTON                1010
+#define IDC_SOLID_7Z_CHECK              1011
+#define IDC_SOLID_RAR_CHECK             1012
+#define IDC_MAX_LOOKAHEAD_EDIT          1013
+#define IDC_MAX_MEMORY_EDIT             1014
+#define IDC_MAX_DISK_EDIT               1015
+#define IDC_CACHE_FOLDER_EDIT           1016
+#define IDC_CLEAR_BUTTON                1017
+#define IDC_PURGE_MEMORY_EDIT           1018
+#define IDC_PURGE_DISK_EDIT             1019
+#define IDC_PASSWORD_EDIT               1020
+#define IDC_EXTENSION_LIST              1021
+#define IDC_SELECT_ALL_BUTTON           1022
+#define IDC_UNSELECT_ALL_BUTTON         1023
+#define IDC_EXTENSION_EDIT              1024
+#define IDC_SKIPARC_BUTTON              1028
+#define IDC_SKIP_BUTTON                 1029
+#define IDC_GUIDE_STATIC                1030
+#define IDC_TOPMOST_CHECK               1031
+#define IDC_7ZVERSION                   1032
+#define IDC_PERUSERCONF_CHECK           1033
+#define IDM_TOPMOST                     40000
 
 // Next default values for new objects
 // 
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        103
-#define _APS_NEXT_COMMAND_VALUE         40001
-#define _APS_NEXT_CONTROL_VALUE         1011
+#define _APS_NEXT_RESOURCE_VALUE        106
+#define _APS_NEXT_COMMAND_VALUE         40002
+#define _APS_NEXT_CONTROL_VALUE         1034
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif
diff -urN -X diff-exclude.txt /var/tmp/ax7z_src-orig/version.hpp ./version.hpp
--- /var/tmp/ax7z_src-orig/version.hpp	1970-01-01 09:00:00.000000000 +0900
+++ ./version.hpp	2013-08-14 15:06:26.070136300 +0900
@@ -0,0 +1,102 @@
+#ifndef YAK_UTIL_WINDOWS_HPP
+#define YAK_UTIL_WINDOWS_HPP
+
+#include <windows.h>
+
+#include <vector>
+#include <string>
+#include <stdexcept>
+
+namespace yak {
+namespace util {
+namespace windows {
+
+class VersionResource
+{
+public:
+	VersionResource(const std::string &sPath) : pTrans(0)
+	{
+		const char* sz = sPath.c_str();
+		DWORD dwDummy;
+		DWORD dwSize = GetFileVersionInfoSize(sz, &dwDummy);
+		if(!dwSize) throw std::runtime_error("File not found");
+		buf.resize(dwSize);
+		GetFileVersionInfo(sz, 0, dwSize, &buf[0]);
+	}
+	struct LANGANDCODEPAGE
+	{
+		WORD wLanguage;
+		WORD wCodePage;
+	};
+	UINT GetLangAndCodePageCount() const
+	{
+		if(!pTrans) SetTranslation();
+		return uiTrans / sizeof(LANGANDCODEPAGE);
+	}
+	const LANGANDCODEPAGE& GetLangAndCodePage(UINT idx) const
+	{
+		if(!pTrans) SetTranslation();
+		return pTrans[idx];
+	}
+	enum VT_TYPE {
+		COMMENTS, COMPANY_NAME, FILE_DESCRIPTION, FILE_VERSION,
+		INTERNAL_NAME, LEGAL_COPYRIGHT, LEGAL_TRADEMARKS, ORIGINAL_FILENAME,
+		PRODUCT_NAME, PRODUCT_VERSION, PRIVATE_BUILD, SPECIAL_BUID,
+		EOT,
+	};
+	bool IsExisted(VT_TYPE type, UINT idx = 0) const
+	{
+		std::string key = Key(type, idx);
+		LPVOID p; UINT ui;
+		// Probably win32api declaration error
+		return VerQueryValue(const_cast<BYTE*>(&buf[0]), const_cast<LPSTR>(key.c_str()), &p, &ui) ? true : false;
+	}
+	std::string GetValue(VT_TYPE type, UINT idx = 0) const
+	{
+		std::string key = Key(type, idx);
+		LPVOID p; UINT ui;
+		// Probably win32api declaration error
+		if(VerQueryValue(const_cast<BYTE*>(&buf[0]), const_cast<LPSTR>(key.c_str()), &p, &ui)) {
+			return std::string(static_cast<char*>(p));
+		} else return std::string();
+	}
+	static const char* GetKeyName(VT_TYPE idx)
+	{
+		static const char* const szBlockName[] = {
+			"Comments", "CompanyName", "FileDescription", "FileVersion",
+			"InternalName", "LegalCopyright", "LegalTrademarks", "OriginalFilename",
+			"ProductName", "ProductVersion", "PrivateBuild", "SpecialBuild",
+		};
+		const UINT num = sizeof(szBlockName) / sizeof(szBlockName[0]);
+		if(idx < num) return szBlockName[idx];
+		else return 0;
+	}
+private:
+	void SetTranslation() const
+	{
+		LPVOID p;
+		// Probably win32api declaration error
+		VerQueryValue(const_cast<BYTE*>(&buf[0]), "\\VarFileInfo\\Translation", &p, &uiTrans);
+		pTrans = static_cast<LANGANDCODEPAGE*>(p);
+	}
+	std::string Key(VT_TYPE type, UINT idx) const
+	{
+		if(!pTrans) SetTranslation();
+		std::string buf2(4096, '\0');
+		const char* key = GetKeyName(type);
+		if(key) {
+			std::size_t size = wsprintf(&buf2[0], "\\StringFileInfo\\%04x%04x\\%s", pTrans[idx].wLanguage, pTrans[idx].wCodePage, key);
+			buf2.resize(size);
+		} else buf2.resize(0);
+		return buf2;
+	}
+	std::vector<BYTE> buf;
+	mutable LANGANDCODEPAGE *pTrans;
+	mutable UINT uiTrans;
+};
+
+} // namespace windows
+} // namespace util
+} // namespace yak
+
+#endif
--- /var/tmp/ax7z_src-orig/7z/7zip/UI/Common/OpenArchive.cpp	2007-08-28 17:57:45.000000000 +0900
+++ 7z/7zip/UI/Common/OpenArchive.cpp	2013-04-12 00:17:02.204427800 +0900
@@ -155,6 +155,26 @@
     }
     orderIndices2 += orderIndices;
     orderIndices = orderIndices2;
+
+/* begin: extracted from 4.65 */
+    if (orderIndices.Size() >= 2)
+    {
+      int isoIndex = codecs->FindFormatForArchiveType(L"iso");
+      int udfIndex = codecs->FindFormatForArchiveType(L"udf");
+      int iIso = -1;
+      int iUdf = -1;
+      for (int i = 0; i < orderIndices.Size(); i++)
+      {
+        if (orderIndices[i] == isoIndex) iIso = i;
+        if (orderIndices[i] == udfIndex) iUdf = i;
+      }
+      if (iUdf == iIso + 1)
+      {
+        orderIndices[iUdf] = isoIndex;
+        orderIndices[iIso] = udfIndex;
+      }
+    }
+/* end: extracted from 4.65 */
   }
   else if (extension == L"000" || extension == L"001")
   {
--- /var/tmp/ax7z_src-orig/7z/7zip/UI/Common/LoadCodecs.cpp	2007-10-24 18:44:50.000000000 +0900
+++ 7z/7zip/UI/Common/LoadCodecs.cpp	2013-04-12 00:17:02.201427500 +0900
@@ -468,9 +468,11 @@
   for (int i = 0; i < Formats.Size(); i++)
   {
     const CArcInfoEx &arc = Formats[i];
-    if (!arc.UpdateEnabled)
-      continue;
-    if (arc.Name.CompareNoCase(arcType) == 0)
+// begin: adjusted to 4.65
+//    if (!arc.UpdateEnabled)
+//      continue;
+// end: adjusted to 4.65
+	if (arc.Name.CompareNoCase(arcType) == 0)
       return i;
   }
   return -1;
