@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: Hashes an array of data. !!!!C# Signature: [DllImport("Shlwapi.dll", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = false)] internal static extern int HashData( [In, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U1, SizeParamIndex = 1)] byte[] pbData, int cbData, [Out, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U1, SizeParamIndex = 3)] byte[] piet, int outputLen); !!!!User-Defined Types: None. !!!!Notes: None. !!!!Tips & Tricks: Please add some! !!!!Sample Code: public static uint hash(string pStr) { if (string.IsNullOrEmpty(pStr)) { throw new ArgumentException("cannot calculate on null", "pStr"); } //utf8 byte[] enc = Encoding.GetEncoding(1200).GetBytes(pStr); byte[] outpHash = { 0, 0, 0, 0 }; HashData(enc, enc.Length, outpHash, 4); return BitConverter.ToUInt32(outpHash, 0); } Documentation: http://msdn.microsoft.com/en-us/library/bb759853(VS.85).aspx
Edit shlwapi.HashData
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.