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 an assembly (I think), I'm a bit at a loss how to export a simple function call using .net/clr parameters. This probably is simple and I'm just looking in the wrong direction?