HTMLhelpRouter won't compile on XE7

This section is for programmers. Please use it for all discussons on interfacing help with your applications and related subjects.

Moderators: Alexander Halser, Michael Schwarzl

Post Reply
JurgenB
Posts: 6
Joined: Wed Feb 20, 2008 12:36 am

HTMLhelpRouter won't compile on XE7

Unread post by JurgenB »

I am trying to use HTMLhelpRouter in Delphi XE7
and get a strange error.
The same compiles nicely on Delphi 2010

...
fAppOnHelp := Application.onhelp;
Application.onhelp := OnRouteHelp;
--> the above line creates: E2010 Incompatible types: 'NativeInt' and 'Integer'
...

function THTMLhelpRouter.OnRouteHelp(Command: Word; Data: Longint; var CallHelp: Boolean): Boolean;
...

The function OnRouteHelp is declared the usual way, so I don't understand why the compiler has a problem with that.

Any ideas?
User avatar
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: HTMLhelpRouter won't compile on XE7

Unread post by Alexander Halser »

I think the declaration of THelpEvent has changed in XE7.

Try to replace the

Code: Select all

function THTMLhelpRouter.OnRouteHelp(Command: Word; Data: Longint; var CallHelp: Boolean): Boolean;
with this declaration, both in ehsHelpRouter.pas:

Code: Select all

function THTMLhelpRouter.OnRouteHelp(Command: Word; Data: THelpEventData; var CallHelp: Boolean): Boolean;
THelpEventData should be a NativeInt in a VCL application on XE7.
Alexander Halser
Senior Software Architect, EC Software GmbH
JurgenB
Posts: 6
Joined: Wed Feb 20, 2008 12:36 am

Re: HTMLhelpRouter won't compile on XE7

Unread post by JurgenB »

Many thanks Alexander !
That was the reason, it now compiles.

Strange to see an error at that line while it was caused elsewhere. At least I now know where to look for should I ever see that type of error again.
Post Reply