Commits

Billy O'Neal  committed 2eb0679
  • Participants
  • Parent commits ec39a6c

Comments (0)

Files changed (3)

File pevFind/pevFind.vcxproj

     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
-    <PlatformToolset>v90</PlatformToolset>
+    <PlatformToolset>v100</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
-    <PlatformToolset>v90</PlatformToolset>
+    <PlatformToolset>v100</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
-    <PlatformToolset>v90</PlatformToolset>
+    <PlatformToolset>v100</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
-    <PlatformToolset>v90</PlatformToolset>
+    <PlatformToolset>v100</PlatformToolset>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">

File pevLib/fileData.h

 #pragma once
 #include <string>
 #include <vector>
+#include <iostream>
+#include <iomanip>
 #define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1
 #include <cryptopp/md5.h>
 #include <cryptopp/sha.h>
 	inline const std::wstring & getFileName() const;
 
 	//Access times
+	inline const WIN32_FILE_ATTRIBUTE_DATA getAttributeData() const;
 	inline const FILETIME getLastAccessTime() const;
 	inline const FILETIME getLastModTime() const;
 	inline const FILETIME getCreationTime() const;
 {
 	return fileName;
 }
+
+inline const WIN32_FILE_ATTRIBUTE_DATA FileData::getAttributeData() const
+{
+	disable64.disableFS();
+	WIN32_FILE_ATTRIBUTE_DATA attributeData;
+	if(GetFileAttributesEx(fileName.c_str(), GetFileExInfoStandard, &attributeData) == 0)
+	{
+		ZeroMemory(&attributeData, sizeof(attributeData));
+		DWORD lastError = ::GetLastError();
+		std::wcerr << L"DEBUG DEBUG DEBUG: Last Error: 0x" << std::hex << lastError << std::dec << L" " << fileName << std::endl;
+		std::abort();
+	}
+	disable64.enableFS();
+	return attributeData;
+}
+
 inline const FILETIME FileData::getLastAccessTime() const
 {
-	WIN32_FILE_ATTRIBUTE_DATA attributeData;
-	if(!GetFileAttributesEx(fileName.c_str(), GetFileExInfoStandard, &attributeData))
-	{
-		FILETIME zero;
-		zero.dwLowDateTime = 0;
-		zero.dwHighDateTime = 0;
-		return zero;
-	}
-	return attributeData.ftLastAccessTime;
+	return getAttributeData().ftLastAccessTime;
 }
 inline const FILETIME FileData::getLastModTime() const
 {
-	WIN32_FILE_ATTRIBUTE_DATA attributeData;
-	if(!GetFileAttributesEx(fileName.c_str(), GetFileExInfoStandard, &attributeData))
-	{
-		FILETIME zero;
-		zero.dwLowDateTime = 0;
-		zero.dwHighDateTime = 0;
-		return zero;
-	}
-	return attributeData.ftLastWriteTime;
+	return getAttributeData().ftLastWriteTime;
 }
 inline const FILETIME FileData::getCreationTime() const
 {
-	WIN32_FILE_ATTRIBUTE_DATA attributeData;
-	if(!GetFileAttributesEx(fileName.c_str(), GetFileExInfoStandard, &attributeData))
-	{
-		FILETIME zero;
-		zero.dwLowDateTime = 0;
-		zero.dwHighDateTime = 0;
-		return zero;
-	}
-	return attributeData.ftCreationTime;
+	return getAttributeData().ftCreationTime;
 }
 inline const FILETIME FileData::getPEHeaderTime() const
 {

File pevLib/pevLib.vcxproj

     <ConfigurationType>StaticLibrary</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
-    <PlatformToolset>v90</PlatformToolset>
+    <PlatformToolset>v100</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>StaticLibrary</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
-    <PlatformToolset>v90</PlatformToolset>
+    <PlatformToolset>v100</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>StaticLibrary</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
-    <PlatformToolset>v90</PlatformToolset>
+    <PlatformToolset>v100</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>StaticLibrary</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
-    <PlatformToolset>v90</PlatformToolset>
+    <PlatformToolset>v100</PlatformToolset>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
+    <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Dev\boost_1_48_0;C:\Dev\cryptopp561;$(IncludePath)</IncludePath>
+    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Dev\cryptopp561\Lib\Win32\${Configuration);$(LibraryPath)</LibraryPath>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>