using c headers

  • Thread starter Thread starter anonymous
  • Start date Start date
A

anonymous

is it possible to use c headers in C#? or is there an
easy way to convert the formats? thanks
 
I am not sure if I understand what you mean. Do you mean C header files? Can
you explain what you want to achieve?
 
Basically, I have written some DLL functions and
structures in C. I'd like to use them in C#.

I know I can dllimport and call the functions, but
currently I have to write C# code to re-state what the C
headers define (except now in C#).

So I'd convert a typedef struct (in C) to public struct
(in C#), defines are converted to public static
variables , pointers are converted to IntPtrs, etc.

Instead of going through all this converting, can C#
simply import C header files and understand the
structures so I can use them? (like in some variation of
unsafe mode?) Thanks
 
No, you have to write that C# code to establish the characterisitcs of the
interface.

Paul T.
 
Back
Top