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.
--
Lu
"Vadym Stetsyak" wrote:
Hello, Lu!
LP> Hi all,
LP> I received a number of header files of several years old in C , now I
LP> want to use this code in c#. What are the steps I need to make? Can I
LP> compile it into a DLL with c++ and use it in c# somehow(.net 2005) ?
LP> must I convert it to cs files ? Is there a tool available ? Maybe
LP> examples ? Many many and even more thanks,
What are there in headers? usually there are placed some definitions and declarations ( function prototypes, constants etc ). If you have headers, then it seems that you also have the code that uses these headers.
IMO here you have following ways:
- compile the code C with headers into separate DLL, ensuring that declared functions are exported from that dll. Then in the managed code ( C# ) you can use them via p/invoke.
- rewrite the code totally in C#.
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot