Click here to Skip to main content
15,921,351 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Threads in MFC - trying to understand... Pin
David Crow17-Nov-05 8:56
David Crow17-Nov-05 8:56 
GeneralRe: Threads in MFC - trying to understand... Pin
charlieg17-Nov-05 9:00
charlieg17-Nov-05 9:00 
AnswerRe: Threads in MFC - trying to understand... Pin
Sheng Jiang 蒋晟17-Nov-05 12:44
Sheng Jiang 蒋晟17-Nov-05 12:44 
GeneralRe: Threads in MFC - trying to understand... Pin
charlieg17-Nov-05 13:55
charlieg17-Nov-05 13:55 
GeneralRe: Threads in MFC - trying to understand... Pin
Sheng Jiang 蒋晟17-Nov-05 14:17
Sheng Jiang 蒋晟17-Nov-05 14:17 
QuestionThread Safe Static Library Problem Pin
Federico Milano17-Nov-05 2:38
Federico Milano17-Nov-05 2:38 
AnswerRe: Thread Safe Static Library Problem Pin
Graham Bradshaw17-Nov-05 2:48
Graham Bradshaw17-Nov-05 2:48 
GeneralRe: Thread Safe Static Library Problem Pin
Federico Milano17-Nov-05 4:17
Federico Milano17-Nov-05 4:17 
Graham Bradshaw wrote:
Are you saying that you'll get two, simultaneous calls to DllMain with a dwReason of DLL_PROCESS_ATTACH?


No, I'm saying that if you need a client to call init(), init() could be called from multiple threads simultaneously. You can't enforce this by soft, I think.

I know that DllMain is called only once with a dwReason of DLL_PROCESS_ATTACH for a process that loads that dll, but what if I want to link my library statically? DllMain will not be called and I can't use static objects (because of initialization order issues) and the init() method is unsafe, what should I do?

Of course I can solve this with the DllMain thing, not linking statically, but I wanted something more OS independent...

Thanks,

Federico
AnswerRe: Thread Safe Static Library Problem Pin
Tim Smith17-Nov-05 3:01
Tim Smith17-Nov-05 3:01 
AnswerRe: Thread Safe Static Library Problem Pin
James R. Twine17-Nov-05 6:09
James R. Twine17-Nov-05 6:09 
QuestionCHtmlView problem ? Pin
kendao17-Nov-05 2:34
kendao17-Nov-05 2:34 
AnswerRe: CHtmlView problem ? Pin
Sheng Jiang 蒋晟17-Nov-05 12:47
Sheng Jiang 蒋晟17-Nov-05 12:47 
QuestionCImageList question? Pin
followait17-Nov-05 0:39
followait17-Nov-05 0:39 
AnswerRe: CImageList question? Pin
Rage17-Nov-05 1:13
professionalRage17-Nov-05 1:13 
GeneralRe: CImageList question? Pin
followait17-Nov-05 3:18
followait17-Nov-05 3:18 
GeneralRe: CImageList question? Pin
Rage17-Nov-05 5:54
professionalRage17-Nov-05 5:54 
QuestionJavaScript from ActiveX Control Pin
Priyank Bolia17-Nov-05 0:30
Priyank Bolia17-Nov-05 0:30 
AnswerRe: JavaScript from ActiveX Control Pin
Eytukan17-Nov-05 3:03
Eytukan17-Nov-05 3:03 
GeneralRe: JavaScript from ActiveX Control Pin
Sheng Jiang 蒋晟17-Nov-05 12:47
Sheng Jiang 蒋晟17-Nov-05 12:47 
GeneralRe: JavaScript from ActiveX Control Pin
ThatsAlok17-Nov-05 21:44
ThatsAlok17-Nov-05 21:44 
GeneralRe: JavaScript from ActiveX Control Pin
Sheng Jiang 蒋晟18-Nov-05 2:51
Sheng Jiang 蒋晟18-Nov-05 2:51 
QuestionType of an Object Pin
romuzu16-Nov-05 23:20
romuzu16-Nov-05 23:20 
AnswerRe: Type of an Object Pin
Gizzo16-Nov-05 23:49
Gizzo16-Nov-05 23:49 
AnswerRe: Type of an Object Pin
followait17-Nov-05 0:46
followait17-Nov-05 0:46 
AnswerRe: Type of an Object Pin
David Crow17-Nov-05 2:39
David Crow17-Nov-05 2:39 

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.