Paulraj G wrote:
the above code is not working.
That is not a very helpful piece of information; exactly what is not working; does the program crash, do you see the wrong results, etc.? You have defined a DLL function as
extern "C" __declspec(dllexport) char* __stdcall ISim::BaseClassFunction()
and I suspect the ISim:: prefix may be affecting your exported name; you can check with Dependency Walker[^]. Also I am not sure whether a char* returned from C++ will be accepted as a String in C#, you should check the PInvoke rules for marshalling, and also this article[^], and this one[^], by Luc Pattyn[^].
Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman