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 

Writing a dll containing inherited classes

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi (General)
View previous topic :: View next topic  
Author Message
gj_williams2000@yahoo.co.
Guest





PostPosted: Wed Aug 03, 2005 8:38 am    Post subject: Writing a dll containing inherited classes Reply with quote



Hello,

Can you expose a class from within a dll to an application if it is
inherited from other classes in the dll?

I recently wrote an object oriented OpenGL graphics engine and I'm now
trying to turn it into a dll so that I can tidy all the code away and
just show the programmer using my enigine what they need to see. I also
want to make the code usable in any language you write a header file
for.

But it doesn't work! I have been fiddling about with it for a while now
and I have narrowed the problem down.

You can create the engine object ok but when you call its methods it
either (using register calling convention) does sod all or (using
stdcall/cdecl/pascal) it crashes with an exception.

Here are some snippets:

type TglAbstract = class(TObject)
....
end;

type TglObject = class(TglAbstract)
......
end;

type TglEngine = class(TglObject)
....
public
procedure Update(); virtual; stdcall;
.....
end;

Calling Update will crash the application but if I comment out the code
so that the engine isn't inherited from TglObject then I can call the
Update method ok

Is there any way I can inherit form TglObject and still put the code in
a dll?

Thanks

Gareth

Back to top
Riki Wiki Google
Guest





PostPosted: Sat Aug 06, 2005 8:06 am    Post subject: Re: Writing a dll containing inherited classes Reply with quote



Hoi Gareth

Take a look here:
http://delphi.wikicities.com/w iki/Delphi_Newsgroups

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi (General) 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.