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

C / C++ / MFC

 
AnswerRe: performance of C,C++ programs Pin
Maximilien4-Apr-06 3:10
Maximilien4-Apr-06 3:10 
AnswerRe: performance of C,C++ programs Pin
Ștefan-Mihai MOGA4-Apr-06 3:11
professionalȘtefan-Mihai MOGA4-Apr-06 3:11 
AnswerRe: performance of C,C++ programs Pin
toxcct4-Apr-06 3:42
toxcct4-Apr-06 3:42 
QuestionMarshalling Pin
viperlogic4-Apr-06 2:36
viperlogic4-Apr-06 2:36 
AnswerRe: Marshalling Pin
Roger Stoltz4-Apr-06 3:03
Roger Stoltz4-Apr-06 3:03 
GeneralRe: Marshalling Pin
viperlogic4-Apr-06 3:22
viperlogic4-Apr-06 3:22 
GeneralRe: Marshalling Pin
YaronNir4-Apr-06 4:00
YaronNir4-Apr-06 4:00 
AnswerRe: Marshalling Pin
Roger Stoltz4-Apr-06 4:01
Roger Stoltz4-Apr-06 4:01 
viperlogic wrote:
so will i get away with using CoInitializeEx() with COINIT_MULTITRHEADED and not having to use marshalling?


In theory this is possible and usually requires the free-threaded-marshaler (FTM) and you also have to be aware that when your thread that created the server finishes it has to call ::CoUninitalize() which unloads the COM library for that thread which can get you into trouble.
It also depends on the server whether it supports free-threading or not.
The use of free-threading is usually complicated and not for the faint-hearted.

If you really want to create the server to be created in a secondary thread, I suggest you create the server and marshal the interface back to the main thread, or whatever thread you like, by ::CoMarshalInterThreadInterfaceInStream() and ::CoGetInterfaceAndReleaseStream().
You can alert the receiving thread by posting a message or setting an event informing the thread that the server is created and the interface can be retrieved with ::CoGetInterfaceAndReleaseStream().
This is not so complicated compared to free-threading. In other words: a good place to start.

N.B. since this kind of questions are COM related you should post in the COM forum instead.


Hope this helps
--
Roger


It's supposed to be hard, otherwise anybody could do it!
Questionproblem in OnDraw Pin
Anu_Bala4-Apr-06 2:34
Anu_Bala4-Apr-06 2:34 
AnswerRe: problem in OnDraw Pin
Cedric Moonen4-Apr-06 2:49
Cedric Moonen4-Apr-06 2:49 
AnswerRe: problem in OnDraw Pin
Hamid_RT4-Apr-06 3:15
Hamid_RT4-Apr-06 3:15 
Questionhardware identify in linux operating system Pin
ss20064-Apr-06 2:25
ss20064-Apr-06 2:25 
AnswerRe: hardware identify in linux operating system Pin
Ștefan-Mihai MOGA4-Apr-06 2:44
professionalȘtefan-Mihai MOGA4-Apr-06 2:44 
QuestionIs there any way to mix audio and video files? Pin
atimpoo4-Apr-06 2:10
atimpoo4-Apr-06 2:10 
AnswerRe: Is there any way to mix audio and video files? Pin
Ștefan-Mihai MOGA4-Apr-06 2:20
professionalȘtefan-Mihai MOGA4-Apr-06 2:20 
QuestionVisual Leak Detector Prob Pin
thepersonof4-Apr-06 1:32
thepersonof4-Apr-06 1:32 
AnswerRe: Visual Leak Detector Prob Pin
Cedric Moonen4-Apr-06 1:44
Cedric Moonen4-Apr-06 1:44 
GeneralRe: Visual Leak Detector Prob Pin
thepersonof4-Apr-06 1:51
thepersonof4-Apr-06 1:51 
GeneralRe: Visual Leak Detector Prob Pin
Cedric Moonen4-Apr-06 2:03
Cedric Moonen4-Apr-06 2:03 
GeneralRe: Visual Leak Detector Prob Pin
toxcct4-Apr-06 2:19
toxcct4-Apr-06 2:19 
GeneralRe: Visual Leak Detector Prob Pin
Cedric Moonen4-Apr-06 2:22
Cedric Moonen4-Apr-06 2:22 
AnswerRe: Visual Leak Detector Prob Pin
toxcct4-Apr-06 1:56
toxcct4-Apr-06 1:56 
QuestionHow can i listen to all IRP from PnP on USB port? Pin
fcoder4-Apr-06 0:43
fcoder4-Apr-06 0:43 
AnswerRe: How can i listen to all IRP from PnP on USB port? Pin
Cedric Moonen4-Apr-06 1:47
Cedric Moonen4-Apr-06 1:47 
AnswerRe: How can i listen to all IRP from PnP on USB port? Pin
kakan4-Apr-06 2:02
professionalkakan4-Apr-06 2: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.