From: <no...@us...> - 2010-02-06 19:23:10
|
Revision: 4 http://passwdhk.svn.sourceforge.net/passwdhk/?rev=4&view=rev Author: nobull Date: 2010-02-06 19:23:03 +0000 (Sat, 06 Feb 2010) Log Message: ----------- - Converted necessary integer and pointer variable types to 32 and 64bit compatible types. - Fixed issue when built with ANSI support it would not convert the Unicode username and password from LSASS to ANSI. - Updated the passwdhk.reg file to have all the registry entries the DLL looks up. - Update build project for Visual Studio 2005 and 64bit. Modified Paths: -------------- passwdhk/README.txt passwdhk/logging.c passwdhk/passwdHk.c passwdhk/passwdHk.h passwdhk/passwdHk.reg passwdhk/passwdHk_Driver/passwdhk_driver.cpp passwdhk/passwdHk_Driver/passwdhk_driver.vcproj passwdhk/passwdhk.sln passwdhk/passwdhk.vcproj passwdhk/passwdhk_config/StdAfx.h passwdhk/passwdhk_config/passwdhk_config.cpp passwdhk/passwdhk_config/passwdhk_config.vcproj passwdhk/util.c Modified: passwdhk/README.txt =================================================================== --- passwdhk/README.txt 2008-06-17 13:59:30 UTC (rev 3) +++ passwdhk/README.txt 2010-02-06 19:23:03 UTC (rev 4) @@ -10,6 +10,11 @@ Clark University 03APR08 +Modified by: +Curtis Robinson +cr...@fi... +02FEB10 + The programs and source code in this package and supplied by this package is made available under the LGPL license. Please see LICENSE.txt in this package for more information. For the latest packages and more information, please see http://acctsync.sourceforge.net/ . Modified: passwdhk/logging.c =================================================================== --- passwdhk/logging.c 2008-06-17 13:59:30 UTC (rev 3) +++ passwdhk/logging.c 2010-02-06 19:23:03 UTC (rev 4) @@ -126,7 +126,7 @@ DWORD NumberOfBytesWritten = 0; struct tm newtime; time_t aclock; - int tmp2len; + INT_PTR tmp2len; char tmp[26] = "error getting time"; char *tmp2; @@ -141,7 +141,7 @@ tmp2len = strlen(tmp) + strlen(s) + 8; tmp2 = calloc(1, tmp2len); _snprintf_s(tmp2, tmp2len, tmp2len - 1, "[ %s ] %s\r\n", tmp, s); - ret = WriteFile(h, (LPCVOID)tmp2, strlen(tmp2), &NumberOfBytesWritten, NULL); + ret = WriteFile(h, (LPCVOID)tmp2, (int)strlen(tmp2), &NumberOfBytesWritten, NULL); free(tmp2); return ret; @@ -173,7 +173,7 @@ SetFilePointer(hLogFile, 0, 0, FILE_END); // Write - WriteFile(hLogFile, (LPCVOID)s, strlen(s), &NumberOfBytesWritten, NULL); + WriteFile(hLogFile, (LPCVOID)s, (int)strlen(s), &NumberOfBytesWritten, NULL); // Close CloseHandle(hLogFile); Modified: passwdhk/passwdHk.c =================================================================== --- passwdhk/passwdHk.c 2008-06-17 13:59:30 UTC (rev 3) +++ passwdhk/passwdHk.c 2010-02-06 19:23:03 UTC (rev 4) @@ -55,17 +55,23 @@ NTSTATUS NTAPI PasswordChangeNotify(PUNICODE_STRING username, ULONG relativeid, PUNICODE_STRING password) { TCHAR *usernameStr, *passwordStr; - +#if UNICODE usernameStr = calloc(1, username->Length + sizeof(TCHAR)); passwordStr = calloc(1, password->Length + sizeof(TCHAR)); memcpy(usernameStr, username->Buffer, username->Length); memcpy(passwordStr, password->Buffer, password->Length); +#else + usernameStr = calloc(1, username->Length/2 + sizeof(TCHAR)); + passwordStr = calloc(1, password->Length/2 + sizeof(TCHAR)); + wcstombs(usernameStr, username->Buffer, (username->Length/2)); + wcstombs(passwordStr, password->Buffer, (password->Length/2)); +#endif pshk_exec_prog(PSHK_POST_CHANGE, usernameStr, passwordStr); - SecureZeroMemory(usernameStr, username->Length); - SecureZeroMemory(passwordStr, password->Length); + SecureZeroMemory(usernameStr, _tcslen(usernameStr)); + SecureZeroMemory(passwordStr, _tcslen(passwordStr)); free(usernameStr); free(passwordStr); @@ -80,17 +86,23 @@ { int retVal; TCHAR *usernameStr, *passwordStr; - +#if UNICODE usernameStr = calloc(1, username->Length + sizeof(TCHAR)); passwordStr = calloc(1, password->Length + sizeof(TCHAR)); memcpy(usernameStr, username->Buffer, username->Length); memcpy(passwordStr, password->Buffer, password->Length); +#else + usernameStr = calloc(1, username->Length/2 + sizeof(TCHAR)); + passwordStr = calloc(1, password->Length/2 + sizeof(TCHAR)); + wcstombs(usernameStr, username->Buffer, (username->Length/2)); + wcstombs(passwordStr, password->Buffer, (password->Length/2)); +#endif retVal = pshk_exec_prog(PSHK_PRE_CHANGE, usernameStr, passwordStr); - SecureZeroMemory(usernameStr, username->Length); - SecureZeroMemory(passwordStr, password->Length); + SecureZeroMemory(usernameStr, _tcslen(usernameStr)); + SecureZeroMemory(passwordStr, _tcslen(passwordStr)); free(usernameStr); free(passwordStr); Modified: passwdhk/passwdHk.h =================================================================== --- passwdhk/passwdHk.h 2008-06-17 13:59:30 UTC (rev 3) +++ passwdhk/passwdHk.h 2010-02-06 19:23:03 UTC (rev 4) @@ -45,6 +45,7 @@ # include <windows.h> # include <ntsecapi.h> # include <tchar.h> +# include <wchar.h> # include <string.h> #define PSHK_MAX_COMMANDLINE_LEN 256 Modified: passwdhk/passwdHk.reg =================================================================== (Binary files differ) Modified: passwdhk/passwdHk_Driver/passwdhk_driver.cpp =================================================================== --- passwdhk/passwdHk_Driver/passwdhk_driver.cpp 2008-06-17 13:59:30 UTC (rev 3) +++ passwdhk/passwdHk_Driver/passwdhk_driver.cpp 2010-02-06 19:23:03 UTC (rev 4) @@ -64,7 +64,7 @@ PUNICODE_STRING new_punicode_w(PWSTR s) { PUNICODE_STRING ret = (PUNICODE_STRING)calloc(1, sizeof(LSA_UNICODE_STRING)); - ret->Length = wcslen(s) * sizeof(WCHAR); + ret->Length = (USHORT)wcslen(s) * sizeof(WCHAR); ret->MaximumLength = ret->Length; ret->Buffer = _wcsdup(s); Modified: passwdhk/passwdHk_Driver/passwdhk_driver.vcproj =================================================================== --- passwdhk/passwdHk_Driver/passwdhk_driver.vcproj 2008-06-17 13:59:30 UTC (rev 3) +++ passwdhk/passwdHk_Driver/passwdhk_driver.vcproj 2010-02-06 19:23:03 UTC (rev 4) @@ -4,11 +4,15 @@ Version="8.00" Name="passwdhk_driver" ProjectGUID="{029987A5-4837-4F1F-A73C-79B1E8AFDA26}" + RootNamespace="passwdhk_driver" > <Platforms> <Platform Name="Win32" /> + <Platform + Name="x64" + /> </Platforms> <ToolFiles> </ToolFiles> @@ -44,7 +48,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + PreprocessorDefinitions="_UNICODE;UNICODE;WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -103,6 +107,96 @@ /> </Configuration> <Configuration + Name="Release|x64" + OutputDirectory="$(PlatformName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + TypeLibraryName=".\Release/passwdhk_driver.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + PreprocessorDefinitions="_UNICODE;UNICODE;WIN64;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + PrecompiledHeaderFile=".\Release/passwdhk_driver.pch" + AssemblerListingLocation=".\Release/" + ObjectFile=".\Release/" + ProgramDataBaseFileName=".\Release/" + WarningLevel="3" + SuppressStartupBanner="true" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile=".\Release/passwdhk_driver.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + ProgramDatabaseFile=".\Release/passwdhk_driver.pdb" + SubSystem="1" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + SuppressStartupBanner="true" + OutputFile=".\Release/passwdhk_driver.bsc" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration Name="Debug|Win32" OutputDirectory=".\Debug" IntermediateDirectory=".\Debug" @@ -194,6 +288,100 @@ Name="VCPostBuildEventTool" /> </Configuration> + <Configuration + Name="Debug|x64" + OutputDirectory="$(PlatformName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + TypeLibraryName=".\Debug/passwdhk_driver.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + PreprocessorDefinitions="_UNICODE;UNICODE;WIN64;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + PrecompiledHeaderFile=".\Debug/passwdhk_driver.pch" + AssemblerListingLocation=".\Debug/" + ObjectFile=".\Debug/" + ProgramDataBaseFileName=".\Debug/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="true" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + CallingConvention="2" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile=".\Debug/passwdhk_driver.exe" + LinkIncremental="2" + SuppressStartupBanner="true" + GenerateDebugInformation="true" + ProgramDatabaseFile=".\Debug/passwdhk_driver.pdb" + SubSystem="1" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + SuppressStartupBanner="true" + OutputFile=".\Debug/passwdhk_driver.bsc" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> </Configurations> <References> </References> @@ -214,6 +402,14 @@ /> </FileConfiguration> <FileConfiguration + Name="Release|x64" + > + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration Name="Debug|Win32" > <Tool @@ -221,6 +417,14 @@ PreprocessorDefinitions="" /> </FileConfiguration> + <FileConfiguration + Name="Debug|x64" + > + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> </File> </Filter> <Filter Modified: passwdhk/passwdhk.sln =================================================================== --- passwdhk/passwdhk.sln 2008-06-17 13:59:30 UTC (rev 3) +++ passwdhk/passwdhk.sln 2010-02-06 19:23:03 UTC (rev 4) @@ -13,21 +13,35 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {FCE3DC92-3ACA-4A1A-B02D-A4C5FCC294D5}.Debug|Win32.ActiveCfg = Debug|Win32 {FCE3DC92-3ACA-4A1A-B02D-A4C5FCC294D5}.Debug|Win32.Build.0 = Debug|Win32 + {FCE3DC92-3ACA-4A1A-B02D-A4C5FCC294D5}.Debug|x64.ActiveCfg = Debug|x64 + {FCE3DC92-3ACA-4A1A-B02D-A4C5FCC294D5}.Debug|x64.Build.0 = Debug|x64 {FCE3DC92-3ACA-4A1A-B02D-A4C5FCC294D5}.Release|Win32.ActiveCfg = Release|Win32 {FCE3DC92-3ACA-4A1A-B02D-A4C5FCC294D5}.Release|Win32.Build.0 = Release|Win32 + {FCE3DC92-3ACA-4A1A-B02D-A4C5FCC294D5}.Release|x64.ActiveCfg = Release|x64 + {FCE3DC92-3ACA-4A1A-B02D-A4C5FCC294D5}.Release|x64.Build.0 = Release|x64 {3165EF7D-8650-4960-BC73-08FC9EF38BA3}.Debug|Win32.ActiveCfg = Debug|Win32 {3165EF7D-8650-4960-BC73-08FC9EF38BA3}.Debug|Win32.Build.0 = Debug|Win32 + {3165EF7D-8650-4960-BC73-08FC9EF38BA3}.Debug|x64.ActiveCfg = Debug|x64 + {3165EF7D-8650-4960-BC73-08FC9EF38BA3}.Debug|x64.Build.0 = Debug|x64 {3165EF7D-8650-4960-BC73-08FC9EF38BA3}.Release|Win32.ActiveCfg = Release|Win32 {3165EF7D-8650-4960-BC73-08FC9EF38BA3}.Release|Win32.Build.0 = Release|Win32 + {3165EF7D-8650-4960-BC73-08FC9EF38BA3}.Release|x64.ActiveCfg = Release|x64 + {3165EF7D-8650-4960-BC73-08FC9EF38BA3}.Release|x64.Build.0 = Release|x64 {029987A5-4837-4F1F-A73C-79B1E8AFDA26}.Debug|Win32.ActiveCfg = Debug|Win32 {029987A5-4837-4F1F-A73C-79B1E8AFDA26}.Debug|Win32.Build.0 = Debug|Win32 + {029987A5-4837-4F1F-A73C-79B1E8AFDA26}.Debug|x64.ActiveCfg = Debug|x64 + {029987A5-4837-4F1F-A73C-79B1E8AFDA26}.Debug|x64.Build.0 = Debug|x64 {029987A5-4837-4F1F-A73C-79B1E8AFDA26}.Release|Win32.ActiveCfg = Release|Win32 {029987A5-4837-4F1F-A73C-79B1E8AFDA26}.Release|Win32.Build.0 = Release|Win32 + {029987A5-4837-4F1F-A73C-79B1E8AFDA26}.Release|x64.ActiveCfg = Release|x64 + {029987A5-4837-4F1F-A73C-79B1E8AFDA26}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Modified: passwdhk/passwdhk.vcproj =================================================================== --- passwdhk/passwdhk.vcproj 2008-06-17 13:59:30 UTC (rev 3) +++ passwdhk/passwdhk.vcproj 2010-02-06 19:23:03 UTC (rev 4) @@ -4,11 +4,15 @@ Version="8.00" Name="passwdhk" ProjectGUID="{FCE3DC92-3ACA-4A1A-B02D-A4C5FCC294D5}" + RootNamespace="passwdhk" > <Platforms> <Platform Name="Win32" /> + <Platform + Name="x64" + /> </Platforms> <ToolFiles> </ToolFiles> @@ -109,6 +113,98 @@ /> </Configuration> <Configuration + Name="Debug|x64" + OutputDirectory="$(PlatformName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="3" + TypeLibraryName=".\Debug/passwdhk.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + PreprocessorDefinitions="_UNICODE;UNICODE;WIN64;_DEBUG;_WINDOWS;_USRDLL;PASSWDHK_EXPORTS" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + PrecompiledHeaderFile=".\Debug/passwdhk.pch" + WarningLevel="3" + SuppressStartupBanner="true" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + LinkIncremental="2" + SuppressStartupBanner="true" + ModuleDefinitionFile=".\passwdHk.Def" + GenerateDebugInformation="true" + ProgramDatabaseFile=".\Debug/passwdhk.pdb" + ImportLibrary=".\Debug/passwdhk.lib" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + SuppressStartupBanner="true" + OutputFile=".\Debug/passwdhk.bsc" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration Name="Release|Win32" OutputDirectory=".\Release" IntermediateDirectory=".\Release" @@ -202,6 +298,100 @@ Name="VCPostBuildEventTool" /> </Configuration> + <Configuration + Name="Release|x64" + OutputDirectory="$(PlatformName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="3" + TypeLibraryName=".\Release/passwdhk.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + PreprocessorDefinitions="_UNICODE;UNICODE;WIN64;NDEBUG;_WINDOWS;_USRDLL;PASSWDHK_EXPORTS" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + PrecompiledHeaderFile=".\Release/passwdhk.pch" + AssemblerListingLocation=".\Release/" + ObjectFile=".\Release/" + ProgramDataBaseFileName=".\Release/" + WarningLevel="3" + SuppressStartupBanner="true" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile=".\Release/passwdhk.dll" + LinkIncremental="1" + SuppressStartupBanner="true" + ModuleDefinitionFile=".\passwdHk.Def" + ProgramDatabaseFile=".\Release/passwdhk.pdb" + ImportLibrary=".\Release/passwdhk.lib" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + SuppressStartupBanner="true" + OutputFile=".\Release/passwdhk.bsc" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> </Configurations> <References> </References> @@ -222,6 +412,14 @@ /> </FileConfiguration> <FileConfiguration + Name="Debug|x64" + > + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration Name="Release|Win32" > <Tool @@ -229,6 +427,14 @@ PreprocessorDefinitions="" /> </FileConfiguration> + <FileConfiguration + Name="Release|x64" + > + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> </File> <File RelativePath="passwdHk.c" @@ -242,6 +448,14 @@ /> </FileConfiguration> <FileConfiguration + Name="Debug|x64" + > + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration Name="Release|Win32" > <Tool @@ -249,6 +463,14 @@ PreprocessorDefinitions="" /> </FileConfiguration> + <FileConfiguration + Name="Release|x64" + > + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> </File> <File RelativePath="registry.c" @@ -262,6 +484,14 @@ /> </FileConfiguration> <FileConfiguration + Name="Debug|x64" + > + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration Name="Release|Win32" > <Tool @@ -269,6 +499,14 @@ PreprocessorDefinitions="" /> </FileConfiguration> + <FileConfiguration + Name="Release|x64" + > + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> </File> <File RelativePath="util.c" @@ -282,6 +520,14 @@ /> </FileConfiguration> <FileConfiguration + Name="Debug|x64" + > + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration Name="Release|Win32" > <Tool @@ -289,6 +535,14 @@ PreprocessorDefinitions="" /> </FileConfiguration> + <FileConfiguration + Name="Release|x64" + > + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> </File> </Filter> <Filter Modified: passwdhk/passwdhk_config/StdAfx.h =================================================================== --- passwdhk/passwdhk_config/StdAfx.h 2008-06-17 13:59:30 UTC (rev 3) +++ passwdhk/passwdhk_config/StdAfx.h 2010-02-06 19:23:03 UTC (rev 4) @@ -2,7 +2,11 @@ // or project specific include files that are used frequently, but // are changed infrequently // +#ifndef _WIN32_WINNT // Permit use of features specific to Windows NT 4.0 or later. +#define _WIN32_WINNT 0x0400 // Change this to the appropriate value to target +#endif // Windows 98 and Windows 2000 or later. + #if !defined(AFX_STDAFX_H__17D034B1_4682_4AD6_ACAB_7C364AA64832__INCLUDED_) #define AFX_STDAFX_H__17D034B1_4682_4AD6_ACAB_7C364AA64832__INCLUDED_ Modified: passwdhk/passwdhk_config/passwdhk_config.cpp =================================================================== --- passwdhk/passwdhk_config/passwdhk_config.cpp 2008-06-17 13:59:30 UTC (rev 3) +++ passwdhk/passwdhk_config/passwdhk_config.cpp 2010-02-06 19:23:03 UTC (rev 4) @@ -84,7 +84,7 @@ CPasswdhk_configDlg dlg; m_pMainWnd = &dlg; - int nResponse = dlg.DoModal(); + INT_PTR nResponse = dlg.DoModal(); if (nResponse == IDOK) { // TODO: Place code here to handle when the dialog is // dismissed with OK Modified: passwdhk/passwdhk_config/passwdhk_config.vcproj =================================================================== --- passwdhk/passwdhk_config/passwdhk_config.vcproj 2008-06-17 13:59:30 UTC (rev 3) +++ passwdhk/passwdhk_config/passwdhk_config.vcproj 2010-02-06 19:23:03 UTC (rev 4) @@ -4,12 +4,16 @@ Version="8.00" Name="passwdhk_config" ProjectGUID="{3165EF7D-8650-4960-BC73-08FC9EF38BA3}" + RootNamespace="passwdhk_config" Keyword="MFCProj" > <Platforms> <Platform Name="Win32" /> + <Platform + Name="x64" + /> </Platforms> <ToolFiles> </ToolFiles> @@ -112,6 +116,104 @@ /> </Configuration> <Configuration + Name="Debug|x64" + OutputDirectory="$(PlatformName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" + UseOfMFC="2" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="3" + TypeLibraryName=".\Debug/passwdhk_config.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + PreprocessorDefinitions="_UNICODE;UNICODE;WIN64;_DEBUG;_WINDOWS" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="stdafx.h" + PrecompiledHeaderFile=".\Debug/passwdhk_config.pch" + AssemblerListingLocation=".\Debug/" + ObjectFile=".\Debug/" + ProgramDataBaseFileName=".\Debug/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="true" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile=".\Debug/passwdhk_config.exe" + LinkIncremental="2" + SuppressStartupBanner="true" + GenerateDebugInformation="true" + ProgramDatabaseFile=".\Debug/passwdhk_config.pdb" + SubSystem="2" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + SuppressStartupBanner="true" + OutputFile=".\Debug/passwdhk_config.bsc" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration Name="Release|Win32" OutputDirectory=".\Release" IntermediateDirectory=".\Release" @@ -146,7 +248,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" + PreprocessorDefinitions="_UNICODE;UNICODE;WIN32;NDEBUG;_WINDOWS" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -206,6 +308,101 @@ Name="VCPostBuildEventTool" /> </Configuration> + <Configuration + Name="Release|x64" + OutputDirectory="$(PlatformName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" + UseOfMFC="2" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="3" + TypeLibraryName=".\Release/passwdhk_config.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + PreprocessorDefinitions="_UNICODE;UNICODE;WIN64;NDEBUG;_WINDOWS" + StringPooling="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="stdafx.h" + PrecompiledHeaderFile=".\Release/passwdhk_config.pch" + AssemblerListingLocation=".\Release/" + ObjectFile=".\Release/" + ProgramDataBaseFileName=".\Release/" + WarningLevel="3" + SuppressStartupBanner="true" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile=".\Release/passwdhk_config.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + ProgramDatabaseFile=".\Release/passwdhk_config.pdb" + SubSystem="2" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + SuppressStartupBanner="true" + OutputFile=".\Release/passwdhk_config.bsc" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> </Configurations> <References> </References> @@ -226,6 +423,14 @@ /> </FileConfiguration> <FileConfiguration + Name="Debug|x64" + > + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration Name="Release|Win32" > <Tool @@ -233,6 +438,14 @@ PreprocessorDefinitions="" /> </FileConfiguration> + <FileConfiguration + Name="Release|x64" + > + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> </File> <File RelativePath="passwdhk_config.rc" @@ -246,6 +459,14 @@ /> </FileConfiguration> <FileConfiguration + Name="Debug|x64" + > + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration Name="Release|Win32" > <Tool @@ -253,6 +474,14 @@ PreprocessorDefinitions="" /> </FileConfiguration> + <FileConfiguration + Name="Release|x64" + > + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> </File> <File RelativePath="passwdhk_configDlg.cpp" @@ -266,6 +495,14 @@ /> </FileConfiguration> <FileConfiguration + Name="Debug|x64" + > + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration Name="Release|Win32" > <Tool @@ -273,6 +510,14 @@ PreprocessorDefinitions="" /> </FileConfiguration> + <FileConfiguration + Name="Release|x64" + > + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> </File> <File RelativePath="StdAfx.cpp" @@ -287,6 +532,15 @@ /> </FileConfiguration> <FileConfiguration + Name="Debug|x64" + > + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="" + UsePrecompiledHeader="1" + /> + </FileConfiguration> + <FileConfiguration Name="Release|Win32" > <Tool @@ -295,6 +549,15 @@ UsePrecompiledHeader="1" /> </FileConfiguration> + <FileConfiguration + Name="Release|x64" + > + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="" + UsePrecompiledHeader="1" + /> + </FileConfiguration> </File> </Filter> <Filter @@ -333,5 +596,9 @@ </Filter> </Files> <Globals> + <Global + Name="RESOURCE_FILE" + Value="passwdhk_config.rc" + /> </Globals> </VisualStudioProject> Modified: passwdhk/util.c =================================================================== --- passwdhk/util.c 2008-06-17 13:59:30 UTC (rev 3) +++ passwdhk/util.c 2010-02-06 19:23:03 UTC (rev 4) @@ -112,7 +112,7 @@ { LPSTR res, res2; unsigned int i, j = 0; - unsigned int srclen; + UINT_PTR srclen; unsigned char c; if (src == NULL || (srclen = strlen(src)) == 0) @@ -143,7 +143,7 @@ int ret = PSHK_SUCCESS; unsigned i, j, k; DWORD NumberOfBytesWritten = 0; - DWORD HeapSize, HeapSizeBytes; + DWORD_PTR HeapSize, HeapSizeBytes; DWORD exitCode = 0; DWORD progRet; STARTUPINFO si; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |