Click here to Skip to main content
15,921,716 members
Home / Discussions / COM
   

COM

 
Questionwhy to put extern C before const IID? Pin
Lane Yu1-Dec-05 23:32
Lane Yu1-Dec-05 23:32 
AnswerRe: why to put extern C before const IID? Pin
Marco M.6-Dec-05 8:33
Marco M.6-Dec-05 8:33 
Questionis it possible to Call web-service from COM component? Pin
Amol Ravatale29-Nov-05 18:34
Amol Ravatale29-Nov-05 18:34 
AnswerRe: is it possible to Call web-service from COM component? Pin
Lim Bio Liong29-Nov-05 19:06
Lim Bio Liong29-Nov-05 19:06 
GeneralServiced Component, Excel and OleDbConnection.Open Pin
Turtle Hand28-Nov-05 9:45
Turtle Hand28-Nov-05 9:45 
GeneralRe: Serviced Component, Excel and OleDbConnection.Open Pin
Turtle Hand1-Dec-05 4:14
Turtle Hand1-Dec-05 4:14 
QuestionEvent sink in MFC-program - Thread problem? Pin
-Tom-26-Nov-05 4:25
-Tom-26-Nov-05 4:25 
AnswerRe: Event sink in MFC-program - Thread problem? Pin
Roger Stoltz5-Dec-05 5:27
Roger Stoltz5-Dec-05 5:27 
It depends on how the following questions get answered...

Do you get the events at all?
I assume you do.

Are you runing both the server and the client on the same machine?
If not, try doing because it's sp much easier to debug.

How have you initialized COM in your client? STA, MTA or free-threaded?

I guess the "hidden window" in the server is a UI-thread.
How is COM initialized in that thread?
Try STA if you haven't done so already.
Is the interface marshalled properly since the call is made fram a different apartment?

If you have multiple threads accessing the same data it shall always be protected with some kind of mutual exclusion. I prefer critical sections.

If your client initializes COM as a STA and all interfaces are properly marshalled, your event sink should get called from the one and only thread in your client by the proxy which performs a SendMessage in the background to the apartment thread.
This would be the simple and most straight-forward way to go, but could cause some performance bottle-necks that may require a rewrite to using a multithreaded or free-threaded solution.

Hope this helps
--
Roger


It's supposed to be hard, otherwise anybody could do it!
QuestionPorting Win32/COM to Linux Pin
Jnewg526-Nov-05 1:24
Jnewg526-Nov-05 1:24 
AnswerRe: Porting Win32/COM to Linux Pin
Jörgen Sigvardsson26-Nov-05 12:55
Jörgen Sigvardsson26-Nov-05 12:55 
QuestionGetUIObjectOf for objects on different drives Pin
yarp25-Nov-05 2:35
yarp25-Nov-05 2:35 
QuestionWord automation problem with C++ Pin
panzerdivisionmarkus24-Nov-05 1:47
panzerdivisionmarkus24-Nov-05 1:47 
AnswerRe: Word automation problem with C++ Pin
JonEngle6-Dec-05 18:55
JonEngle6-Dec-05 18:55 
QuestionHow to pass a object of a .NET user defined type to a COM in VC++? Pin
Diana Fernandez23-Nov-05 18:09
Diana Fernandez23-Nov-05 18:09 
AnswerRe: How to pass a object of a .NET user defined type to a COM in VC++? Pin
Gizzo24-Nov-05 6:11
Gizzo24-Nov-05 6:11 
GeneralRe: How to pass a object of a .NET user defined type to a COM in VC++? Pin
Diana Fernandez24-Nov-05 20:11
Diana Fernandez24-Nov-05 20:11 
GeneralRe: How to pass a object of a .NET user defined type to a COM in VC++? Pin
Gizzo24-Nov-05 21:25
Gizzo24-Nov-05 21:25 
GeneralRe: How to pass a object of a .NET user defined type to a COM in VC++? Pin
Diana Fernandez24-Nov-05 22:43
Diana Fernandez24-Nov-05 22:43 
GeneralRe: How to pass a object of a .NET user defined type to a COM in VC++? Pin
Gizzo24-Nov-05 23:12
Gizzo24-Nov-05 23:12 
GeneralRe: How to pass a object of a .NET user defined type to a COM in VC++? Pin
Jörgen Sigvardsson25-Nov-05 9:04
Jörgen Sigvardsson25-Nov-05 9:04 
GeneralRe: How to pass a object of a .NET user defined type to a COM in VC++? Pin
Diana Fernandez27-Nov-05 18:48
Diana Fernandez27-Nov-05 18:48 
QuestionOleRun freezes Pin
WernerP23-Nov-05 1:42
WernerP23-Nov-05 1:42 
QuestionShell Extensions in win2003 64-bit Pin
ragavan22-Nov-05 22:08
ragavan22-Nov-05 22:08 
Questionm_hWnd is missing while using the ActiveX Pin
Maddie from Dartford22-Nov-05 19:37
Maddie from Dartford22-Nov-05 19:37 
QuestionPass javascript function to ActiveX member in C# Pin
write_to_billy20-Nov-05 20:19
write_to_billy20-Nov-05 20:19 

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.