ADMPV Posted July 7, 2017 Share Posted July 7, 2017 in calls to winapi file handle passes as HANDLE and all ok. but in plain C it may be FILE* ex: RHASH_API void rhash_run_benchmark(unsigned hash_id, unsigned flags, FILE* output); calls like Local $aResult = DllCall("librhash.dll", "none:cdecl", "rhash_run_benchmark", _ "uint", $hash_id, _ "uint", $flags, _ "handle", $output) crashes (i try handle, handle*, ptr, ptr*, hwnd, hwnd*, ....) may be someone know solution ? Link to comment Share on other sites More sharing options...
ADMPV Posted July 7, 2017 Author Share Posted July 7, 2017 sizeof(FILE*) == 4 Link to comment Share on other sites More sharing options...
ADMPV Posted July 7, 2017 Author Share Posted July 7, 2017 the solution is modify source c dll code (write wrapper c func) like this void rhash_run_benchmark_mod(unsigned hash_id, unsigned flags, const char* output) { FILE* f = fopen(output, "wb"); rhash_run_benchmark(hash_id, flags, f); fclose(f); } not the case if no source code for dll Link to comment Share on other sites More sharing options...
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