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# / August 2006

Tip: Looking for answers? Try searching our database.

another c++ app rewrite question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
john_turman@lycos.com - 23 Aug 2006 22:31 GMT
I have the SDK and API Libraries of XXX.

The programming guide states:

"
An XXX program using the XXX Libraries should be compiled with
Microsoft Visual C++ Version 6.0. The XXX program will need to include
the file <TARGETDIR>\Include\XXXLib.h. The linker will need to have
<TARGETDIR>\Lib added to its Library path or explicitly link with
XXXLib16.lib, XXXComm.lib and XXXLogClient.lib in the directory
<TARGETDIR>\Lib.
"

Yet, my direction is to rewrite an existing XXX program in c#.

I've been reading up on interop services, RCW, and running unmanaged
C++ code in C#.  Since I'm rewriting something, I dont write a wrapper
for it, right?

Am im supposed to turn the XXX libraries into COM objects and then use
them in C#?  And I do this by using the C++ 6.0 IDE?

Is there a better way?

TIA
Andy Bates - 24 Aug 2006 07:04 GMT
If possible get the libraries for VC8; at least you can then work under one
development environment then.

Several possible routes available:

1. If you can get a COM/ActiveX component from the library vendor then use
Interop.

2. If it's your own library then port it to a C# assembly. If the library
functionality can be easily re-written then re-write the code in C#.

3. Either wrap it as a DLL or COM component and use PInvoke or Interop
respectively. This can get messy depending on what parameters the wrapped
methods need to take and you may need to write some infrastructure adaptors
to allow passing .NET types to the methods easily.

- Andy

>I have the SDK and API Libraries of XXX.
>
[quoted text clipped - 21 lines]
>
> TIA

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.