Page 1 of 1

MSHTML Com component error c504

Posted: 7 Mar 2014 9:08
by Tonton Luc
Hi,

After to create a new MSHTML Com component in my VP 7.3 project, I've this type of error :
How to solve it ?
mshtml\export\dispHTMLDocument_export.pro(246,20) error c504: The expression has type 'comDomains::variant', which is incompatible with the type 'comDomains::comVariant'

Code: Select all

% dispHTMLDocument_impl.i : predicates     get_AlinkColor : (comDomains::comVariant HResult) -> core::hResult HResult procedure (o) language stdcall. predicates     dispHTMLDocument_get_AlinkColor : () -> comDomains::variant Value.   % dispHTMLDocument_export.pro : clauses     get_AlinkColor(Value) = VipHR000 :- % !!! error here on Value         try             Value = implementation_fact:dispHTMLDocument_get_AlinkColor(),             VipHR000 = winErrors::s_ok         catch TraceId do             VipHR000 = catchHandler(TraceId)         end try.   % dispHTMLDocument_native_binary.i : predicates     get_AlinkColor : (comDomains::comVariant HResult) -> core::hResult HResult procedure (o) language stdcall.

Posted: 24 Mar 2014 15:56
by Thomas Linder Puls
Sorry, I must have missed this mail.

The generated code is (obviously) wrong.

However instead of fixing the code I suggest that you delete all those "export" files and their include directives that are not related to event listening.

I cannot remember how it is in the MSHTML, but I believe there are only a few interfaces related to event listening. I also believe they have names that are not starting with "i" and contains "Event".