GetFileHash Method (path, hash)

DTF API

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++ F#
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
)
static member GetFileHash : 
        path : string * 
        hash : int[] -> unit 
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.11.1.2318)