16 May
2005
16 May
'05
1:29 a.m.
"Marcus Meissner" <marcus(a)jet.franken.de> wrote:
/*** + * This implements the IUnknown method AddRef for this + * class + */ +static ULONG WINAPI HGLOBALStreamImpl_AddRef( + IStream* iface) +{ + HGLOBALStreamImpl* const This=(HGLOBALStreamImpl*)iface; + return InterlockedIncrement(&This->ref); +}
I understand that this is an existing code, but calling InterlockedIncrement for a 'const' pointer looks very suspicious. Same for HGLOBALStreamImpl_Release, HGLOBALStreamImpl_Read and other interfaces which actually change the pointed data. -- Dmitry.