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

COM

 
QuestionHow to disable script in my Browser Control Pin
rokia22-Jul-02 16:17
rokia22-Jul-02 16:17 
GeneralHELP: Composite Control Pin
minhhoang22-Jul-02 11:59
minhhoang22-Jul-02 11:59 
GeneralmsWord automation Pin
pnpfriend22-Jul-02 10:25
pnpfriend22-Jul-02 10:25 
GeneralEvent Sinking Interfaces Pin
QAU22-Jul-02 2:03
QAU22-Jul-02 2:03 
GeneralEvent Sinking Interfaces Pin
Anonymous22-Jul-02 2:02
Anonymous22-Jul-02 2:02 
GeneralThumbctl doesnt work. Pin
rokia21-Jul-02 17:18
rokia21-Jul-02 17:18 
GeneralRe: Thumbctl doesnt work. Pin
toon21-Jul-02 19:44
toon21-Jul-02 19:44 
GeneralThreaded COM object Pin
Jörgen Sigvardsson21-Jul-02 8:14
Jörgen Sigvardsson21-Jul-02 8:14 
I'm unsure if this is a "correct" solution (COM threading is still a bit mysterious to me):

* I have COM object which needs to live asynchronously from a certain point in time (i.e. after the host has called a "start" method)
* I want it to be able to send events to the host
* I want it to be able to serve the host at any time (i.e., the host should be able to call any method during the COM objects life time)

Is this is viable solution? (Pseudo-code follows)

coclass MyThreadedClass : ISomeInterface, IConnectionPointImpl<...> {
   STDMETHODIMP Start() {
       CreateThread(..., BootStrapFunc, this);
   }

   STDMETHODIMP Stop() {
       // Signal thread to quit and wait for it to finish
   }

private:
   static DWORD WINAPI BootStrapFunc(LPVOID param) {
       MyThreadedClass* pThis = (MyThreadedClass)param;
       pThis->ThreadLoop();
       return 0;
   }

   void ThreadLoop() {
       // Do stuff and generate events until told to quit...
   }
};


If I get this to work, there will be an article about it Smile | :)

FreeBSD is sexy.
<< This space for rent >>
GeneralRe: Threaded COM object Pin
Len Holgate21-Jul-02 12:10
Len Holgate21-Jul-02 12:10 
GeneralRe: Threaded COM object Pin
Jörgen Sigvardsson21-Jul-02 12:19
Jörgen Sigvardsson21-Jul-02 12:19 
GeneralRe: Threaded COM object Pin
Jörgen Sigvardsson21-Jul-02 13:05
Jörgen Sigvardsson21-Jul-02 13:05 
QuestionHave I understood COM correctly? Pin
Paul Ingles20-Jul-02 13:47
Paul Ingles20-Jul-02 13:47 
AnswerRe: Have I understood COM correctly? Pin
Noam Ben Haim24-Jul-02 3:55
Noam Ben Haim24-Jul-02 3:55 
QuestionMFC to ATL ???? Pin
Leesen19-Jul-02 18:03
Leesen19-Jul-02 18:03 
AnswerRe: MFC to ATL ???? Pin
Not Active20-Jul-02 16:07
mentorNot Active20-Jul-02 16:07 
GeneralRe: MFC to ATL ???? Pin
Leesen22-Jul-02 18:30
Leesen22-Jul-02 18:30 
AnswerRe: MFC to ATL ???? Pin
Vivek Rajan22-Jul-02 18:52
Vivek Rajan22-Jul-02 18:52 
GeneralClick function Pin
Al_Pennyworth19-Jul-02 8:11
Al_Pennyworth19-Jul-02 8:11 
GeneralActiveX assert Pin
joblemar19-Jul-02 0:50
sussjoblemar19-Jul-02 0:50 
Generalthumbnail using IExtractImage Pin
toon18-Jul-02 20:54
toon18-Jul-02 20:54 
GeneralRe: thumbnail using IExtractImage Pin
loket21-Jul-02 7:41
loket21-Jul-02 7:41 
QuestionAnyone with experience in out-of-proc COM servers? Pin
jfugate18-Jul-02 9:31
jfugate18-Jul-02 9:31 
AnswerRe: Anyone with experience in out-of-proc COM servers? Pin
soptest18-Jul-02 9:48
soptest18-Jul-02 9:48 
GeneralRe: Anyone with experience in out-of-proc COM servers? Pin
jfugate18-Jul-02 10:04
jfugate18-Jul-02 10:04 
GeneralRe: Anyone with experience in out-of-proc COM servers? Pin
soptest18-Jul-02 13:17
soptest18-Jul-02 13:17 

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.