using old header files (*.h) in c#

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,
I received a number of header files of several years old in C , now I want
to use this code in c#. What are the steps I need to make? Can I compile it
into a DLL with c++ and use it in c# somehow(.net 2005) ? must I convert it
to cs files ? Is there a tool available ? Maybe examples ?
Many many and even more thanks,
 
sounds easy .. I only have about 20 header files , some headers include the
others, .........how do I get the header files compiled correctly into .dll
s. The P/invoke transforms the .h to code with a lot of .dlls imported. But
then I have to create dll's out of these header files....how do I do that.

sorry but I'm not a c guru....anywhay thanks for yr help.
 
Hello, Lu!

LP> sounds easy .. I only have about 20 header files , some headers include
LP> the others, .........how do I get the header files compiled correctly
LP> into .dll s.

What do your header files contain? only definitions .
To compile to dll you have to use compiler and linker. Or if you have Visual Studio then you can create Dll project and include there all the sources you have

P.S. P/Invoke is not transforming files. It enables you to call unmanaged functions from managed environment.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
Back
Top