Subject: bug#74312: 31.0.50; Cygw32 build break

From: Cecilio Pardo <[email-masked]>
Date: Thu, 14 Nov 2024 11:05:49 +0100

On 14/11/2024 10:39, Eli Zaretskii wrote:

>> This should fix the Photo application problem.
>>
>> I didn't expect ref counting to be needed for this, my bad.
> 
> Thanks.  Can you tell more about the root cause of the problem and how
> it is solved using reference counting?

w32_drop_target as a COM interface should implement reference counting 
through the methods AddRef and Release.

I didn't implement it (AddRef is a noop, Release frees all always) 
because I didn't expect to receive any AddRef calls besides the one we 
get when calling RegisterDragDrop.

When dragging files from the Photo application, AddRef and Release are 
called.  The application itselt in principle does not have access to the 
IDropTarget to call this methods. Or maybe I am very wrong here.

In any case, I should have implemented AddRef/Release, and my assumption 
was wrong.