|
-
April 8th, 1999, 03:23 PM
#1
Why my CView derived class can't register a COleDropTarget?
I still can't register COleDropTarget, I had try it in my CView derived class, CFormView derived class and CListView derived class, register return a 0. I find the problem is :
BOOL COleDropTarget::Register(CWnd* pWnd)
{
ASSERT_VALID(this);
ASSERT(m_hWnd == NULL); // registering drop target twice?
ASSERT_VALID(pWnd);
LPUNKNOWN lpUnknown = (LPUNKNOWN)GetInterface(&IID_IUnknown);
ASSERT(lpUnknown != NULL);
// the object must be locked externally to keep LRPC connections alive
if (CoLockObjectExternal(lpUnknown, TRUE, FALSE) != S_OK)
>> return FALSE;
.
.
.
}
CoLockObjectExternal(lpUnknown, TRUE, FALSE) return a not S_OK, why? and how could I get it?
Thanks!!!
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
|