Hi,

I have been beavering away on a simple ATL COM object in order to learn the subject area. The code all compiles, the properties and methods work fine (code wise), but heres the problem.

I have decided to use VB to test the object for 2 reasons. First it's easier, second it's a different language to the one used to develop the object (VC++).

I have a method which needs to return E_FAIL if it fails (this works), or NOERROR if all is good (this works). But I also need to return a number from 1-7 which are catchable reasons why the method failed. However, all VB gets back is 0 or empty, even when I 'doctor' the test to fail in one of my catchable manners.

What am I doing wrong during providing a return value from my method (I thought this would be the easiest bit!) ?

Thanks in advance for any help given,

Simon