Article View: borland.public.cppbuilder.nativeapi
Article #10410Re: Exception classes in DLL
From: Andrue Cope
Date: Wed, 28 Apr 2004 08:09
Date: Wed, 28 Apr 2004 08:09
28 lines
2124 bytes
2124 bytes
On Wed, 28 Apr 2004 00:01:04 -0700, Sten Larsson wrote: >>You have no way of knowing what the application may be doing in regards to >>exception handling, if anything at all. > > OTOH - doesn't VCL throw exceptions, also when it is used as a BPL ? Yes but a VCL BPL can reasonably assume that the thing calling it is VCL compatible code. Remy isn't saying that it won't work - he's saying that it depends on who is calling the DLL. If you are writing a DLL that will absolutely, without question, only be called by your own code generated by the same compiler with the appropriate switches then you can do it. The issue is that one of the main reasons for having DLLs, one of their main features, is that they aren't supposed to be tied to a specific EXE like that. By implementing your project that way you are producing a non-standard DLL. It is generally best to consider a DLL as a separate executable. Assume that the only thing that can safely cross the boundary is POD (Plain Old Data - nothing you can't create in 'C'). I'd even think twice about letting floating point numbers out of a DLL frankly. -- Andrue Cope [Bicester UK]
Technical Details
Message-ID:
<wciv630aac47.kfxbc4prvgob$.dlg@40tude.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<qlcu80tqns7riredje4qlugd62l8ejti7u@4ax.com> <408f3991$1@newsgroups.borland.com> <mjlu80dfeu835n3k2dujao90l5g9iol4vc@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,b9e2adba161972ac X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-04-28 01:13:51 PST From: Andrue Cope <no.spam@spammy.com> Subject: Re: Exception classes in DLL Newsgroups: borland.public.cppbuilder.nativeapi User-Agent: 40tude_Dialog/2.0.10.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit References: <qlcu80tqns7riredje4qlugd62l8ejti7u@4ax.com> <408f3991$1@newsgroups.borland.com> <mjlu80dfeu835n3k2dujao90l5g9iol4vc@4ax.com> Date: Wed, 28 Apr 2004 09:09:17 +0100 Message-ID: <wciv630aac47.kfxbc4prvgob$.dlg@40tude.net> NNTP-Posting-Host: 217.207.223.34 X-Trace: newsgroups.borland.com 1083139821 217.207.223.34 (28 Apr 2004 01:10:21 -0700) Lines: 28 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail