Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C++ Libraries / January 2004

Tip: Looking for answers? Try searching our database.

Help on .NET Assemblies

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gideon - 14 Nov 2003 11:27 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.