Click here to Skip to main content
15,914,071 members
Home / Discussions / COM
   

COM

 
GeneralRe: the Invoke() method ? Pin
necroleak14-Sep-04 20:25
sussnecroleak14-Sep-04 20:25 
GeneralRe: the Invoke() method ? Pin
necroleak14-Sep-04 21:19
sussnecroleak14-Sep-04 21:19 
Generalqweqe Pin
Kanagu_INDIAN13-Sep-04 18:55
Kanagu_INDIAN13-Sep-04 18:55 
GeneralRe: qweqe Pin
ThatsAlok3-Nov-04 17:49
ThatsAlok3-Nov-04 17:49 
Questionhow can i add the button? Pin
wywyongwei13-Sep-04 17:04
wywyongwei13-Sep-04 17:04 
AnswerRe: how can i add the button? Pin
ThatsAlok3-Nov-04 17:53
ThatsAlok3-Nov-04 17:53 
QuestionHowto make basic ActiveX component in c++ with...? Pin
H.F13-Sep-04 14:08
H.F13-Sep-04 14:08 
GeneralMFC + COM + ActiveX Controls... Pin
herbert_chow13-Sep-04 10:00
herbert_chow13-Sep-04 10:00 
Hi,

I am developing an MFC MDI doc/view based application that uses a COM server object. The application's GUI also uses ActiveX controls for displaying data in graphs.

At first, I called ::CoInitializeEx(NULL, COINIT_MULTITHREADED); in my CWinApp derived class's InitInstance() function to initialize COM. Using this method I can make method calls to my COM server from the main application or within threads created by the main application.

However, when I added an ActiveX control to one of the views, it would ASSERT that a hwnd pointer was NULL and then show the message "An unsupported operation was attempted." after pressing ignore 3 times. It seems that the ActiveX control has trouble creating itself.

This problem was fixed by changing CoInitializeEx to AfxOleInit() (Thanks to Michael Dunn's article on COM), and after that, the ActiveX controls can show themselves without a hitch, but now any method call to my COM server from within threads won't work beacuse I did not initialize COM with COINIT_MULTITHREADED.

So my question is this: How do I use ActiveX controls and be able to call my COM server from multiple threads?

Any help would be greatly appreciated.

Thanks!


GeneralActiveX download progress Pin
AssemblySoft13-Sep-04 7:03
AssemblySoft13-Sep-04 7:03 
GeneralOleview blocks ActiveDesktop object Pin
Ingo Uwe13-Sep-04 5:03
Ingo Uwe13-Sep-04 5:03 
GeneralLogging Component Pin
Anonymous13-Sep-04 1:11
Anonymous13-Sep-04 1:11 
GeneralActiveX control install Pin
AssemblySoft12-Sep-04 23:12
AssemblySoft12-Sep-04 23:12 
GeneralRe: ActiveX control install Pin
Balkrishna Talele16-Sep-04 18:58
Balkrishna Talele16-Sep-04 18:58 
GeneralRe: ActiveX control install Pin
AssemblySoft16-Sep-04 22:58
AssemblySoft16-Sep-04 22:58 
GeneralInstall an add-in Pin
Anonymous12-Sep-04 20:23
Anonymous12-Sep-04 20:23 
Questionthe Invoke() method ? Pin
necroleak12-Sep-04 4:07
sussnecroleak12-Sep-04 4:07 
AnswerRe: the Invoke() method ? Pin
necroleak12-Sep-04 4:09
sussnecroleak12-Sep-04 4:09 
AnswerRe: the Invoke() method ? Pin
Jörgen Sigvardsson12-Sep-04 9:08
Jörgen Sigvardsson12-Sep-04 9:08 
GeneralCreating A sample COM with VB6.0 Pin
Shanazhi11-Sep-04 2:38
Shanazhi11-Sep-04 2:38 
GeneralAdding ActiveX control in ActiveX control Project Pin
Muhammad Azam9-Sep-04 4:14
Muhammad Azam9-Sep-04 4:14 
GeneralRe: Adding ActiveX control in ActiveX control Project Pin
herbert_chow10-Sep-04 7:46
herbert_chow10-Sep-04 7:46 
GeneralRe: Adding ActiveX control in ActiveX control Project Pin
Muhammad Azam12-Sep-04 18:51
Muhammad Azam12-Sep-04 18:51 
GeneralThread Safety Problem Pin
.Suchit9-Sep-04 3:17
.Suchit9-Sep-04 3:17 
GeneralRe: Thread Safety Problem Pin
Jörgen Sigvardsson12-Sep-04 9:21
Jörgen Sigvardsson12-Sep-04 9:21 
GeneralRe: Thread Safety Problem Pin
.Suchit14-Sep-04 4:06
.Suchit14-Sep-04 4:06 

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.