ole32: Don't release the drop target on process uninitialisation if not revoked, just release the memory.
This commit is contained in:
parent
d5c6c64bfc
commit
4cd064aeb4
|
@ -149,7 +149,7 @@ extern void OLEClipbrd_Initialize(void);
|
||||||
static void OLEDD_Initialize(void);
|
static void OLEDD_Initialize(void);
|
||||||
static DropTargetNode* OLEDD_FindDropTarget(
|
static DropTargetNode* OLEDD_FindDropTarget(
|
||||||
HWND hwndOfTarget);
|
HWND hwndOfTarget);
|
||||||
static void OLEDD_FreeDropTarget(DropTargetNode*);
|
static void OLEDD_FreeDropTarget(DropTargetNode*, BOOL);
|
||||||
static LRESULT WINAPI OLEDD_DragTrackerWindowProc(
|
static LRESULT WINAPI OLEDD_DragTrackerWindowProc(
|
||||||
HWND hwnd,
|
HWND hwnd,
|
||||||
UINT uMsg,
|
UINT uMsg,
|
||||||
|
@ -355,7 +355,7 @@ HRESULT WINAPI RevokeDragDrop(
|
||||||
if (dropTargetInfo==NULL)
|
if (dropTargetInfo==NULL)
|
||||||
return DRAGDROP_E_NOTREGISTERED;
|
return DRAGDROP_E_NOTREGISTERED;
|
||||||
|
|
||||||
OLEDD_FreeDropTarget(dropTargetInfo);
|
OLEDD_FreeDropTarget(dropTargetInfo, TRUE);
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -1896,10 +1896,10 @@ static void OLEDD_Initialize(void)
|
||||||
*
|
*
|
||||||
* Frees the drag and drop data structure
|
* Frees the drag and drop data structure
|
||||||
*/
|
*/
|
||||||
static void OLEDD_FreeDropTarget(DropTargetNode *dropTargetInfo)
|
static void OLEDD_FreeDropTarget(DropTargetNode *dropTargetInfo, BOOL release_drop_target)
|
||||||
{
|
{
|
||||||
list_remove(&dropTargetInfo->entry);
|
list_remove(&dropTargetInfo->entry);
|
||||||
IDropTarget_Release(dropTargetInfo->dropTarget);
|
if (release_drop_target) IDropTarget_Release(dropTargetInfo->dropTarget);
|
||||||
HeapFree(GetProcessHeap(), 0, dropTargetInfo);
|
HeapFree(GetProcessHeap(), 0, dropTargetInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1915,9 +1915,8 @@ void OLEDD_UnInitialize(void)
|
||||||
*/
|
*/
|
||||||
while (!list_empty(&targetListHead))
|
while (!list_empty(&targetListHead))
|
||||||
{
|
{
|
||||||
DropTargetNode* curNode;
|
DropTargetNode* curNode = LIST_ENTRY(list_head(&targetListHead), DropTargetNode, entry);
|
||||||
curNode = LIST_ENTRY(list_head(&targetListHead), DropTargetNode, entry);
|
OLEDD_FreeDropTarget(curNode, FALSE);
|
||||||
OLEDD_FreeDropTarget(curNode);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue