DLL Concept Question
-
I've decided that the modular design of a DLL would be beneficial in a project I'm doing. I've read and followed the howto's and made the barebones DLL file and I've also read how to export data using __declspec (dllimport)/(dllexport). Like in the past, these howto's don't enhance my overall understanding, thus I am asking you, the reader. I've also read many different howto's to try and answer my own questions but each one seems to do things different from the rest so I don't have a clear picture of DLL's. I'd like to create a DLL that takes in some parameters like a username or password and a couple other things, possibly download information from the internet, process the information, then be available for queries on that information once processed. First, I don't see how I can "start the music" so to speak by initializing a class inside the DLL with data given to it. Second, can I run the processing using a thread inside the DLL? The information to process takes 30 seconds on average and I don't want to hang the main app while it works. If you can provide code examples even just as pseudocode, that would be much more informative than trying to explain it to me because I work best off of example.