Sign in to follow this  
Followers 0
bile

Help using GSL..DllCall....crashes autoit

3 posts in this topic

Hi.

I would like to use Gnu Scientific Library in my script, but my script crashes giving this error code

!>09:03:27 AutoIT3.exe ended.rc:-1073741819

the script crashes when calling DllCall.

DllOpen returns 1 (is that OK ???) and @error is 0 (after DllOpen call)

of course the dll file is in my system32 folder

Func TestDll()
    local $res
$gsldll=DllOpen("libgsl.dll")
logga($log,"GSL DLL HANDLER:"&$gsldll); logga() is a function I use to create a log

logga($log,@error)

$res=DllCall($gsldll,"double","gsl_cdf_ugaussian_P","double",0.15)

logga($log,@error)

EndFunc

I can't understand what's wrong, has anyone ever used GSL ?? Any hint ??

Share this post


Link to post
Share on other sites



Hi.

I would like to use Gnu Scientific Library in my script, but my script crashes giving this error code

!>09:03:27 AutoIT3.exe ended.rc:-1073741819

the script crashes when calling DllCall.

DllOpen returns 1 (is that OK ???) and @error is 0 (after DllOpen call)

of course the dll file is in my system32 folder

Func TestDll()
    local $res
$gsldll=DllOpen("libgsl.dll")
logga($log,"GSL DLL HANDLER:"&$gsldll); logga() is a function I use to create a log

logga($log,@error)

$res=DllCall($gsldll,"double","gsl_cdf_ugaussian_P","double",0.15)

logga($log,@error)

EndFunc

I can't understand what's wrong, has anyone ever used GSL ?? Any hint ??

OK, I answer myself...it works perfectly, the library uses cdecl... ;)

I've been trying for three days...and 10 minutes after posting the solution came. Sorry, I'm a noob.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi, try cdel, I don't know what the return is spose to be, but I get a return of 0.559617692370243 without any error

local $gsldll, $aResult
$gsldll = DllOpen("libgsl.dll")

$aResult = DllCall($gsldll,"double:cdecl","gsl_cdf_ugaussian_P","double",0.15)
ConsoleWrite("@error = " & @error & @LF & "$aResult[0] = " & $aResult[0] & @LF)

Edit NVM, you already figured it out..lol

Cheers

Edited by smashly

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0