Rubberduck icon indicating copy to clipboard operation
Rubberduck copied to clipboard

COM module function returning HRESULT (eg. VBA function CDec) requires special handling in COM collector

Open ThunderFrame opened this issue 8 years ago • 1 comments

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).

ThunderFrame avatar Jun 10 '17 12:06 ThunderFrame