Hello,
I'm trying to reuse an existing C++ audio synthesis library (STK), from a WPF application written in C#, with a GUI designed in Sparkle. The way I did this was to recompile STK as a CLR library, with wrapper ref classes for each class that was accessed by the C# front end.
All other build settings were identical to the native dll build of STK.
The GUI-to-STK-wrapper-classes interface is not very chatty.
However, going by the clicky audio, there seemed to be a *huge* performance hit. Is this because compiling STK as a CLR library defaults to generating MSIL for the entire library Even so, is that a problem If it is, I only want MSIL for the ref classes that are exposed to C#, and retain the rest as native code, so that C#-to-ref-class calls are managed, and ref-class-to-unmanaged-class calls are through IJW.
It seems that one way to do this would be to add a '#pragma unmanaged' directive to every file in the library and then build a clr assembly that includes the ref class wrappers. That seems somewhat tedious. Is there a better way to do that Or is there an alternative to reuse an unmanaged dll build of STK from the C# front end
Thanks in advance,
-Vamshi

Wrapping Unmanaged Library - Options.
TjMulder
DarkBagler
Thanks again!
-Vamshi
Ron1966
Thanks again!
-Vamshi
Peter Barnum
redsmurph
Thanks,
-Vamshi