-
June 14th, 2012, 04:43 AM
#1
[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.
-
June 15th, 2012, 05:54 AM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|