Changeset 2000 for trunk/eraser
- Timestamp:
- 5/1/2010 10:51:58 AM (3 years ago)
- Location:
- trunk/eraser/Eraser.Util.Native
- Files:
-
- 5 added
- 7 edited
-
Eraser.Util.Native.vcproj (modified) (10 diffs)
-
Fat12Api.cpp (modified) (4 diffs)
-
Fat12Or16Api.cpp (modified) (5 diffs)
-
Fat16Api.cpp (modified) (4 diffs)
-
Fat32Api.cpp (modified) (5 diffs)
-
FatApi.cpp (modified) (4 diffs)
-
OpenHandle.cpp (modified) (1 diff)
-
Strings.en.resx (added)
-
Strings.it.resx (added)
-
Strings.nl.resx (added)
-
Strings.pl.resx (added)
-
Strings.resx (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser/Eraser.Util.Native/Eraser.Util.Native.vcproj
r1997 r2000 31 31 <Tool 32 32 Name="VCPreBuildEventTool" 33 CommandLine=""$(SolutionDir)UpdateVersions.bat" "$(SolutionDir)\" "$(SolutionDir)Version.rc.in" "$(SolutionDir)Version.rc" "33 CommandLine=""$(SolutionDir)UpdateVersions.bat" "$(SolutionDir)\" "$(SolutionDir)Version.rc.in" "$(SolutionDir)Version.rc"
csgettext --merge --recursive EN,NL,IT,PL "$(ProjectDir)\." Strings
if ERRORLEVEL 0 exit 0" 34 34 /> 35 35 <Tool … … 57 57 <Tool 58 58 Name="VCManagedResourceCompilerTool" 59 ResourceFileName="$(IntDir)\$(ProjectName).$(InputName).resources" 59 60 /> 60 61 <Tool … … 106 107 <Tool 107 108 Name="VCPreBuildEventTool" 108 CommandLine=""$(SolutionDir)UpdateVersions.bat" "$(SolutionDir)\" "$(SolutionDir)Version.rc.in" "$(SolutionDir)Version.rc" "109 CommandLine=""$(SolutionDir)UpdateVersions.bat" "$(SolutionDir)\" "$(SolutionDir)Version.rc.in" "$(SolutionDir)Version.rc"
csgettext --merge --recursive EN,NL,IT,PL "$(ProjectDir)\." Strings
if ERRORLEVEL 0 exit 0" 109 110 /> 110 111 <Tool … … 133 134 <Tool 134 135 Name="VCManagedResourceCompilerTool" 136 ResourceFileName="$(IntDir)\$(ProjectName).$(InputName).resources" 135 137 /> 136 138 <Tool … … 183 185 <Tool 184 186 Name="VCPreBuildEventTool" 185 CommandLine=""$(SolutionDir)UpdateVersions.bat" "$(SolutionDir)\" "$(SolutionDir)Version.rc.in" "$(SolutionDir)Version.rc" "187 CommandLine=""$(SolutionDir)UpdateVersions.bat" "$(SolutionDir)\" "$(SolutionDir)Version.rc.in" "$(SolutionDir)Version.rc"
csgettext --merge --recursive EN,NL,IT,PL "$(ProjectDir)\." Strings
if ERRORLEVEL 0 exit 0" 186 188 /> 187 189 <Tool … … 208 210 <Tool 209 211 Name="VCManagedResourceCompilerTool" 212 ResourceFileName="$(IntDir)\$(ProjectName).$(InputName).resources" 210 213 /> 211 214 <Tool … … 257 260 <Tool 258 261 Name="VCPreBuildEventTool" 259 CommandLine=""$(SolutionDir)UpdateVersions.bat" "$(SolutionDir)\" "$(SolutionDir)Version.rc.in" "$(SolutionDir)Version.rc" "262 CommandLine=""$(SolutionDir)UpdateVersions.bat" "$(SolutionDir)\" "$(SolutionDir)Version.rc.in" "$(SolutionDir)Version.rc"
csgettext --merge --recursive EN,NL,IT,PL "$(ProjectDir)\." Strings
if ERRORLEVEL 0 exit 0" 260 263 /> 261 264 <Tool … … 283 286 <Tool 284 287 Name="VCManagedResourceCompilerTool" 288 ResourceFileName="$(IntDir)\$(ProjectName).$(InputName).resources" 285 289 /> 286 290 <Tool … … 339 343 <ProjectReference 340 344 ReferencedProjectIdentifier="{D083E1A8-3A4C-4683-9B3F-D5FEDE61B9C9}" 345 CopyLocal="false" 346 CopyLocalDependencies="false" 341 347 RelativePathToProject=".\Eraser.Util\Eraser.Util.csproj" 342 348 /> … … 460 466 > 461 467 </File> 468 <File 469 RelativePath=".\Strings.en.resx" 470 > 471 </File> 472 <File 473 RelativePath=".\Strings.it.resx" 474 > 475 </File> 476 <File 477 RelativePath=".\Strings.nl.resx" 478 > 479 </File> 480 <File 481 RelativePath=".\Strings.pl.resx" 482 > 483 </File> 484 <File 485 RelativePath=".\Strings.resx" 486 > 487 </File> 462 488 </Filter> 463 489 </Files> -
trunk/eraser/Eraser.Util.Native/Fat12Api.cpp
r1802 r2000 32 32 //Sanity checks: check that this volume is FAT16! 33 33 if (!IsFat12() || info->VolumeFormat == L"FAT16") 34 throw gcnew ArgumentException( L"The volume provided is not a FAT12 volume.");34 throw gcnew ArgumentException(S::_(L"The volume provided is not a FAT12 volume.")); 35 35 } 36 36 … … 39 39 //Sanity checks: check that this volume is FAT16! 40 40 if (!IsFat12() || info->VolumeFormat == L"FAT16") 41 throw gcnew ArgumentException( L"The volume provided is not a FAT12 volume.");41 throw gcnew ArgumentException(S::_(L"The volume provided is not a FAT12 volume.")); 42 42 } 43 43 … … 60 60 unsigned nextCluster = GetFatValue(cluster); 61 61 if (nextCluster <= 0x001 || (nextCluster >= 0xFF0 && nextCluster <= 0xFF6)) 62 throw gcnew ArgumentException( L"Invalid FAT cluster: cluster is marked free.");62 throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked free.")); 63 63 else if (nextCluster == 0xFF7) 64 throw gcnew ArgumentException( L"Invalid FAT cluster: cluster is marked bad.");64 throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked bad.")); 65 65 else if (nextCluster >= 0xFF8) 66 66 return 0xFFFFFFFF; … … 75 75 unsigned nextCluster = GetFatValue(cluster); 76 76 if (nextCluster <= 0x001 || (nextCluster >= 0xFFF0 && nextCluster <= 0xFF6)) 77 throw gcnew ArgumentException( L"Invalid FAT cluster: cluster is marked free.");77 throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked free.")); 78 78 else if (nextCluster == 0xFF7) 79 throw gcnew ArgumentException( L"Invalid FAT cluster: cluster is marked bad.");79 throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked bad.")); 80 80 else if (nextCluster >= 0xFF8) 81 81 return ClusterSizeToSize(result); -
trunk/eraser/Eraser.Util.Native/Fat12Or16Api.cpp
r1802 r2000 32 32 //Sanity checks: check that this volume is FAT12 or FAT16! 33 33 if (info->VolumeFormat != L"FAT12" && info->VolumeFormat != "FAT16") 34 throw gcnew ArgumentException( L"The volume provided is not a FAT12 or FAT16 volume.");34 throw gcnew ArgumentException(S::_(L"The volume provided is not a FAT12 or FAT16 volume.")); 35 35 } 36 36 … … 39 39 //Sanity checks: check that this volume is FAT12 or FAT16! 40 40 if (info->VolumeFormat != L"FAT12" && info->VolumeFormat != "FAT16") 41 throw gcnew ArgumentException( L"The volume provided is not a FAT12 or FAT16 volume.");41 throw gcnew ArgumentException(S::_(L"The volume provided is not a FAT12 or FAT16 volume.")); 42 42 } 43 43 … … 80 80 { 81 81 if (path[0] != L'\\') 82 throw gcnew ArgumentException( L"The path provided is not volume relative. " +83 gcnew String(L"Volume relative paths must begin with a backslash."));82 throw gcnew ArgumentException(S::_(L"The path provided is not volume relative. " 83 L"Volume relative paths must begin with a backslash.")); 84 84 path = path->Remove(0, 1); 85 85 } … … 162 162 { 163 163 if (directory.Short.Attributes == 0x0F) 164 throw gcnew ArgumentException( L"The provided directory is a long file name.");164 throw gcnew ArgumentException(S::_(L"The provided directory is a long file name.")); 165 165 return directory.Short.StartClusterLow; 166 166 } … … 174 174 { 175 175 if (directory.Short.Attributes == 0x0F) 176 throw gcnew ArgumentException( L"The provided directory is a long file name.");176 throw gcnew ArgumentException(S::_(L"The provided directory is a long file name.")); 177 177 return directory.Short.StartClusterLow; 178 178 } -
trunk/eraser/Eraser.Util.Native/Fat16Api.cpp
r1802 r2000 32 32 //Sanity checks: check that this volume is FAT16! 33 33 if (IsFat12() || info->VolumeFormat == L"FAT12") 34 throw gcnew ArgumentException( L"The volume provided is not a FAT16 volume.");34 throw gcnew ArgumentException(S::_(L"The volume provided is not a FAT16 volume.")); 35 35 } 36 36 … … 39 39 //Sanity checks: check that this volume is FAT16! 40 40 if (IsFat12() || info->VolumeFormat == L"FAT12") 41 throw gcnew ArgumentException( L"The volume provided is not a FAT16 volume.");41 throw gcnew ArgumentException(S::_(L"The volume provided is not a FAT16 volume.")); 42 42 } 43 43 … … 59 59 unsigned short* fatPtr = reinterpret_cast<unsigned short*>(Fat); 60 60 if (fatPtr[cluster] <= 0x0001 || (fatPtr[cluster] >= 0xFFF0 && fatPtr[cluster] <= 0xFFF6)) 61 throw gcnew ArgumentException( L"Invalid FAT cluster: cluster is marked free.");61 throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked free.")); 62 62 else if (fatPtr[cluster] == 0xFFF7) 63 throw gcnew ArgumentException( L"Invalid FAT cluster: cluster is marked bad.");63 throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked bad.")); 64 64 else if (fatPtr[cluster] >= 0xFFF8) 65 65 return 0xFFFFFFFF; … … 74 74 { 75 75 if (fatPtr[cluster] <= 0x0001 || (fatPtr[cluster] >= 0xFFF0 && fatPtr[cluster] <= 0xFFF6)) 76 throw gcnew ArgumentException( L"Invalid FAT cluster: cluster is marked free.");76 throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked free.")); 77 77 else if (fatPtr[cluster] == 0xFFF7) 78 throw gcnew ArgumentException( L"Invalid FAT cluster: cluster is marked bad.");78 throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked bad.")); 79 79 else if (fatPtr[cluster] >= 0xFFF8) 80 80 return ClusterSizeToSize(result); -
trunk/eraser/Eraser.Util.Native/Fat32Api.cpp
r1802 r2000 32 32 //Sanity checks: check that this volume is FAT32! 33 33 if (info->VolumeFormat != L"FAT32") 34 throw gcnew ArgumentException( L"The volume provided is not a FAT32 volume.");34 throw gcnew ArgumentException(S::_(L"The volume provided is not a FAT32 volume.")); 35 35 } 36 36 … … 39 39 //Sanity checks: check that this volume is FAT32! 40 40 if (info->VolumeFormat != L"FAT32") 41 throw gcnew ArgumentException( L"The volume provided is not a FAT32 volume.");41 throw gcnew ArgumentException(S::_(L"The volume provided is not a FAT32 volume.")); 42 42 } 43 43 … … 86 86 unsigned* fatPtr = reinterpret_cast<unsigned*>(Fat); 87 87 if (fatPtr[cluster] <= 0x00000001 || (fatPtr[cluster] >= 0x0FFFFFF0 && fatPtr[cluster] <= 0x0FFFFFF6)) 88 throw gcnew ArgumentException( L"Invalid FAT cluster: cluster is marked free.");88 throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked free.")); 89 89 else if (fatPtr[cluster] == 0x0FFFFFF7) 90 throw gcnew ArgumentException( L"Invalid FAT cluster: cluster is marked bad.");90 throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked bad.")); 91 91 else if (fatPtr[cluster] >= 0x0FFFFFF8) 92 92 return 0xFFFFFFFF; … … 101 101 { 102 102 if (fatPtr[cluster] <= 0x00000001 || (fatPtr[cluster] >= 0x0FFFFFF0 && fatPtr[cluster] <= 0x0FFFFFF6)) 103 throw gcnew ArgumentException( L"Invalid FAT cluster: cluster is marked free.");103 throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked free.")); 104 104 else if (fatPtr[cluster] == 0x0FFFFFF7) 105 throw gcnew ArgumentException( L"Invalid FAT cluster: cluster is marked bad.");105 throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked bad.")); 106 106 else if (fatPtr[cluster] >= 0x0FFFFFF8) 107 107 return ClusterSizeToSize(result); … … 117 117 { 118 118 if (path[0] != L'\\') 119 throw gcnew ArgumentException( L"The path provided is not volume relative. " +120 gcnew String(L"Volume relative paths must begin with a backslash."));119 throw gcnew ArgumentException(S::_(L"The path provided is not volume relative. " + 120 L"Volume relative paths must begin with a backslash.")); 121 121 path = path->Remove(0, 1); 122 122 } -
trunk/eraser/Eraser.Util.Native/FatApi.cpp
r1802 r2000 100 100 { 101 101 if (!IsClusterAllocated(cluster)) 102 throw gcnew ArgumentException( L"The specified cluster is not used.");102 throw gcnew ArgumentException(S::_(L"The specified cluster is not used.")); 103 103 104 104 array<Byte>^ result = gcnew array<Byte>(FileSize(cluster)); … … 120 120 { 121 121 if (!IsClusterAllocated(cluster)) 122 throw gcnew ArgumentException( L"The specified cluster is not used.");122 throw gcnew ArgumentException(S::_(L"The specified cluster is not used.")); 123 123 if (static_cast<unsigned>(buffer->Length) != FileSize(cluster)) 124 throw gcnew ArgumentException( L"The provided file contents will not fit in the " +125 gcnew String(L"allocated file."));124 throw gcnew ArgumentException(S::_(L"The provided file contents will not fit in the " 125 L"allocated file.")); 126 126 127 127 int clusterSize = static_cast<int>(ClusterSizeToSize(1)); … … 196 196 //Check that the sequence is one less than the previous one. 197 197 if (sequence != i->LongFileName.Sequence + 1) 198 throw gcnew ArgumentException( L"Invalid directory entry.");198 throw gcnew ArgumentException(S::_(L"Invalid directory entry.")); 199 199 } 200 200 … … 269 269 //Check that the sequence is one less than the previous one. 270 270 if (sequence != i->LongFileName.Sequence + 1) 271 throw gcnew ArgumentException( L"Invalid directory entry.");271 throw gcnew ArgumentException(S::_(L"Invalid directory entry.")); 272 272 } 273 273 else -
trunk/eraser/Eraser.Util.Native/OpenHandle.cpp
r1812 r2000 42 42 43 43 if (bufferSize == 0) 44 throw gcnew InvalidOperationException( "The list of open system handles could not be retrieved.");44 throw gcnew InvalidOperationException(S::_(L"The list of open system handles could not be retrieved.")); 45 45 } 46 46
Note: See TracChangeset
for help on using the changeset viewer.
