I've got technical problem with a new C# program I'm developing.
In this project I need to communicate with another none windows based system on a TCP/IP network.
Al the software written on the other system is done in C and any other future development will be done in C/C++ aswell.
The protocols are all done in C by another engineer and definitions of the protocols are all done using C typedef struct's defining all the variables and using memcpy to extract/put the data packets which works fantastic for C.
All my protocols are supplied as C header files with all the typedef and struct's in them and any changes made to the protocol in the future will be done in the same way.

My question is, if there is any way to use them in C#?

I've tried to compile them as a class into a DLL library but not working cause C# can only use managed C dll's. If I try and compile as managed C class, it just becomes a mess due to the fact that there are many arrays in the protocol and because the C code has to conform to a bunch of mill specs, many of the variables have been typedef'd. Now I could go and redo all the structures in C# but that's going to take a lot of time and I'm going to have to redo it every time a change is made or something added to protocol. Not even to mention the danger of errors slipping in every time I do it.

How it worked with my C projects is that the other engineer would just supply me with the updated header files.

So is there any way to use those header files directly in C# or a automated conversion I can do every time the protocol is updated?
Well I basically need to use this header file to extract the data from the data stream coming over the TCP/IP connection (without begin able to use memcpy)

Reason for using C# is because I use a lot of graphics in WPF and Visual C++ doesn't support WPF

Any help or suggestions would be much appreciated?