Jump to content

Recommended Posts

Posted

I write a DLL file in eVc++

extern "C" _declspec(dllexport) char* text2()

{

	char text[20];

	strcpy(text, "hello world");

	return text;

}
And I want to use this DLL in my .NET c#
 [DllImport("cal.dll")]

  static extern  string text2();

But I got Exception for

System.NotSupportedException:NotSupportedException

Does anyone here know this problem?

Thanks

Guest pai
Posted (edited)

after a few days, I get a result:

use function like "int func(TCHAR* arg);" in C++ DLL.

And in C# using Int32 func(StringBuilder arg); to use this function.

Thanks filao

Edited by pai

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.