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 / .NET Framework / .NET SDK / August 2003

Tip: Looking for answers? Try searching our database.

Create a mixed dll

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
news.tin.it - 06 Aug 2003 11:52 GMT
Hi.

I want to build a mixed dll in VC++.NET 2002 to get advantage from code performance (using ASM and point arithmetic) and use the framework infrastructure to use libraries into VB.NET and C# without pInvoke.

How can I do?

Please, somebody can give me code sample or link where can I find something?

Thanks very much,
Teo
Dennis Doomen - 06 Aug 2003 17:06 GMT
Hi Teo,

What you basically do is create two .cpp files. One defines classes using the __gc keyword so that it compiled into managed code (MSIL) and is accessible from C# or VB.NET. The other defines classes or methods without any .NET related keywords or constructs.

You then compile one using cl /c purecppcode.cpp, and the other using cl /c /clr managedcode.cpp. When you link them together with link.exe, you basically end up with an assembly that contains both MSIL code and pure assembly code.

It is a bit of simple example, but it should make the concept clear. If you create a Managed C++ Class Library from VS.NET, you get most of plumbing. The only thing you need to do is to add a new .cpp file and change its individual settings, or compile the unmanaged (old) code into a .LIB file. You can use ILDASM.EXE from the SDK to see the native and MSIL code end-up int he assembly.

Dennis Doomen
Sioux TSO B.V. Netherlands

 Hi.

 I want to build a mixed dll in VC++.NET 2002 to get advantage from code performance (using ASM and point arithmetic) and use the framework infrastructure to use libraries into VB.NET and C# without pInvoke.

 How can I do?

 Please, somebody can give me code sample or link where can I find something?

 Thanks very much,
 Teo

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.