another c++ app rewrite question

J

john_turman

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
 
A

Andy Bates

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top