Closed
Description
i have created a dll with 3rd library: Rabbitmq.Client(.dll)
if a function return something without facilities reference to rabbitmq . everything goes well,but when i use some function from rabbitmq.client.dll; the function can't not run as expect;
example code:
[return: MarshalAs(UnmanagedType.LPWStr)]
[DllExport]
public static string test_string([MarshalAs(UnmanagedType.LPWStr)]string content)
{
//var factory = new ConnectionFactory() { HostName = "localhost", UserName = "test", Password = "test" }; // here is the question, if i comment it , it can return content as expect,but uncomment,the exported dll will crash.
return content + "----from-c_sharp-----no--problem!";
}
anybody can give me some tips ,why this occurs? how to solve this? many thanks!