export function with clr parameters from dll?
I've got a legacy managed c++ dll, and I need to call some function which is returning a managed type. For dllexports without managed types, this is easy, I just define my static c(++) function in a header like this: extern "C" { __declspec(dllexport) int __cdecl InitSystem(); } But now the static c(++) function should return a managed type, and here I got a problem. If I try (for example): extern "C" { __declspec(dllexport) System::Collections::Generic::List<System::String^>^ __cdecl InitSystem(); } I get a compiler error (function definition needs __clrcall signature). Since the DLL is not