Click here to Skip to main content
15,900,258 members
Home / Discussions / COM
   

COM

 
QuestionWorking with the Shell and an object in a virtual folder Pin
DeepT25-Apr-06 8:23
DeepT25-Apr-06 8:23 
QuestionCOM interface as a wrapper for MFC SDI Pin
kirannarik25-Apr-06 2:55
kirannarik25-Apr-06 2:55 
QuestionCOM Events Pin
HakunaMatada24-Apr-06 19:46
HakunaMatada24-Apr-06 19:46 
AnswerRe: COM Events Pin
Roger Stoltz24-Apr-06 22:24
Roger Stoltz24-Apr-06 22:24 
GeneralRe: COM Events Pin
HakunaMatada25-Apr-06 0:26
HakunaMatada25-Apr-06 0:26 
AnswerRe: COM Events Pin
Roger Stoltz25-Apr-06 1:45
Roger Stoltz25-Apr-06 1:45 
GeneralRe: COM Events Pin
HakunaMatada25-Apr-06 2:05
HakunaMatada25-Apr-06 2:05 
AnswerRe: COM Events Pin
Roger Stoltz25-Apr-06 3:20
Roger Stoltz25-Apr-06 3:20 
At first, I suggest you try to add a function to your dialog class that takes a pointer to the COM server as argument and let the dialog class save it as a member variable.
Use that member variable to call the Fire_ButtonClicked event.
This would be the simplest solution I ment earlier.

This may not work as you desire since you'll be stuck inside the COM server's DisplayMyMessage() routine, or rather the local message loop of DoModal(), and the COM library may complain about this when you try to fire the event.
If this is the case I suggest you start a worker thread from DisplayMyMessage() and pop up the dialog from that thread instead. To be able to fire events from a secondary thread inside a COM server you can use Micheal Lindig's solution[^] which I've used several times with great success. His solution lets you forget about what thread you're firing events from and will take care of the marshalling for you "automatically".
The down-side is a slight performance draw-back since the interface has to be unmarshalled and queried for every call, but it's usually managable and will work (if implemented correctlyCool | :cool: ).

Hope this helps
--
Roger


It's suppose to be hard, otherwise anybody could do it!
GeneralRe: COM Events Pin
HakunaMatada25-Apr-06 3:27
HakunaMatada25-Apr-06 3:27 
QuestionDouble-click on lnk file Pin
Samsung24-Apr-06 9:25
Samsung24-Apr-06 9:25 
Questionllo,Double-click on lnk file Pin
Samsung24-Apr-06 9:20
Samsung24-Apr-06 9:20 
QuestionCOM's Event! Pin
huangdingjun23-Apr-06 3:34
huangdingjun23-Apr-06 3:34 
AnswerRe: COM's Event! Pin
Stephen Hewitt23-Apr-06 13:39
Stephen Hewitt23-Apr-06 13:39 
GeneralRe: COM's Event! Pin
hdj831123-Apr-06 15:12
hdj831123-Apr-06 15:12 
GeneralRe: COM's Event! Pin
Stephen Hewitt23-Apr-06 16:08
Stephen Hewitt23-Apr-06 16:08 
GeneralRe: COM's Event! Pin
hdj831123-Apr-06 19:21
hdj831123-Apr-06 19:21 
Questionproblem with com events Pin
kk_mfc21-Apr-06 19:27
kk_mfc21-Apr-06 19:27 
AnswerRe: problem with com events Pin
Lim Bio Liong23-Apr-06 2:00
Lim Bio Liong23-Apr-06 2:00 
QuestionExceptions in CoUninitialize Pin
softwaremonkey21-Apr-06 0:05
softwaremonkey21-Apr-06 0:05 
AnswerRe: Exceptions in CoUninitialize Pin
Mike Dimmick21-Apr-06 0:40
Mike Dimmick21-Apr-06 0:40 
GeneralRe: Exceptions in CoUninitialize Pin
softwaremonkey21-Apr-06 2:04
softwaremonkey21-Apr-06 2:04 
AnswerRe: Exceptions in CoUninitialize Pin
User 21559721-Apr-06 0:47
User 21559721-Apr-06 0:47 
GeneralRe: Exceptions in CoUninitialize Pin
softwaremonkey21-Apr-06 1:59
softwaremonkey21-Apr-06 1:59 
Question.idl compilation errors Pin
scoroop20-Apr-06 3:47
scoroop20-Apr-06 3:47 
QuestionRe: .idl compilation errors Pin
prasad_som20-Apr-06 20:28
prasad_som20-Apr-06 20:28 

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.