Click here to Skip to main content
15,902,840 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: delete this Pin
jhwurmbach18-Oct-07 21:40
jhwurmbach18-Oct-07 21:40 
GeneralRe: delete this Pin
Sameerkumar Namdeo18-Oct-07 22:03
Sameerkumar Namdeo18-Oct-07 22:03 
GeneralRe: delete this Pin
George_George18-Oct-07 23:01
George_George18-Oct-07 23:01 
AnswerRe: delete this Pin
Roger Stoltz18-Oct-07 22:08
Roger Stoltz18-Oct-07 22:08 
GeneralRe: delete this Pin
George_George18-Oct-07 22:59
George_George18-Oct-07 22:59 
GeneralRe: delete this Pin
Roger Stoltz18-Oct-07 23:09
Roger Stoltz18-Oct-07 23:09 
GeneralRe: delete this Pin
George_George19-Oct-07 3:52
George_George19-Oct-07 3:52 
QuestionDllMain Pin
George_George18-Oct-07 20:53
George_George18-Oct-07 20:53 
Hello everyone,


From MSDN,

http://msdn2.microsoft.com/en-us/library/ms682583.aspx

parameter fdwReason of DllMain has four values,

DLL_PROCESS_ATTACH
DLL_PROCESS_DETACH
DLL_THREAD_ATTACH
DLL_THREAD_DETACH

I think we could simply understand what MSDN described about the four values in the following way after some experiment (I have read the big table and want to extract some brief and simple information to understand to remember),

DLL_PROCESS_ATTACH: will be called only once when the process loads the DLL for the 1st time
DLL_PROCESS_DETACH: will be called only once when the process unloads the DLL (when process stops)
DLL_THREAD_ATTACH: will be called every time when a thread inside the current process loads the DLL
DLL_THREAD_DETACH: will be called every time when a thread inside the current process unloads the DLL

Is that correct understanding?


thanks in advance,
George
AnswerRe: DllMain Pin
aks.18-Oct-07 22:00
aks.18-Oct-07 22:00 
GeneralRe: DllMain Pin
George_George18-Oct-07 22:40
George_George18-Oct-07 22:40 
GeneralRe: DllMain Pin
Matthew Faithfull18-Oct-07 22:58
Matthew Faithfull18-Oct-07 22:58 
GeneralRe: DllMain Pin
George_George19-Oct-07 4:00
George_George19-Oct-07 4:00 
AnswerRe: DllMain Pin
Nibu babu thomas18-Oct-07 23:20
Nibu babu thomas18-Oct-07 23:20 
GeneralRe: DllMain Pin
George_George19-Oct-07 3:57
George_George19-Oct-07 3:57 
QuestionHow to create namespace? Pin
TooShy2Talk18-Oct-07 20:48
TooShy2Talk18-Oct-07 20:48 
AnswerRe: How to create namespace? Pin
Cedric Moonen18-Oct-07 20:51
Cedric Moonen18-Oct-07 20:51 
QuestionRe: How to create namespace? Pin
TooShy2Talk18-Oct-07 21:00
TooShy2Talk18-Oct-07 21:00 
AnswerRe: How to create namespace? Pin
Cedric Moonen18-Oct-07 21:05
Cedric Moonen18-Oct-07 21:05 
GeneralRe: How to create namespace? Pin
TooShy2Talk18-Oct-07 21:31
TooShy2Talk18-Oct-07 21:31 
GeneralRe: How to create namespace? Pin
Cedric Moonen18-Oct-07 21:54
Cedric Moonen18-Oct-07 21:54 
GeneralRe: How to create namespace? Pin
Cedric Moonen18-Oct-07 21:57
Cedric Moonen18-Oct-07 21:57 
AnswerRe: How to create namespace? Pin
Hamid_RT18-Oct-07 21:30
Hamid_RT18-Oct-07 21:30 
Questionerror in filestream in VC8 Pin
beegu18-Oct-07 19:01
beegu18-Oct-07 19:01 
AnswerRe: error in filestream in VC8 Pin
User 58385218-Oct-07 19:31
User 58385218-Oct-07 19:31 
QuestionCan I write a program that's spinned on the desktop, just like wallpaper? Pin
code_discuss18-Oct-07 16:47
code_discuss18-Oct-07 16:47 

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.