devenum: Constify a variable

Robert Shearman rob at
Mon Apr 23 01:05:32 CDT 2007

Andrew Talbot wrote:
> Robert Shearman wrote:
>> Andrew Talbot wrote:
>>>   */
>>>  static HRESULT WINAPI DEVENUM_IClassFactory_CreateInstance(
>>>      LPCLASSFACTORY iface,
>>> -    LPUNKNOWN pUnkOuter,
>>> +    const IUnknown *pUnkOuter,
>>>      REFIID riid,
>>>      LPVOID *ppvObj)
>> I'm not sure what the point of this is.
> I'm just naively declaring that this function does not change the object to
> which this pointer points. Why do you consider it might be pointless in
> this case?

No code should be using the lpVtbl parameter directly (functions in it 
can be called using macros). Any code doing so is buggy, but I think 
you'll find it very difficult to make every parameter that uses COM 
objects const.

Rob Shearman

More information about the wine-devel mailing list