How return error to VB client? 
Author Message
 How return error to VB client?

Hi.
I using VC++ develop many COM component and put them int MTS.Some component
using ATL and choose MTS object.I want to return error to my VB client
program.
If I choose MTS object , the source code didn't have ISupportErrorInfo
interface.How can I return error to VB client?
Have any example ?
Thanks very much!


Sun, 29 Dec 2002 03:00:00 GMT  
 How return error to VB client?
Add that ISupportErrorInfo interface by hand and use CComCoClass::Error() to
return rich error information.

--
Girish Bharadwaj

Quote:
> Hi.
> I using VC++ develop many COM component and put them int MTS.Some
component
> using ATL and choose MTS object.I want to return error to my VB client
> program.
> If I choose MTS object , the source code didn't have ISupportErrorInfo
> interface.How can I return error to VB client?
> Have any example ?
> Thanks very much!



Sun, 29 Dec 2002 03:00:00 GMT  
 How return error to VB client?


Quote:
> Hi.
> I using VC++ develop many COM component and put them int MTS.Some
component
> using ATL and choose MTS object.I want to return error to my VB client
> program.
> If I choose MTS object , the source code didn't have ISupportErrorInfo
> interface.How can I return error to VB client?
> Have any example ?
> Thanks very much!

The easiest way is to inherit your class ISupportErrorInfoImpl<> and then
add ISupportErrorInfo to your interface map. Then, just use one of the
overloaded versions of CComCoClass::Error() to return the error.

The only limitation of ISupportErrorInfoImpl<> is that it can only support
error information for a single interface. If you need more than that, you
should just inherit from ISupportErrorInfo and implement the interface in
your code.

Jeff



Wed, 01 Jan 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Returning Error to VB Client

2. Returning recordsets to a VB client

3. VC++ Dll return string to VB client?

4. Raising Errors from VC++ created DLL to VB client - help needed

5. Throwing errors to VB client

6. how to return an error code from COM to vb script

7. Returning[out,retval] interface to VB error

8. Return Standard VB Error

9. Returning error values vs. not returning

10. Compiler Error: tool returned an error

11. An error encountered while running this program - Embedded VB Error Message

12. using a C# uint Enum within a VB client

 

 
Powered by phpBB® Forum Software