Connection points and different process space 
Author Message
 Connection points and different process space

Hi,

  I'm using Ms Word automated from my application, and in
that instance of Ms Word, I insert from my app and ActiveX
control ( that I have developed with ATL).

  I my application I get the dispatch of my ActiveX
control....

  It's possible to connect to my sink interface in the
ActiveX control ? ( I mean, receive in my app, outgoing
events from the ActiveX), or is it impossible ?, I have
read that the implementation of the connection points in
ATL is not prepared for that? Is that true ?...

  A code snippet about what I want to do ( quite standard
thing...):

      COleVariant vClassType = "MySinkSvr.PruCon";  

      Word::InlineShapePtr pShp =  m_pWord->GetSelection()-

Quote:
>InlineShapes->AddOLEControl(vClassType);

      Word::OLEFormatPtr pFmt   = pShp->OLEFormat;

      TRY {
         LPDISPATCH pDispatch = pFmt->Object;
         m_pCon               = pFmt->Object;        

         m_pCliSink = new CCliSink;

         LPUNKNOWN pUnkSink = m_pCliSink->GetIDispatch
(FALSE);

         if(AfxConnectionAdvise(pDispatch,
DIID__IPruConEvents, pUnkSink,FALSE, &_dwCookie)) {
            TRACE("Success !");
         } else {
            TRACE("Failure !");
         }

      }

Can you help me ?, Thanks a lot, greetings
        Braulio



Sat, 13 Nov 2004 17:15:26 GMT  
 Connection points and different process space
This should work. At least there are no fundamental barriers preventing
it from working. What particular problem are you having?
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> Hi,

>   I'm using Ms Word automated from my application, and in
> that instance of Ms Word, I insert from my app and ActiveX
> control ( that I have developed with ATL).

>   I my application I get the dispatch of my ActiveX
> control....

>   It's possible to connect to my sink interface in the
> ActiveX control ? ( I mean, receive in my app, outgoing
> events from the ActiveX), or is it impossible ?, I have
> read that the implementation of the connection points in
> ATL is not prepared for that? Is that true ?...

>   A code snippet about what I want to do ( quite standard
> thing...):

>       COleVariant vClassType = "MySinkSvr.PruCon";

>       Word::InlineShapePtr pShp =  m_pWord->GetSelection()-
> >InlineShapes->AddOLEControl(vClassType);
>       Word::OLEFormatPtr pFmt   = pShp->OLEFormat;

>       TRY {
>          LPDISPATCH pDispatch = pFmt->Object;
>          m_pCon               = pFmt->Object;

>          m_pCliSink = new CCliSink;

>          LPUNKNOWN pUnkSink = m_pCliSink->GetIDispatch
> (FALSE);

>          if(AfxConnectionAdvise(pDispatch,
> DIID__IPruConEvents, pUnkSink,FALSE, &_dwCookie)) {
>             TRACE("Success !");
>          } else {
>             TRACE("Failure !");
>          }

>       }

> Can you help me ?, Thanks a lot, greetings
>         Braulio



Mon, 15 Nov 2004 04:21:23 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to move data between windows in different process spaces

2. Implementing connection point callbacks from a different thread

3. Connection points in different threads

4. Connection points in different threads

5. Connection Points - firing an event to a sink in another process

6. Connection Point Events Across Processes Boundaries?

7. Connection point Advice over process boundries

8. Connection Points and connection lost – what to do?

9. Utilizing ODBC to communicate two different processes on different machines

10. getting Images from Different Application space?

11. Loading native .dll in an exe process space

12. Multiple processes sharing data space. --- HELP

 

 
Powered by phpBB® Forum Software