ISupportErrorInfo question. 
Author Message
 ISupportErrorInfo question.

This is probably a simple problem but I can`t seem to solve it.

I have an exe server with a singleton object objA. Clients connect to this
object via instances of another object objB.

objA uses interface IA.
objB uses interface IB (which derives from IA).

When the client app invokes a method on objA it transfers the call to its
equivalent method on objB.

Both objA and objB use ISupportErrorInfo.

A certain method call will result in a method on singleton objA catching a
_com_error in a try/catch block.
I use SetErrorInfo in the method that fails and return a failure code to the
method on objB that invoked it. In the check to see if the method on objA
failed I do a GetErrorInfo and a SetErrorInfo within objB then return a
failure code to the client app.

However I don`t seem to be getting the error information back to the client
correctly as in vb the err object just displays the default error ( ie
method'x' of objB failed)

I have noticed that when the client queries objB for
InterfaceSupportsErrorInfo it is passing in the IID of IA , not IB, so I
have added IID_IA to the array of interfaces that the array looks in for a

Any ideas why I don`t get the correct information back? When I look at the
data I pass to SetErrorInfo in the method of objB, just before I return the
fail code to the client, the data seems ok.

Sorry if my explanation is a little difficult to understand.

Thanks in advance


Fri, 31 Jan 2003 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. ISupportErrorInfo question

2. ISupportErrorInfo Example

3. ISupportErrorInfo problems

4. ISupportErrorInfo - thread resurrection

5. How to work with ISupportErrorInfo ?

6. ISupportErrorInfo and VB

7. ISupportErrorInfo (manually)

8. help ISupportErrorInfo used on DLL runnig on server

9. ISupportErrorInfo Issue

10. ISupportErrorInfo with MTS

11. ISupportErrorInfo with MTS

12. implementing IErrorInfo and ISupportErrorInfo interfaces


Powered by phpBB® Forum Software