Unc3nZureD Posted February 28, 2013 Share Posted February 28, 2013 Hi guys. I've got an unknown problem when calling my DLL. So here what I do when it occurs: - If I choose an au3 and press test it will successfully call the DLL - If I choose an au3 and and icon and press test button it will fail calling the DLL Got no idea why. The DLL is attached, here's my code: expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <SliderConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("AutoIT", 332, 379, 211, 161) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Group1 = GUICtrlCreateGroup("File ", 8, 40, 313, 137) $Label2 = GUICtrlCreateLabel("Input:", 16, 67, 31, 17) $Input1 = GUICtrlCreateInput("", 64, 64, 201, 21) $Label4 = GUICtrlCreateLabel("Seed:", 16, 139, 32, 17) $Input3 = GUICtrlCreateInput(Random(100, 999, 1), 64, 136, 145, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER)) $Button1 = GUICtrlCreateButton("...", 272, 64, 27, 21) $Input4 = GUICtrlCreateInput("", 64, 112, 201, 21) $Label9 = GUICtrlCreateLabel("Icon:", 16, 116, 28, 17) $Button5 = GUICtrlCreateButton("...", 272, 112, 27, 21) $Button4 = GUICtrlCreateButton("Test", 128, 344, 75, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button5 $File2 = FileOpenDialog("Choose the Icon", @ScriptDir, "Icons (*.ico)") GUICtrlSetData($Input4, $File2) Case $Button1 $File = FileOpenDialog("Choose the File", @ScriptDir, "Sources (*.au3)") GUICtrlSetData($Input1, $File) Case $Button4 $read = GuiCtrlRead($Input3) $seeder = _Call($read) MsgBox(0,"", "DONE!") EndSwitch WEnd Func _Call($addseed) $xxcount = Int($addseed/100) MsgBox(0,"",$addseed & @CRLF & $xxcount) $keys = DllCall("Project21.dll", "int", "AddIntegers", "int", $addseed, "int", $xxcount) Return $keys[0] EndFuncProject21.rar Link to comment Share on other sites More sharing options...
JohnOne Posted February 28, 2013 Share Posted February 28, 2013 Hint: $addseed is a string. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
trancexx Posted February 28, 2013 Share Posted February 28, 2013 Check your gay entry point function. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Unc3nZureD Posted February 28, 2013 Author Share Posted February 28, 2013 But it works If I don't choose the icons button. If I just press the icon button (even if I don't choose anything) It crashes. Does the same happen at you guys? Link to comment Share on other sites More sharing options...
trancexx Posted February 28, 2013 Share Posted February 28, 2013 It doesn't matter when it works and when not, if it's broken. It may work if you DllOpen() at the top of the script and pass dll handle to DllCall(), but that doesn't mean that's ok. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Unc3nZureD Posted February 28, 2013 Author Share Posted February 28, 2013 Thanks, it works. I just had to open it before using Link to comment Share on other sites More sharing options...
JohnOne Posted February 28, 2013 Share Posted February 28, 2013 lol. Dead horse in the post trancexx, I hope you're proficient in the art of flogging. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
trancexx Posted February 28, 2013 Share Posted February 28, 2013 Indeed. ♡♡♡ . eMyvnE 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