Robert Shearman wrote:
- ULONG ref; /* reference counter for this object */
- LONG ref; /* reference counter for this object */
IUnknown_AddRef and IUnknown_Release both return ULONGs so it looks like you are just moving the problem elsewhere. I think you should be casting the values passed into Interlocked{Increment,Decrement} or find some other nicer way of preventing that warning, possibly by ignoring them or just turning off the -Wpointer-sign flag.
I don't think the reference count will get over MAXINT and it shouldn't go negative, so I can't see how this will cause a problem.
I already submitted a patch [1] to turn off -Wpointer-sign. Alexandre prefered that we fix the warnings.
Mike
[1] http://www.winehq.org/hypermail/wine-patches/2005/07/0003.html