With Move(hOpenResult, HashTypeBuf[1], SizeOf(hOpenResult)); the array fills. Before the second Byte only was filles with a 160, with the new command it's 160, 67, 226, 2. The original value of hOpenResult was hOpenResult = 48382880 though. Do i have to declare the values before to be hex so in the array its right?
I will put the explanation of the original function from the api doc here so maybe if I'm doing something complety wrong here point me to the right spot.
"x10: flag to make this function compute the requested value(s) during the call if the hash value is not stored in the volume snapshot yet, which requires v19.7 or later, and
a handle to the file (hItem) must be stored in the buffer at offset 4, i.e. directly after the DWORD value"... hItem im my case should be hOpenResult. The DWORD value is $10.
My current code:
hOpenResult := XWF_OpenItem(CurrentVolume, nItemID, $01); //Öffnen des Files, returned Handle, bei 0 unsuccessful
//Erzeugung des Hashs in XWF
HashTypeBuf[0] := $10;
Move(hOpenResult, HashTypeBuf[1], SizeOf(hOpenResult));
GetHashOK := XWF_GetHashValue(nItemID, @HashTypeBuf[0]); //Hash Value mithilfe XWF Funktion berechnen