PDA

View Full Version : FPC and Delphi interfaces



igor84
28-01-2008, 02:44 PM
After a long time with Delphi I started something in FPC. My problem is that I would like to use non COM interfaces and I can do that if I set that default interfaces in FPC are CORBA, meaning that if I declare an interface without a parent it really won't have a parent. But in Delphi all interfaces have IUnknown as a parent so my code won't work with Delphi, which I would like. Do you know of some solution to this problem.

For those who are interested in details of my problem:
I will have a class that will get all the events from some underlying system (WinAPI, SDL...) and then call appropriate method(s) of all registered objects. Objects that will register themselves for receiving events may be of any class (and it is not known what those classes may be) but it is only important that they implement certain methods like procesEvent(event: TEvent) for example. Interfaces are a great solution to this problem.

dmantione
29-01-2008, 05:38 PM
Can't you do something with {$ifdef FPC} ?