Bert Posted July 3, 2007 Posted July 3, 2007 I'm making a script, and I thought it may be wise to add some dll files to handle some stuff. I could easily make the files EXEs, but I thought it may be better to make them run in dll mode. (Learn something new, and expand my horizons) I've reviewed the helpfile, and I'm somewhat lost on how to make the dllcall the dll in my EXE scripthave the dll file run so it handles some of the sub-routines, and keep my main exe script clear to handle the main stuff.Any advice would be welcomed. The Vollatran project My blog: http://www.vollysinterestingshit.com/
Richard Robertson Posted July 3, 2007 Posted July 3, 2007 You need a language such as C++. I have seen several people using something called Free Basic around here too. Once you choose the language, find the information specific to each language to compile a 32-bit library. It's not terribly complicated but it does speed some things up and clear up the script.
SkinnyWhiteGuy Posted July 3, 2007 Posted July 3, 2007 I myself wanted to do the same thing lately, and I did a LOT of research here on the forums, and elsewhere. The info is here, but it's all in pieces, and took some experiments to figure out. So, to aid myself, I made a sample development project that I could easily and quickly adapt for anything I may need in the future. This is using Bloodshed C++, as I don't quite understand VC++ myself (even though I own a legally bought copy, just haven't gotten around to trying to figure it out with everything else). I figure the .cpp file that this project uses should work just fine with it. Also included in the zip is a sample .au3 file, showing the calls to the Dll. I didn't include a copy of the dll, but if you want, I can upload it too.Autoit3_DLL.zip
Bert Posted July 3, 2007 Author Posted July 3, 2007 ok, I understand that to a point. I'm starting to study C##, so I should be able to figure this out. Next question - Does a dll need to be compiled in any manor, or is it simply making a file and renaming it? How does one MAKE a dll? I assume you can use SciTe to edit it. The Vollatran project My blog: http://www.vollysinterestingshit.com/
SkinnyWhiteGuy Posted July 3, 2007 Posted July 3, 2007 Well, in my limited experience (read: I just figured this out last week), .dll's not only need to be compiled, but should be compiled, mainly because you'd lose the speed benefit your looking for if they were interpreted. As for an editor the Bloodshed C++ package I downloaded to make the above package has an IDE itself, which is nice, and the package I chose came with a compiler, so it had everything I needed to make C/C++ programs, and was only around 5-6Mb in size. I can tell you in the package I included, if you get the IDE, and compile with it, the dll will be compiled in the same directory you extract the files to, and named sample.dll. Look around in the Project settings to see how you can change that, as that is how I usually make new projects: Copy the above files into a new folder, rename a few things, change what name the dll will have, and start building everything in earnest.
Richard Robertson Posted July 4, 2007 Posted July 4, 2007 C## is not a language. C++ is a native language, and dlls produced using it can be called by AutoIt. C# is also a language, but it is a .Net managed language and will not export natively callable data. Like I said before, you need to check your language's documentation on creating dlls. Dlls have a special main function that is called when the dll is loaded, either initially or on a new thread, etc. If you correctly state the language you are using, we can help.
Bert Posted July 4, 2007 Author Posted July 4, 2007 Sorry about that - inexperience talking here. Just trying to learn new stuff The Vollatran project My blog: http://www.vollysinterestingshit.com/
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