Hi
Does anyone know why I get following error message?
"[Error] SHDocVw_TLB.pas(1502): Incompatible types: 'TControlData2' and 'TControlData'"
I am using Delphi4 (ok I know it is old but it works fine) and win2k, it was working fine a few months ago but now it does not compile anymore.
Below is the code where it fails.
Thankful for a quick answer, please.
//Berndt
From SHDocVw_TLB.pas
procedure TWebBrowser_V1.InitControlData;
const
CEventDispIDs: array [0..16] of DWORD = (
$00000064, $00000065, $00000066, $0000006C, $00000068, $00000069,
$0000006A, $0000006B, $00000071, $000000C8, $000000C9, $000000CC,
$00000067, $0000006D, $0000006E, $0000006F, $00000070);
CControlData: TControlData2 = (
ClassID: '{EAB22AC3-30C1-11CF-A7EB-0000C05BAE0B}';
EventIID: '{EAB22AC2-30C1-11CF-A7EB-0000C05BAE0B}';
EventCount: 17;
EventDispIDs: @CEventDispIDs;
LicenseKey: nil;
Flags: $00000000;
Version: 401);
begin
ControlData := @CControlData; !!!!!!!!!fails here
TControlData2(CControlData).FirstEventOfs :=
Cardinal(@@FOnBeforeNavigate) - Cardinal(Self);
end;
Does anyone know why I get following error message?
"[Error] SHDocVw_TLB.pas(1502): Incompatible types: 'TControlData2' and 'TControlData'"
I am using Delphi4 (ok I know it is old but it works fine) and win2k, it was working fine a few months ago but now it does not compile anymore.
Below is the code where it fails.
Thankful for a quick answer, please.
//Berndt
From SHDocVw_TLB.pas
procedure TWebBrowser_V1.InitControlData;
const
CEventDispIDs: array [0..16] of DWORD = (
$00000064, $00000065, $00000066, $0000006C, $00000068, $00000069,
$0000006A, $0000006B, $00000071, $000000C8, $000000C9, $000000CC,
$00000067, $0000006D, $0000006E, $0000006F, $00000070);
CControlData: TControlData2 = (
ClassID: '{EAB22AC3-30C1-11CF-A7EB-0000C05BAE0B}';
EventIID: '{EAB22AC2-30C1-11CF-A7EB-0000C05BAE0B}';
EventCount: 17;
EventDispIDs: @CEventDispIDs;
LicenseKey: nil;
Flags: $00000000;
Version: 401);
begin
ControlData := @CControlData; !!!!!!!!!fails here
TControlData2(CControlData).FirstEventOfs :=
Cardinal(@@FOnBeforeNavigate) - Cardinal(Self);
end;