Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

DllCall in x64 with 'double' and 'string' in parameters list

$
0
0
Hi

When I use DllCall function to call a 64bits dll, I encounter a strange behavior. If the dll has to receive a string in first parameter and a 'double' in second parameter, this 2nd one is NOT received by the called function.
I have done some tests, and :
  • x64 + string + double ==> double NOT received
  • x64 + double   ==> double succesfully received
  • x86 + string + double ==> double succesfully received
  • x86 + double   ==> double succesfully received
The test dll is compiled with MinGW32 (for x86 dll version) / MinGW64 (for x64 version).
My objective is to use a DLL that is already compiled in x64 and having string+double+others parameters (in this order).

Attached files are a simple example of what is ok/ko. Here's the result of what I get when running the test_double.au3 script:


[font=courier new,courier,monospace]Result
call_float__________ => MyFloatValue_ = 0.005000
call_float_filename_ => MyFloatValue_ = 0.005000 - filename = test
call_double_________ => MyDoubleValue = 0.005000
call_double_filename => MyDoubleValue = 0.000000 - filename = test
call_double_filename => MyDoubleValue = 0.000000 - filename = test[/font]


As you can see, both last result report null value...

Files :
  • test_call.c : source code for the simple dll

  • makefile (rename it to .bat)

  • test_double.au3 : script code to call dll & execute

  • test_double_dll.7z : compiled DLL (if you cannot recompile C to DLL)
Thanks in advance for your help

Best Regards

Attached Files


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>