Exception from HRESULT: 0x80131019 
Author Message
 Exception from HRESULT: 0x80131019

I have an assembly with two classes: MyUserControl1 and MyUserControl2.
MyUserControl1 is made in C# and MyUserControl2 is made in Managed C++. Both
classes are derived from System.Windows.Forms.UserControl. Both classes has
exactly the same code and both classes behave exactly the same way at run
time. The problem is: after placing both controls in the toolbox, only the
C# version can be used at design time. The C++ version gives me the
following error:

Exception from HRESULT: 0x80131019

What kind of error is this one? What am I doing wrong? Do I need some extra
code in the C++ version  in order to let it work? I though .net assemblies
are language independent. However, it seems that the C# compiler is placing
some extra code to let it work at design time.

I have RTM build 9466, .net framework with SP1.
The same happens if I derive both controls from other classes like Button.

Esteban Quijano
Artinsoft corp.



Tue, 19 Oct 2004 05:39:15 GMT  
 Exception from HRESULT: 0x80131019
Give the C++ one a strong name and register it into the GAC.

The C# project system does that for you, the C++ one doesn't (a design
limitation/bug in this version).

Ronald Laeremans
Visual C++ compiler team


Quote:
> I have an assembly with two classes: MyUserControl1 and MyUserControl2.
> MyUserControl1 is made in C# and MyUserControl2 is made in Managed C++.
Both
> classes are derived from System.Windows.Forms.UserControl. Both classes
has
> exactly the same code and both classes behave exactly the same way at run
> time. The problem is: after placing both controls in the toolbox, only the
> C# version can be used at design time. The C++ version gives me the
> following error:

> Exception from HRESULT: 0x80131019

> What kind of error is this one? What am I doing wrong? Do I need some
extra
> code in the C++ version  in order to let it work? I though .net assemblies
> are language independent. However, it seems that the C# compiler is
placing
> some extra code to let it work at design time.

> I have RTM build 9466, .net framework with SP1.
> The same happens if I derive both controls from other classes like Button.

> Esteban Quijano
> Artinsoft corp.



Fri, 22 Oct 2004 13:15:02 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Unable to add custom C# control to a form - Exception from HRESULT: 0x80131019

2. Exception errro HRESULT: 0x80131019 from the View Designer

3. HRESULTS vs Exceptions

4. "Exception from HRESULT: 0x80040202."

5. HRESULTS vs Exceptions

6. Exceptions and HResults revisited

7. Exception from HRESULT: 0x80131522

8. Error 0x80131019 strikes back but with dirrerent conditions

9. ERROR : HResult:0x80040202

10. analysing hresult error codes

11. CComQIPtr and HRESULT

12. Return HRESULT

 

 
Powered by phpBB® Forum Software