BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Delphi Interfaces - adding properties / methods causes acces

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ObjectPascal
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Tue May 08, 2007 3:36 pm    Post subject: Delphi Interfaces - adding properties / methods causes acces Reply with quote



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.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ObjectPascal All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.