maillady Posted August 20, 2012 Posted August 20, 2012 The dll I'm working with is here (librhash-1.2.9-win.zip: http://sourceforge.net/projects/rhash/files/rhash/1.2.9/ )The API is defined as:RHASH_API int rhash_file_update(rhash ctx, FILE* fd);The way I understand it, the parameter "fd" is a file descriptor. so.. how I do I pass a "file descriptor" from autoit to the dll via DllCall?_WinAPI_CreateFile is a no go... Autoit just freezesFunc _RHash_FileUpdate($Context, $sFilename) Local $hFile = _WinAPI_CreateFile($sFilename, 2, 2, 4, 0) If (Not $hFile) Then Return SetError(2, 0, 0) Local $Ret = DllCall($RHash_DLL, "int:cdecl", "rhash_file_update", "ptr", $Context, "ptr", $hFile) If @error Or ($Ret[0] < 0) Then Return SetError(1, @error, (_WinAPI_CloseHandle($hFile)*0)) _WinAPI_CloseHandle($hFile) Return $Ret[0] EndFunc
stormbreaker Posted August 20, 2012 Posted August 20, 2012 Not so good with this, but I think the two params are struct and wchar respectively. I checked its source code online and judging by the basic looks, it appears to be written for Linux (primarily) and ported to Win32/64 ---------------------------------------- :bye: Hey there, was I helpful? ---------------------------------------- My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now