sensalim Posted January 12, 2008 Share Posted January 12, 2008 I used to use the dbf.dll made by Jeromehttp://www.autoitscript.com/forum/index.ph...5308&hl=dbfbut since the last autoit release, it crashes.In his zipped, there is a compiled exe file and it still works...so either I go back to older autoit or find a fix to this dll...Anyone help?Thanks. Link to comment Share on other sites More sharing options...
GeoBob Posted February 4, 2008 Share Posted February 4, 2008 (edited) I used to use the dbf.dll made by Jeromehttp://www.autoitscript.com/forum/index.ph...5308&hl=dbfbut since the last autoit release, it crashes.In his zipped, there is a compiled exe file and it still works...so either I go back to older autoit or find a fix to this dll...Anyone help?Thanks.This is what worked for me. Edit each DllCall() function and add ":cdecl" to the return type:from $resr = DllCall($dll_dbf, "int", "dbOpen", "str", $db, "str", $fname, "str", $type, "int", $password)to $resr = DllCall($dll_dbf, "int:cdecl", "dbOpen", "str", $db, "str", $fname, "str", $type, "int", $password) Edited February 4, 2008 by GeoBob Link to comment Share on other sites More sharing options...
sensalim Posted February 4, 2008 Author Share Posted February 4, 2008 This is what worked for me. Edit each DllCall() function and add ":cdecl" to the return type: from $resr = DllCall($dll_dbf, "int", "dbOpen", "str", $db, "str", $fname, "str", $type, "int", $password) to $resr = DllCall($dll_dbf, "int:cdecl", "dbOpen", "str", $db, "str", $fname, "str", $type, "int", $password) Finally a reply Thanks. I tried but it still crashes. I think it crashes on Func dbAddRecord($db, ByRef $FV, $nbfields) Redim $FV[$nbfields+1] $f=_StringRepeat("char[256];", $nbfields) $s = DllStructCreate($f) if @Error then return ErrorDBF("dbAddRecord", $ERR_NOMEMORY) For $i=1 to $nbfields DllStructSetData($s, $i, $FV[$i-1]) Next $resr = DllCall($dll_dbf, "int:cdecl", "dbAddRecord", "str", $db, "ptr", DllStructGetPtr($s)) if $resr[0] < 0 Then DllStructDelete($s) return ErrorDBF("dbAddRecord", $resr) EndIf For $i=1 to $nbfields $FV[$i-1] = DllStructGetData($s,$i) Next DllStructDelete($s) return 0; EndFunc dbCreate() and dbAddField() do not seem to crash. So what now? Thanks. Link to comment Share on other sites More sharing options...
AutoPepe Posted November 6, 2011 Share Posted November 6, 2011 Post to learn and follow this post. Really many talk about many possibilities of autoit that don't develop. I don't find enough and functional examples in au3 of Planning agendas with Autoit, or invoice program, or manipulating database utilities. Best Regards Traducción AutoIt al Español. http://autoitespa.espanaforo.com/forum.htm . Visita el foro de AutoIt en español http://www.emesn.com/autoitforum/. I am a simple user, not a programmer. 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