Simple Dynamc Linked Library Loading
Posted on 2002-04-24
i'm just learning how to use MFC dlls. The dlls that i have created have a CWinApp class. I was reading through MSDN, and it said that i should put my init code in the InitInstance function of my MFC dll. It said that this function was invoked by the DllMain function handled by MFC. i just want to get the basics of getting my dll working. I've searched the internet and MSDN and have found no tutorials [i'm sure they're there and if you know of a good like that would be great.]
I want to be able to just load a dll and have it preform some action [just to prove it opened, like showing a messagebox.] Do I need to export my functions with the MFC dll? When does my InitInstance function get called? Where should i put the body code of my dll [in an exported function?]. I would appreciate having this subject which is quite cloudy to me, cleared up.