File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -548,13 +548,13 @@ class DECLSPEC_UUID(CLSID_DRAGDROPSUPPORT) DragDropSupport : public RuntimeClass
548548 cfDropDescription = RegisterClipboardFormat (CFSTR_DROPDESCRIPTION);
549549 }
550550 if (!cfDropDescription) {
551- OutputDebugString (L" PyShellExt::DllMain - failed to get CFSTR_DROPDESCRIPTION format" );
551+ OutputDebugString (L" PyShellExt::DragDropSupport - failed to get CFSTR_DROPDESCRIPTION format" );
552552 }
553553 if (!cfDragWindow) {
554554 cfDragWindow = RegisterClipboardFormat (L" DragWindow" );
555555 }
556556 if (!cfDragWindow) {
557- OutputDebugString (L" PyShellExt::DllMain - failed to get DragWindow format" );
557+ OutputDebugString (L" PyShellExt::DragDropSupport - failed to get DragWindow format" );
558558 }
559559 }
560560
@@ -771,10 +771,13 @@ class DECLSPEC_UUID(CLSID_DRAGDROPSUPPORT) DragDropSupport : public RuntimeClass
771771 // IDropTarget implementation
772772
773773 STDMETHODIMP DragEnter (IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) {
774- HWND hwnd;
774+ HWND hwnd = NULL ;
775775
776776 OutputDebugString (L" PyShellExt::DragDropSupport::DragEnter" );
777777
778+ if (data_obj) {
779+ data_obj->Release ();
780+ }
778781 pDataObj->AddRef ();
779782 data_obj = pDataObj;
780783
@@ -794,10 +797,15 @@ class DECLSPEC_UUID(CLSID_DRAGDROPSUPPORT) DragDropSupport : public RuntimeClass
794797 }
795798
796799 STDMETHODIMP DragLeave () {
800+ if (data_obj) {
801+ data_obj->Release ();
802+ data_obj = NULL ;
803+ }
797804 return S_OK;
798805 }
799806
800807 STDMETHODIMP DragOver (DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) {
808+ *pdwEffect = DROPEFFECT_MOVE;
801809 return S_OK;
802810 }
803811
You can’t perform that action at this time.
0 commit comments