lolp1 Posted April 16, 2007 Share Posted April 16, 2007 Hello,I was recently messing with the captDLL and am having some problems. Every time I use it I get this error:I am using V2 from here:http://www.autoitscript.com/forum/index.ph...t=0&start=0This is the example I am using. (What was provided); Capture full screen ; Fist parameter - filename, last - jpeg quality. DllCall("captdll.dll", "int", "CaptureScreen", "str", "dump_full.jpg", "int", 85) ; Capture given region ; Fist parameter - filename, next four: left, top, width, height. Last one - jpeg quality. ; Set quality to any negative number to capture into BMP DllCall("captdll.dll", "int", "CaptureRegion", "str", "dump_partial.bmp", "int", 100, "int", 100, "int", 300, "int", 200, "int", -1)Any ideas? Link to comment Share on other sites More sharing options...
1905russell Posted April 16, 2007 Share Posted April 16, 2007 (edited) Any ideas? Edited April 20, 2007 by 1905russell Link to comment Share on other sites More sharing options...
lolp1 Posted April 17, 2007 Author Share Posted April 17, 2007 Any ideas? Did you open the dll? $dll = DllOpen("captdll.dll") DllCall($dll, "int", "CaptureScreen", "str", "dump_full.jpg", "int", 100) Yes, same error. Link to comment Share on other sites More sharing options...
piccaso Posted April 17, 2007 Share Posted April 17, 2007 works fine here CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
1905russell Posted April 18, 2007 Share Posted April 18, 2007 (edited) Yes, same error.You're using beta and the dll is in the same directory as the calling script?It works fine here also. Edited April 18, 2007 by 1905russell Link to comment Share on other sites More sharing options...
Cyberworld Posted April 19, 2007 Share Posted April 19, 2007 You have forgotten to declare the calling convention (with "cdecl"). Later versions of AutoIt require that you do it. It should look something like this: (Have not tested it myself since I'm to lazy to mess with the required .dll ) ; Capture full screen ; Fist parameter - filename, last - jpeg quality. DllCall("captdll.dll", "int:cdecl", "CaptureScreen", "str", "dump_full.jpg", "int", 85) ; Capture given region ; Fist parameter - filename, next four: left, top, width, height. Last one - jpeg quality. ; Set quality to any negative number to capture into BMP DllCall("captdll.dll", "int:cdecl", "CaptureRegion", "str", "dump_partial.bmp", "int", 100, "int", 100, "int", 300, "int", 200, "int", -1) Link to comment Share on other sites More sharing options...
1905russell Posted April 19, 2007 Share Posted April 19, 2007 (edited) It should look something like this: (Have not tested it myself since I'm to lazy to mess with the required .dll ) I tested it and for me both ("int" or "int:cdecl") work with beta, thanks. Hopefully this solves lolp1's problem. Correction: I just installed beta v3.2.3.6 (Apr17,07) and "int" gives me the same error as lolp1 but "int:cdecl" works perfectly. Edited April 20, 2007 by 1905russell 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