Guest
|
Posted: Tue May 08, 2007 3:36 pm Post subject: Delphi Interfaces - adding properties / methods causes acces |
|
|
Hi,
Please help me!
I've made a dll that contains an interface and the class that
implements it. I've also created an exported function which creates
an instance of the interface and returns it to the caller.
| Quote: | From an application, I use this function to get the instance of the
interface and use the methods on it. This works quite well. |
If I add methods to the end of the declaration of the interface,
recompile the dll and run the application without recompiling it,
everything seems fine. The application isn't using any of the new
methods added anyway.
But if I insert the method declaration before existing methods in the
interface, I get access violations when I run the application. Why is
this? What do I need to do to prevent this from happening? It seems
the order is important.
This also seems to occur if I use inheritance. If I add methods to
the an of the parent interface, the application also has access
violations.
Do I have to use a type library or IDispatch? How do I go about using
these if I have to? I'm not using COM, just Delphi interfaces, so if
I use File | New | Other... there is no option for Type Library.
Regards,
Mark. |
|