ADMPV Posted July 7, 2017 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 ?
ADMPV Posted July 7, 2017 Author 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
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