that approach in "possible duplicate" is different to the one in the book. The book's approach is to extend a managed .dll after compilation through a decompile, recompile process. The approach that you think is an exact duplicate is actually a pre compilation technique. I prefer method in the book because it is more AOP in style. Thanks for the link though. I will also explore this avenue
In Expert .NET 2.0 IL Assembler, in Ch 18 pp. 387 Serge Lidin talks about Creative Round-Tripping. He says, "ILAsm allows you to export the managed methods as unmanaged entry points".
I haven't heard this talked about anywhere else. Is this something that you can do in PostSharp? Are there any downloadable code / script examples of using this technique available?
To clarify, I don't want to use COM or Managed C++. So what's the best way to implement a call to a C# method from C/C++ through thunking?