Page 1 of 1

Delphi XE2

Posted: Wed Jun 27, 2012 3:09 pm
by Pete
Ive just upgraded from d2009 to XE2 and am trying to rebuild the package FlashPlayerControl in XE2. I have the source code for v3.4.
I get the following errors:
[DCC Error] FlashPlayerControl.pas(366): E2291 Missing implementation of interface method ISimpleFrameSite.PreMessageFilter

[DCC Error] FlashPlayerControl.pas(366): E2291 Missing implementation of interface method ISimpleFrameSite.PostMessageFilter

Any suggestions as to what I can change to fix this?

Pete

Posted: Wed Jun 27, 2012 3:47 pm
by Pete
OK - I've fixed the problem. In winapi.activeX the interface is defined as:

{ ISimpleFrameSite interface }

{$EXTERNALSYM ISimpleFrameSite}
{$HPPEMIT 'DECLARE_DINTERFACE_TYPE(ISimpleFrameSite)' }
ISimpleFrameSite = interface
['{742B0E01-14E6-101B-914E-00AA00300CAB}']
function PreMessageFilter(wnd: HWnd; msg, wp, lp: Integer;
out res: IntPtr; out Cookie: Longint): HResult;
stdcall;
function PostMessageFilter(wnd: HWnd; msg, wp, lp: Integer;
out res: IntPtr; Cookie: Longint): HResult;
stdcall;
end;

In FlashPlayerControl.pas the same interface is defined with out res: integer.
Just change this to IntPtr and it builds OK

Pete

Posted: Wed Jun 27, 2012 5:40 pm
by Pete
Just found one more thing. I had to replace WordBool with Boolean to get a program using the control to run

Pete

Posted: Wed Jul 25, 2012 7:03 pm
by coolshadow
Pete wrote:Just found one more thing. I had to replace WordBool with Boolean to get a program using the control to run

Pete


Yes, you got it. This is a bug of ide and runtime itself.

I mentioned this years ago