Click here to Skip to main content
15,913,669 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Hiding MDI child window at startup, check the code please Pin
Brian Shifrin3-Sep-03 12:08
Brian Shifrin3-Sep-03 12:08 
GeneralAutomation server help needed Pin
Gilrock2-Sep-03 8:13
Gilrock2-Sep-03 8:13 
GeneralRe: Automation server help needed Pin
Brian Shifrin3-Sep-03 12:10
Brian Shifrin3-Sep-03 12:10 
GeneralRe: Automation server help needed Pin
Gilrock3-Sep-03 12:53
Gilrock3-Sep-03 12:53 
GeneralRe: Automation server help needed Pin
igor19603-Sep-03 13:48
igor19603-Sep-03 13:48 
GeneralRe: Automation server help needed Pin
Gilrock3-Sep-03 20:07
Gilrock3-Sep-03 20:07 
GeneralRe: Automation server help needed Pin
Gilrock4-Sep-03 6:10
Gilrock4-Sep-03 6:10 
GeneralRe: Automation server help needed Pin
igor19604-Sep-03 7:05
igor19604-Sep-03 7:05 
The final solution still seems a little crude to me. I had to change the dialog class so that it tracked how many automation connections were active from my Focuser interface class and the Focuser class destructor had to call the dialog's OnClose method which I have issuing a PostQuitMessage() if the number of connections is zero. I'm sure I probably have a race condition now.

Gil,
I don't know about PostQuitMessage(), because it suppose to exit your app message pump, but if you just use WM_CLOSE message send to your dialog -- I don't see any probability of race condition .
Remember, unless you have some Multithreaded InProc components inside of your server (which I think you don't have): all outproc OLE calls are coming to you on your worker(main) thread and through message queue. Therefore, OLE system absolutely cannot instantiate new instance of your server without your WM_CLOSE being completely processed.
At least, that's my understanding. But again, I maybe wrong (as usual).Big Grin | :-D

Regards


"...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..."
Me
GeneralRe: Automation server help needed Pin
Gilrock4-Sep-03 8:15
Gilrock4-Sep-03 8:15 
Generalfree(pMemory) Pin
ravingcoder2-Sep-03 8:11
ravingcoder2-Sep-03 8:11 
GeneralRe: free(pMemory) Pin
igor19602-Sep-03 8:15
igor19602-Sep-03 8:15 
GeneralRe: free(pMemory) Pin
ravingcoder2-Sep-03 8:24
ravingcoder2-Sep-03 8:24 
Generalexporting std::string Pin
Jim Crafton2-Sep-03 7:46
Jim Crafton2-Sep-03 7:46 
GeneralRe: exporting std::string Pin
cmk2-Sep-03 7:52
cmk2-Sep-03 7:52 
GeneralRe: exporting std::string Pin
Neville Franks2-Sep-03 10:01
Neville Franks2-Sep-03 10:01 
GeneralRe: exporting std::string Pin
Navin2-Sep-03 10:22
Navin2-Sep-03 10:22 
GeneralRe: exporting std::string Pin
cmk2-Sep-03 14:05
cmk2-Sep-03 14:05 
Generalunicode woes Pin
Jim Crafton2-Sep-03 7:08
Jim Crafton2-Sep-03 7:08 
GeneralRe: unicode woes Pin
cmk2-Sep-03 7:50
cmk2-Sep-03 7:50 
GeneralRe: unicode woes Pin
Jim Crafton2-Sep-03 8:07
Jim Crafton2-Sep-03 8:07 
GeneralRe: unicode woes Pin
cmk2-Sep-03 9:12
cmk2-Sep-03 9:12 
GeneralMultiple views and single document Pin
Binayak2-Sep-03 6:34
Binayak2-Sep-03 6:34 
GeneralRe: Multiple views and single document Pin
palbano2-Sep-03 7:25
palbano2-Sep-03 7:25 
GeneralVC++ / MSAccess Date Handling Pin
msdaug2-Sep-03 6:15
msdaug2-Sep-03 6:15 
GeneralRe: VC++ / MSAccess Date Handling Pin
palbano2-Sep-03 6:56
palbano2-Sep-03 6:56 

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.