C#中调用C++动态库的函数

[System.Runtime.InteropServices.DllImport("DebugToolWin",CallingConvention=CallingConvention.Cdecl)]

//该语句是引入非托管代码程序集
public static extern bool DebugOutStr(string strValue);

[System.Runtime.InteropServices.DllImport("DebugToolWin",CallingConvention=CallingConvention.Cdecl)]
public static extern bool DebugOutStrAndTime(string strValue);

原文地址:https://www.cnblogs.com/lishennan/p/4499435.html