Click here to Skip to main content
15,920,603 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDLL Question Pin
Programm3r13-Mar-07 4:41
Programm3r13-Mar-07 4:41 
AnswerRe: DLL Question Pin
CPallini13-Mar-07 4:53
mveCPallini13-Mar-07 4:53 
QuestionRe: DLL Question Pin
Programm3r13-Mar-07 4:58
Programm3r13-Mar-07 4:58 
AnswerRe: DLL Question Pin
Cedric Moonen13-Mar-07 5:02
Cedric Moonen13-Mar-07 5:02 
GeneralRe: DLL Question Pin
Programm3r13-Mar-07 5:20
Programm3r13-Mar-07 5:20 
AnswerRe: DLL Question Pin
Roger Stoltz13-Mar-07 5:10
Roger Stoltz13-Mar-07 5:10 
GeneralRe: DLL Question Pin
Programm3r13-Mar-07 5:22
Programm3r13-Mar-07 5:22 
AnswerRe: DLL Question Pin
CPallini13-Mar-07 5:16
mveCPallini13-Mar-07 5:16 
Programm3r wrote:
But the other thing is after the function call will the dll still reside in memory?


Oh YES, of course...

The OS loader may discard the DLL if the process detaches from. For an ordinary DLL, if the process implicitely links with (e.g. you have used the DLL's *.lib as input for the LINKER; this is the most common way...) the detaching happens on process termination; on the other hand, if the process explicitely links with (via LoadLibrary call), then the process can, at any time, discard the library by means of the corrensponding FreeLibrary call.

COM uses a completely different approach, a component DLL may be discarded by the COM when the component it's no more needed, i.e. when the reference count of the component reaches 0 (see life cycle of COM components in MSDN, however, basically, calling Release() on a COM pointer, allows COM to discard the related DLL).


Hope that helps
Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

GeneralRe: DLL Question Pin
Programm3r13-Mar-07 5:23
Programm3r13-Mar-07 5:23 
Generalyou're welcome. Pin
CPallini13-Mar-07 6:10
mveCPallini13-Mar-07 6:10 
GeneralRe: DLL Question Pin
Eytukan13-Mar-07 6:59
Eytukan13-Mar-07 6:59 
GeneralRe: DLL Question Pin
toxcct13-Mar-07 8:01
toxcct13-Mar-07 8:01 
GeneralRe: DLL Question Pin
Eytukan13-Mar-07 16:59
Eytukan13-Mar-07 16:59 
GeneralRe: DLL Question Pin
ThatsAlok15-Mar-07 1:47
ThatsAlok15-Mar-07 1:47 
QuestionSave struct to right map? Pin
bosfan13-Mar-07 4:40
bosfan13-Mar-07 4:40 
AnswerRe: Save struct to right map? Pin
Maximilien13-Mar-07 4:51
Maximilien13-Mar-07 4:51 
GeneralRe: Save struct to right map? Pin
Roger Stoltz13-Mar-07 5:01
Roger Stoltz13-Mar-07 5:01 
GeneralRe: Save struct to right map? Pin
bob1697213-Mar-07 7:12
bob1697213-Mar-07 7:12 
GeneralRe: Save struct to right map? Pin
Roger Stoltz13-Mar-07 22:55
Roger Stoltz13-Mar-07 22:55 
GeneralRe: Save struct to right map? Pin
bob1697214-Mar-07 5:05
bob1697214-Mar-07 5:05 
AnswerRe: Save struct to right map? Pin
James R. Twine13-Mar-07 5:11
James R. Twine13-Mar-07 5:11 
QuestionVista using System32/MSVCRT.DLL Pin
benny232313-Mar-07 4:25
benny232313-Mar-07 4:25 
AnswerRe: Vista using System32/MSVCRT.DLL Pin
James R. Twine13-Mar-07 5:07
James R. Twine13-Mar-07 5:07 
Questioninsert for STL Pin
prithaa13-Mar-07 3:47
prithaa13-Mar-07 3:47 
AnswerRe: insert for STL Pin
toxcct13-Mar-07 3:49
toxcct13-Mar-07 3:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.