CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2012
    Posts
    22

    [RESOLVED] Moniker >>>> _ApplicationPtr?

    Hi!

    I have a Moniker from ROT that points on desirable process. And I have an _ApplicationPtr var to perfom some actions with running application. HOWTO make my _ApplicationPtr var to be associated with process from Moniker?

    Thanks in advance!


    Tried like this:

    Code:
    hr = spMoniker->BindToObject(NULL, NULL, IID_IDispatch, (void**)&pDisp);
    Word::_ApplicationPtr word(pDisp);
    word remains "empty"(
    Last edited by 330xi; June 14th, 2012 at 04:49 AM.

  2. #2
    Join Date
    May 2012
    Posts
    22

    Done

    For perfoming such operation I used Method QueryInterface:

    Code:
    m_pDocDisp->QueryInterface(__uuidof( Word::_Application), (void **)&myApp);
    Where myApp is _ApplicationPtr
    m_pDocDisp is IDispatch, got from iterating the ROT (example)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured