DLL being freed
-
Hello, I am loading a dll from an app (.exe) and it has to remain in memory after the app terminates execution. Well, the problem i've been having consists in that whenever the app stops running, the dll is automatically freed (possibly because it is associated with the creating thread/instance.) How can I prevent this from happening? I mean, how can I make the Dll remain in memory until it receives a notification saying it can terminate? Thanks, Dave BTW: it is a dll with MFC support...
-
Hello, I am loading a dll from an app (.exe) and it has to remain in memory after the app terminates execution. Well, the problem i've been having consists in that whenever the app stops running, the dll is automatically freed (possibly because it is associated with the creating thread/instance.) How can I prevent this from happening? I mean, how can I make the Dll remain in memory until it receives a notification saying it can terminate? Thanks, Dave BTW: it is a dll with MFC support...
dNimrod#X wrote: I am loading a dll from an app (.exe) and it has to remain in memory after the app terminates execution. And do what exactly ? The dll is just a bunch of functions, the exe is the main thread of execution. What are to trying to accomplish ? ...cmk Save the whales - collect the whole set
-
Hello, I am loading a dll from an app (.exe) and it has to remain in memory after the app terminates execution. Well, the problem i've been having consists in that whenever the app stops running, the dll is automatically freed (possibly because it is associated with the creating thread/instance.) How can I prevent this from happening? I mean, how can I make the Dll remain in memory until it receives a notification saying it can terminate? Thanks, Dave BTW: it is a dll with MFC support...
dNimrod#X wrote: how can I make the Dll remain in memory until it receives a notification saying it can terminate? What you're asking doesn't make sense. By definition, a DLL is a library - it is an extension to an application. It makes no sense to have a library in memory without an application using it. Basically, you can't do this. Windows automatically frees all libraries when you close your application. There is nothing you can do about it, by design. If you want your DLL to stay in memory, your application has to stay in memory as well.
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
-
Hello, I am loading a dll from an app (.exe) and it has to remain in memory after the app terminates execution. Well, the problem i've been having consists in that whenever the app stops running, the dll is automatically freed (possibly because it is associated with the creating thread/instance.) How can I prevent this from happening? I mean, how can I make the Dll remain in memory until it receives a notification saying it can terminate? Thanks, Dave BTW: it is a dll with MFC support...