请教COM Interop时com::ptr的用法....
用C++/CLI包装com对象,如果com声明为com::ptr类型,作为函数参数传递的时候要怎么写呢
msdn里说:
A com::ptr cannot be used directly as a function parameter; use a % (Tracking Reference) or a handle (^) instead.
A com::ptr cannot be directly returned from a function; use a handle instead.
不是太明白,求高手解释一下,比如有
com::ptr<ITfDocumentMgr> documentManager;
HRESULT AssociateFocus(HWND hwnd,ITfDocumentMgr* pdimNew,ITfDocumentMgr** ppdimPrev);
AssociateFocus的后两个参数应该怎么写?
第一次用C++/CLI,问题多多啊:(