
Question: Catching errors from a VB ActiveX control in Visual C++ using MFC
G'day peoples. I'm using an ActiveX control written in VB from a
MFC application (using VC 5.0). The documentation I have for the control says
that it uses "standard VB error handling techniques". The problem is that
the handling of any errors I'm getting doesn't suit my purposes and I'd
like to be able to catch it and handle it differently. The problem is, I
don't know how to catch "Standard VB errors". I've done some fiddling with
try and catch but the error seems to avoid my catch statement and ends up
at a lower level.
Could some suggest how I could catch this error? The VB code being used to
raise the error is using the err object. One such line is like this:
Err.Description = "Device not Found on " & m_Port
Err.Raise vbObjectError + 7
Any hints on how to catch this from VC++ would be much appreciated.
Thanks,
Ian Rowlands
(remove the .nospam off the e-mail address if replying by mail)