How to pass failed HRESULT from a VB COM object 
Author Message
 How to pass failed HRESULT from a VB COM object

Hi,

  I've implemented an interface in VB for quick testing of
an ATL com object. How I pass failed HRESULT from VB to
COM ?

Thanks and regards

Navin



Sun, 11 Apr 2004 05:57:52 GMT  
 How to pass failed HRESULT from a VB COM object
In VB:

Err.Raise number[,source,description,helpfile,helpcontext]

Example

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)

Quote:
>-----Original Message-----
>Hi,

>  I've implemented an interface in VB for quick testing
of
>an ATL com object. How I pass failed HRESULT from VB to
>COM ?

>Thanks and regards

>Navin
>.



Sun, 11 Apr 2004 23:35:02 GMT  
 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.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================



Quote:
> In VB:

> Err.Raise number[,source,description,helpfile,helpcontext]

> Example

> 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-----
> >Hi,

> >  I've implemented an interface in VB for quick testing
> of
> >an ATL com object. How I pass failed HRESULT from VB to
> >COM ?

> >Thanks and regards

> >Navin
> >.



Mon, 12 Apr 2004 03:44:21 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. passing objects from VB as VARIANT to COM server object failing

2. passing objects from VB as VARIANT to COM server object failing

3. Passing Arrays Between VB and ATL COM object

4. passing com/atl object in vb

5. Passing COM object from VB to VC++

6. Passing VB dictionaries as parameters to ATL COM objects

7. trouble passing String from VB to ATL com object expecting BSTR

8. need help with passing strings from COM object to VB

9. passing com objects from VB to VC++

10. Help: Passing strings between VB and ATL-COM objects

11. passing COM object pointers to another COM object in ATL

12. Passing COM objects as parameters to other COM objects

 

 
Powered by phpBB® Forum Software