How to pass failed HRESULT from a VB COM object
If it is a positive (16 bit) value, VB will add the SEVERITY_ERROR bit and
the FACILITY_CONTROL code, effectively ORing it with 0x800A0000.
This is not my own experient, I'm just passing on others' results.
Microsoft MVP [VC], MCSD
MVP VC FAQ: http://www.mvps.org/vcfaq
> In VB:
> Err.Raise number[,source,description,helpfile,helpcontext]
> Err.Raise vbObjectError + 1
> Please test what transformation will the VB runtime apply
> to your error code when the C routine gets the HRESULT
> (maybe it will "OR" your code with 0x80000000)
> >-----Original Message-----
> > I've implemented an interface in VB for quick testing
> >an ATL com object. How I pass failed HRESULT from VB to
> >COM ?
> >Thanks and regards