|
|||
|
DLL call to functions with no args crashes.
Below is an example: // script GetDoubleClickTime var ret = Dll.registerFunction("user32.dll", "GetDoubleClickTime", "GetDoubleClickTime", "stdcall", "ulong"); trace("Dll.registerFunction(GetDoubleClickTime)=" + ret); var dblclktime = GetDoubleClickTime(); trace("dblclktime=" + dblclktime); // end of script In preview, this will cause an exception as below: --- from here --- Microsoft Visual C++ Debug Library Debug Error! Program: ...1\LOCALS~1\Temp\{C0F0FE9F-...}\\pp.exe Module: ...1\LOCALS~1\Temp\{C0F0FE9F-...}\\pp.exe File: Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention. (Press Retry to debug the application) --- to here --- If I choose 'Ignore', then the call itself seems to be done normally. The trace output is as below: --- from here --- FSCommand("FFish_Run", "Initialize") FSCommand("ffish_run", "GetDoubleClickTime") Dll.registerFunction(GetDoubleClickTime)=true dblclktime=300 --- to here --- My machine environment: Windows XP SP2 Flash MX Professional 2004 Version 7.2 Visual C++ 6.0 is inslalled. |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|