2. I keep my solution into separate DLLs and a single EXE which
components.
Sorry for my bad description. What I mean is, you mentioned before that
API in DLL throw an exception and let the EXE catch it. The reason is
between the DLL and the EXE. Are my understanding of your points
"George" <George@discussions.microsoft.com> wrote in message
news:91977348-5041-4493-A88E-2837583E43A0@microsoft.com
1. The exceptions from other DLLs, samples are exceptions from ATL,
COM, etc. Is it correct sample?
What makes you believe ATL uses C++ exceptions? Can you cite any
evidence of this?
What makes you believe COM uses C++ exceptions? Can you cite any
evidence of this?
Are you just shooting up any odd three-letter acronyms you can think
of,
in hopes one of them sticks? I can't help but wonder what this line of
enquiry is supposed to achieve.
2. If I myself both write the DLL and the DLL consumer (application)
in the same compiler (Visual C++ and only in this language), could I
throw exception in the DLL exported API to application?
Yes, if you commit to always build both the EXE and the DLL with the
same version of the same compiler, and link both against the same
flavor
of CRT DLL. But if you do all this, it's not clear why you would want
to
package the code into two separate modules. Why not just compile all
code into a single EXE? The whole point of DLLs is binary reuse, but
by
using C++ exceptions in the DLL's interface you preclude precisely
that.
I think you mean DLL can not throw exception because there is no
binary standard in C++ means something designed in different
language/compiler. Right?:-)
I can't parse this statement. Doesn't look like well-formed English to
me, sorry.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925