title: Parse .h header files into c# data structures in runtime
body: <p>I'm trying to write a C# library to manipulate my C/C++ header files.. I want to be able to read and parse the headers file and manipulate function prototypes and data structures in C#. I'm trying to avoid writing a C Parser, due to all code brances caused by #ifdefs and stuff like that.</p>
  
  <p>I've tryed playing around with EnvDTE, but couldn't find any decent documentation.
  Any ideas how can I do it?</p>
  
  <p>Edit - 
  Thank you for the answers... Here are some more details about my project: I'm writing a ptrace-like tool for windows using the debugging API's, which enable me to trace my already compiled binaries and see which windows API's are being called. I also want to see which parameter is given in each call and what return values are given, so I need to know the definition of the API's. I also want to know the defition for my own libraries (hence, the header parsing approach). I thought of 3 solutions:
  * Parsing the header files
  * Parsing the PDB files (I wrote a prototype using DIA SDK, but unfortionatly, the symbols PDB contained only general info about the API's and not the real prototypes with the parameters and return values)
  * Crawling over the MSDN online library (automaticly or manualy)</p>
  
  <p>Is there any better way for getting the names and types for windows API's and my libraries in runtime in c#?</p>