Click here to Skip to main content
15,903,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: set high priority Pin
David Crow16-Nov-04 8:46
David Crow16-Nov-04 8:46 
GeneralStrange way of killing DLLHOST Pin
Federico Milano16-Nov-04 5:57
Federico Milano16-Nov-04 5:57 
GeneralExecuting a SQL Script Pin
Ivan Cachicatari16-Nov-04 4:45
Ivan Cachicatari16-Nov-04 4:45 
GeneralRe: Executing a SQL Script Pin
si_6916-Nov-04 5:21
si_6916-Nov-04 5:21 
GeneralRe: Executing a SQL Script Pin
Ivan Cachicatari20-Nov-04 4:07
Ivan Cachicatari20-Nov-04 4:07 
GeneralRe: Executing a SQL Script Pin
Antony M Kancidrowski16-Nov-04 6:13
Antony M Kancidrowski16-Nov-04 6:13 
GeneralProblems with CPropertySheet Pin
Ivan Cachicatari16-Nov-04 4:41
Ivan Cachicatari16-Nov-04 4:41 
GeneralCOM, Multithreaded Pin
Jon Hulatt16-Nov-04 4:35
Jon Hulatt16-Nov-04 4:35 
This may seem like an obvious question, but i'd like to check the answer with more experienced COM programmers nonetheless...

My app is a COM client (but not a server). I am calling CoInitializeEx , with the COINIT_MULTITHREADED flag, in my apps CWinApp::InitInstance() override.

My app also has worked threads which need to use COM objects too.

1. Should I be calling CoInitializeEx() in the worker thread too?

2. Is is "safe" to use interface pointers (with proper AddRef'ing) in my worker threads, where the pointers were gained from QueryInterface()/CoCreateInstance() in my main UI thread?

3. Or is (2) dependant on the individual COM object?

----

Last question is not COM related:-

4. Is it correct/ok for my worker thread to call SetWindowText() on a control in my dialog (whose message loop is the main, UI thread? Or am I risking deadlock? it seems to work; but should it work in all situations?


Thanks for the help

Jon

using System.Beer;

GeneralRe: COM, Multithreaded Pin
Antony M Kancidrowski16-Nov-04 5:54
Antony M Kancidrowski16-Nov-04 5:54 
GeneralDon’t expand CTreeCtrl on Right click… Pin
anderslundsgard16-Nov-04 3:56
anderslundsgard16-Nov-04 3:56 
GeneralRe: Don’t expand CTreeCtrl on Right click… Pin
BlackDice16-Nov-04 5:40
BlackDice16-Nov-04 5:40 
Questionis multiple inheritance possible?? Pin
namaskaaram16-Nov-04 3:48
namaskaaram16-Nov-04 3:48 
AnswerRe: is multiple inheritance possible?? Pin
Nemanja Trifunovic16-Nov-04 4:01
Nemanja Trifunovic16-Nov-04 4:01 
AnswerRe: is multiple inheritance possible?? Pin
David Crow16-Nov-04 4:07
David Crow16-Nov-04 4:07 
AnswerRe: is multiple inheritance possible?? Pin
Maximilien16-Nov-04 4:31
Maximilien16-Nov-04 4:31 
Questionhow do i change the color of the frame of a picture control??? Pin
namaskaaram16-Nov-04 3:45
namaskaaram16-Nov-04 3:45 
Generalregarding mouse events..... Pin
namaskaaram16-Nov-04 3:43
namaskaaram16-Nov-04 3:43 
GeneralRe: regarding mouse events..... Pin
Blake Miller16-Nov-04 4:43
Blake Miller16-Nov-04 4:43 
GeneralRe: regarding mouse events..... Pin
namaskaaram16-Nov-04 17:52
namaskaaram16-Nov-04 17:52 
GeneralRe: regarding mouse events..... Pin
Blake Miller17-Nov-04 4:05
Blake Miller17-Nov-04 4:05 
GeneralRe: regarding mouse events..... Pin
namaskaaram17-Nov-04 18:50
namaskaaram17-Nov-04 18:50 
GeneralRe: regarding mouse events..... Pin
Blake Miller18-Nov-04 4:04
Blake Miller18-Nov-04 4:04 
GeneralCoTaskMemAlloc and BITMAPINFO Pin
dmxdmxdmx0516-Nov-04 3:39
dmxdmxdmx0516-Nov-04 3:39 
GeneralRe: CoTaskMemAlloc and BITMAPINFO Pin
Blake Miller16-Nov-04 4:49
Blake Miller16-Nov-04 4:49 
Generalusing non-English languages in visual c++.... Pin
shah170116-Nov-04 3:11
shah170116-Nov-04 3:11 

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.