hi all.
i try to compile c++ code into a .NET assembly that would be integrated into
C#.
all my c++ types and objects are not __gc, so in the assembly they all seem
to inherit from System.ValueType; in the object browser, the members of my
c++ classes do not show, hence when i instantiate an object of that
assembly, i cant access any of its members.
can this be done at all without having my types being __gc?
also, after adding the dll as a reference, i get this error:
(i obviously did add it as a reference, etc.)
The type or namespace name 'NonManagedAssembly' could not be found (are you
missing a using directive or an assembly reference?)
thanks very much.
Pent - 14 Nov 2003 15:23 GMT
__gc is for .NET types and to be visible by .NET.
Without __gc you can't expose your classes. Wrap them in __gc classes
> hi all.
> i try to compile c++ code into a .NET assembly that would be integrated into
[quoted text clipped - 12 lines]
>
> thanks very much.
Rock Lee - 13 Jan 2004 03:14 GMT
why not compile ur c++ code into a native dll,and use them like
[DllImport("user32.dll", EntryPoint="MessageBoxA")]
public static extern int MsgBox(int hWnd, String text, String caption,
uint type);
> __gc is for .NET types and to be visible by .NET.
> Without __gc you can't expose your classes. Wrap them in __gc classes
[quoted text clipped - 18 lines]
> >
> > thanks very much.