Rubberduck
Rubberduck copied to clipboard
COM module function returning HRESULT (eg. VBA function CDec) requires special handling in COM collector
CDec is defined as:
[helpcontext(0x0010645a)]
HRESULT _stdcall CDec(
[in] VARIANT* Expression,
[out, retval] VARIANT* pvar
);
Rubberduck currently reads the declaration as having 2 parameters, Expression and pvar, but VBA only exposes Function CDec(Expression).
That is, CDec returns an HRESULT and has an out parameter, so it looks like a property definition on a COM interface, but the Conversion module isn't an interface.
Rubberduck needs to special case the CDec function, and probably any other function in a COM module that returns an HRESULT (I haven't looked outside the VBA library so far).