|
-
April 15th, 2014, 01:13 PM
#3
Re: Attempting to convert a C program into C# - is it possible?
 Originally Posted by Arjay
There are several approaches:
1) PInvoke to your C dlls
2) Use the C source code and write managed C++ wrapper assemblies around the code.
PInvoke to the existing dlls is by far the simplest approach providing the dll function signatures are somewhat standard. See PInvoke.net for more help.
Note: If you pinvoke to the existing dlls, unlike in C/C++ you don't need to use the header files.
Thank you Arjay. I had never heard of PInvoke before today. I will refer to PInvoke.net to see what it has to offer. I assume that since I will not need or be able to use the header files, that I will need to use PInvoke somehow for each of my C dll's - All 30 of them? Does this mean I will create a separate class for each of the dll's? Any PInvoke oddities I should be aware of?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|