JohnOne Posted July 19, 2015 Share Posted July 19, 2015 @JohnOne his Problem is that his Code won't work if he uses it but if he uses mine it work. °-°That's the main Problem.Edit: That it inside of func won't work (because he Forget func2() maybe)Please be clear since you seem know what TheShap problems are.Is it your dll file that is working for him, or his dll file with your AutoIt code? 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...
RaiNote Posted July 19, 2015 Share Posted July 19, 2015 (edited) If his Posts are the truth than only both of mine °-° Maybe there is some bug with the dll .Maybe he wrote something wrong within the dll which didn't got detected as an error and compiled within the dll and cause that it can't be opened or the AutoIt Code of him since the begin don't "want" to open it. but we should wait till he's back and answer it. Edited July 19, 2015 by RaiNote C++/AutoIt/OpenGL Easy Coder I will be Kind to you and try to help you till what you want isn't against the Forum Rules~ Link to comment Share on other sites More sharing options...
TheShaps Posted July 19, 2015 Author Share Posted July 19, 2015 (edited) ok so I see a little confusion here. Let me make it clear.I am am able to Run DLLCall.exe and DllCall.au3 and get a MSgBox. but if I make DllCall into a function, for example lets say func2 (like before) and then call the function form my main program, The MsgBox will not appeare. And DllOpen will return -1. (I am using DLLCall.au3 RaiNote provided with)My main function has while 1 loop that calls func2 #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Change2CUI=y #AutoIt3Wrapper_Add_Constants=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Func func2() $dll1 = DllOpen("DllBasics.dll") DllCall($dll1,"none","Function") DllCall($dll1,"none","Function") EndFuncThanks for the help Edited July 19, 2015 by TheShaps Link to comment Share on other sites More sharing options...
JohnOne Posted July 19, 2015 Share Posted July 19, 2015 (edited) If your "main program" is in the same folder as the dll you were provided, then I am lost.The fact that it works globally (outside of a function) but not locally (inside of a function) makes absolutely no sense to me.Can you just confirm that a call to user32.dll works globally and locally?Just try help file example of _WinAPI_FlashWindow or something to confirm. Edited July 19, 2015 by JohnOne 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...
RaiNote Posted July 19, 2015 Share Posted July 19, 2015 (edited) so u used func2() in main ?DLL() Func DLL() $dll1 = DllOpen("DllBasics.dll") DllCall($dll1, "none", "Function") $Value = ConsoleRead() $Value1 = StdoutRead(@ScriptName) MsgBox(0, "x", $Value & " " & $Value1) Sleep(2500) EndFunc ;==>DLL just like this? Edited July 19, 2015 by RaiNote C++/AutoIt/OpenGL Easy Coder I will be Kind to you and try to help you till what you want isn't against the Forum Rules~ Link to comment Share on other sites More sharing options...
TheShaps Posted July 19, 2015 Author Share Posted July 19, 2015 (edited) RaiNotefunc2 is within DLLCall.au3 you gave me. I called func2 form main program. JohnOnethe main function is in another folder. but I included DLLCall.au3 so I am able to call func2calling user32.dll works Globally ,#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Change2CUI=y #AutoIt3Wrapper_Add_Constants=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ;$dll1 = DllOpen("DllBasics.dll") ;DllCall($dll1,"none","Function") ;DllCall($dll1,"none","Function") Local $hDLL = DllOpen("user32.dll") DllCall($hDLL, "int", "MessageBox", "hwnd", 0, "str", "Some text", "str", "Some title", "int", 0) DllClose($hDLL) ;SetLog("whaat")changed DLLCall.au3 to this, and then run DLLCall.au3 by double clicking, and got a MsgBox that says "Some text" Edited July 19, 2015 by TheShaps Link to comment Share on other sites More sharing options...
RaiNote Posted July 19, 2015 Share Posted July 19, 2015 If i understood it right the func2 don't work, right?But if you do the Code without Func it work in the main ?Could it be that the DLLCall.au3 and the main not in the same Folder?If i understood something wrong please correct me ^-^ C++/AutoIt/OpenGL Easy Coder I will be Kind to you and try to help you till what you want isn't against the Forum Rules~ Link to comment Share on other sites More sharing options...
trancexx Posted July 19, 2015 Share Posted July 19, 2015 Don't use DLLCall.au3, don't copy user32.dll to any folder, run script from SciTE (SciTE4AutoIt3) if you want #AutoIt3Wrapper directives to work, show SciTE console output, make sure you are running correct AutoIt (x86/x64).This is all very simple but you've managed to make 3 pages on the forum. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
RaiNote Posted July 19, 2015 Share Posted July 19, 2015 @trancexx If it was that simple why it took so Long for you to help? and i think also after your Resolution there still some questions.. C++/AutoIt/OpenGL Easy Coder I will be Kind to you and try to help you till what you want isn't against the Forum Rules~ Link to comment Share on other sites More sharing options...
trancexx Posted July 19, 2015 Share Posted July 19, 2015 I had sex yesterday. Several times. Then I went nightswimming to cool-off. Then I had more sex.I'm sure now you can understand why it took me this long to reply JohnOne, jchd and Danyfirex 3 ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
JohnOne Posted July 19, 2015 Share Posted July 19, 2015 How was it?The swimming I mean. 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 July 19, 2015 Share Posted July 19, 2015 How was it?The swimming I mean.Heavenly! I could barely walk before it, and afterwards I was like new. Danyfirex and JohnOne 2 ♡♡♡ . 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