Yes, and yes.... however...
After a few hours of trial and error on my part I found out that the VB
Programmer had (unknowingly) made an error. The on error statements within
his code were referring the error back to a main cls module. This had the
result of the main module thinking the error came from the other (VB) module
instead of from my component (called from that secondary module).
Therefore, the error code was getting passed through but the location was
skewed by the sort of error-passing he had implemented.
Hmm.. hope that made sense :). Anyways, food for thought if someone else
has a similar problem.
-Dale
Quote:
> Does you object implement ISupportErroInfo? Is your interface correctly
> recognized by the implementation of InterfaceSupportsErrorInfo?
> --
> =====================================
> Alexander Nickolov
> Microsoft MVP [VC], MCSD
> MVP VC FAQ: http://www.mvps.org/vcfaq
> =====================================
> > Greetings,
> > I have an ATL COM that supports ISupportErrorInfo. At one point (for
> > testing purposes) I issue:
> > return Error ("This is a test error", IID_IErrorTester, E_FAIL);
> > The VB Component receives this and interprets it correctly as an error
> (via
> > on error goto...). The problem is that VB is not successfully
retrieving
> > from IErrorInfo... it is getting the correct HRESULT as err.number
> > (E_FAIL), but the Err.Description is always "Object Variable or With
Block
> > Variable not set" (regardless of whether I use E_FAIL, E_POINTER, or
> > whatever else), and always says err.source is the VB COM (not my C++ ATL
> > COM).
> > I assume we are doing something wrong in the VB Code, but I can't deduce
> > what. Perhaps it is in the C code... any ideas?
> > Thanks everyone,
> > -Dale