|
-
April 20th, 2008, 11:00 PM
#1
Dll linking
From MSDN:
Visual C++
Determining Which Linking Method to Use
There is a sentence in the "two hazards of explicit linking to be aware of" saying:
Explicit linking can cause problems if the DLL is using a DllMain function to perform initialization for each thread of a process because threads existing when LoadLibrary (or AfxLoadLibrary) is called will not be initialized.
I think this hazard also happens in Implicit linking, won't just happen in Explicit linking. Because if the DllMain() is used for some thread-dependent initialization, then using Implicit linking will also encounter that. (If the dll is already in some other thread, it also won't get called!)
Would like to confirm this w/ gurus here. Thanks for sharing your knowledge.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|