C3376 and C3377 error messages. 
Author Message
 C3376 and C3377 error messages.

Basically I have a managed class that wraps an unmanaged one. I have created
a public function that returns the unmanaged pointer as a return value.  I
need to pass around the unmanaged pointer to other managed c++ assemblies.

Here is my problem:  I can create the managed class and use it within the
mc++ assembly in which both the managed and unmanaged classes are defined. I
can even use it C# apps. However, as soon as I try to create the managed
class ( using new ) in any other managed c++ assemblies I get the following
errors:

Configurations.cpp(23) : error C3376: 'vxShareableObject<vxCamera>' : type
is inaccessible

Configurations.cpp(23) : error C3377:
'Viatronix::v3D::Visualization::Camera::GetCameraPtr' : cannot import
method - a parameter type or the return type is inaccessible

I don't know if this is important, but it is a parameterized class as you
can see. I have noticed that if the return type is not a template class the
compiler will not complain.

As a workaround I have changed the return type to a System::IntPtr  and
stuff the unmanaged pointer into it. I then cast it back when I need to get
at the unmanaged pointer.  This is very ugly and embarrassing. I was
wondering if anybody has a more elegant solution.

George Economos



Sun, 17 Apr 2005 06:11:25 GMT  
 C3376 and C3377 error messages.
We're actively working on improving this for future releases. For what it's
worth, here's a technical article that you might find interesting on the
current state of standard and managed C++ at Microsoft:

"Standard C++ Meets Managed C++", Herb Sutter
http://www.cuj.com/articles/2002/0209/0209i/0209i.htm

--
Dave Williams
Eric Jarvi
Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.


Quote:
> Basically I have a managed class that wraps an unmanaged one. I have
created
> a public function that returns the unmanaged pointer as a return value.  I
> need to pass around the unmanaged pointer to other managed c++ assemblies.

> Here is my problem:  I can create the managed class and use it within the
> mc++ assembly in which both the managed and unmanaged classes are defined.
I
> can even use it C# apps. However, as soon as I try to create the managed
> class ( using new ) in any other managed c++ assemblies I get the
following
> errors:

> Configurations.cpp(23) : error C3376: 'vxShareableObject<vxCamera>' : type
> is inaccessible

> Configurations.cpp(23) : error C3377:
> 'Viatronix::v3D::Visualization::Camera::GetCameraPtr' : cannot import
> method - a parameter type or the return type is inaccessible

> I don't know if this is important, but it is a parameterized class as you
> can see. I have noticed that if the return type is not a template class
the
> compiler will not complain.

> As a workaround I have changed the return type to a System::IntPtr  and
> stuff the unmanaged pointer into it. I then cast it back when I need to
get
> at the unmanaged pointer.  This is very ugly and embarrassing. I was
> wondering if anybody has a more elegant solution.

> George Economos



Wed, 20 Apr 2005 02:56:53 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Compiler error C3376

2. Compile error C3376 - type is inaccessible

3. cfe: ERROR MESSAGE 8ERROR MESSAGE 103

4. Error:Too many error or message .......

5. Quick question on custom error messages w/ Error() macro

6. An error encountered while running this program - Embedded VB Error Message

7. Error during merge replication :- Error Message-The process could not bulk copy

8. Compiler Error Message: CS0115

9. Stock quote service error message

10. CDO.Message Error

11. VC7 Error Message Pet Peeve

12. Parser Error Message

 

 
Powered by phpBB® Forum Software