GetFileHash Method (path, hash)

Microsoft Deployment Compression & Installer

Copy image CopyHover image
Deployment Tools Foundation GetFileHash Method (path, hash)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerInstallerGetFileHash(String, array<Int32>[]()[][])
Gets a 128-bit hash of the specified file.
Declaration Syntax
C# Visual Basic Visual C++
public static void GetFileHash(
	string path,
	int[] hash
)
Public Shared Sub GetFileHash ( 
	path As String,
	hash As Integer()
)
public:
static void GetFileHash(
	String^ path, 
	array<int>^ hash
)
Parameters
path (String)
Path to the file
hash (array<Int32>[]()[][])
Integer array of length 4 which receives the four 32-bit parts of the hash value.
Remarks

Win32 MSI API: MsiGetFileHash

Exceptions
Exception Condition
FileNotFoundException the file does not exist or could not be read

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller.dll) Version: 3.0.0.0 (3.9.1006.0)