"Marcus Meissner" <[EMAIL PROTECTED]> 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.