Click here to Skip to main content
15,890,527 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Where is printf? Pin
«_Superman_»10-Jun-09 15:25
professional«_Superman_»10-Jun-09 15:25 
GeneralRe: Where is printf? Pin
Gjm10-Jun-09 15:32
Gjm10-Jun-09 15:32 
QuestionRe: Where is printf? Pin
David Crow10-Jun-09 15:51
David Crow10-Jun-09 15:51 
GeneralRe: Where is printf? Pin
CPallini10-Jun-09 21:24
mveCPallini10-Jun-09 21:24 
QuestionWrong help file afxhelp.hm path in VC 6.0 SOLVED Pin
Vaclav_10-Jun-09 10:00
Vaclav_10-Jun-09 10:00 
AnswerRe: Wrong help file afxhelp.hm path in VC 6.0 Pin
Randor 10-Jun-09 10:42
professional Randor 10-Jun-09 10:42 
GeneralRe: Wrong help file afxhelp.hm path in VC 6.0 Pin
Vaclav_11-Jun-09 7:27
Vaclav_11-Jun-09 7:27 
QuestionSharing a singleton in an executable and a runtime DLL Pin
Dustin Henry10-Jun-09 6:50
Dustin Henry10-Jun-09 6:50 
Hi all,

I have recently run into a problem I was not expecting that stands to jeopardize quite a bit of work. Within my application I have a singleton system logging object that reads from and writes to an XML file. This application also loads several DLLs which in turn also need to be able to contribute to the system log. The problem is when the DLLs try to get a pointer to the singleton they are actually creating a new instance of the object rather than referencing the one that has already been created. This creates an obvious problem with concurrent file I/O.

My question is, is there any way around this? The design of this object is such that the only interface anyone has to this object is through global macros(i.e. LOG_ERROR("error happened")), which handle accessing the singleton, meaning simply passing a pointer into the DLL at creation time is not feasible.

Any help is greatly appreciated.

Thanks,
Dustin Henry
AnswerRe: Sharing a singleton in an executable and a runtime DLL Pin
Stuart Dootson10-Jun-09 8:40
professionalStuart Dootson10-Jun-09 8:40 
GeneralRe: Sharing a singleton in an executable and a runtime DLL Pin
Dustin Henry11-Jun-09 11:19
Dustin Henry11-Jun-09 11:19 
GeneralRe: Sharing a singleton in an executable and a runtime DLL Pin
Stuart Dootson11-Jun-09 22:09
professionalStuart Dootson11-Jun-09 22:09 
QuestionStructure Value is not getting updated Pin
sakthii10-Jun-09 4:59
sakthii10-Jun-09 4:59 
AnswerRe: Structure Value is not getting updated Pin
«_Superman_»10-Jun-09 5:18
professional«_Superman_»10-Jun-09 5:18 
AnswerRe: Structure Value is not getting updated Pin
Stephen Hewitt10-Jun-09 5:25
Stephen Hewitt10-Jun-09 5:25 
AnswerRe: Structure Value is not getting updated Pin
Roger Stoltz10-Jun-09 5:42
Roger Stoltz10-Jun-09 5:42 
AnswerRe: Structure Value is not getting updated Pin
Randor 10-Jun-09 6:05
professional Randor 10-Jun-09 6:05 
QuestionRe: Structure Value is not getting updated Pin
David Crow10-Jun-09 7:47
David Crow10-Jun-09 7:47 
AnswerRe: Structure Value is not getting updated Pin
sakthii10-Jun-09 20:14
sakthii10-Jun-09 20:14 
GeneralRe: Structure Value is not getting updated Pin
Cedric Moonen10-Jun-09 20:24
Cedric Moonen10-Jun-09 20:24 
GeneralRe: Structure Value is not getting updated Pin
sakthii11-Jun-09 0:30
sakthii11-Jun-09 0:30 
AnswerRe: Structure Value is not getting updated Pin
chirag_chauhan10-Jun-09 20:46
chirag_chauhan10-Jun-09 20:46 
QuestionMCF question Pin
Anderson Jogie10-Jun-09 4:38
Anderson Jogie10-Jun-09 4:38 
QuestionRe: MCF question Pin
Maximilien10-Jun-09 4:42
Maximilien10-Jun-09 4:42 
AnswerRe: MCF question Pin
Anderson Jogie10-Jun-09 4:55
Anderson Jogie10-Jun-09 4:55 
GeneralRe: MCF question Pin
David Crow10-Jun-09 5:02
David Crow10-Jun-09 5:02 

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.