动态连接库调用

wx114 wx114 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
Delphi里动态连接库调用声明:(Delphi是正确)
function Coding(input:string):pchar;
stdcall;far;external 'convertdll.dll'name 'Coding';
function Decode(input:string):pchar;
stdcall;far;external 'convertdll.dll'name 'Decode';;

我翻译成C#(不知道翻译的正不正确?,大伙帮忙看看,谢谢)
[DllImport("convertdll.dll", EntryPoint = "Coding", CallingConvention = CallingConvention.StdCall)]
public static extern string Coding(string input);

[DllImport("convertdll.dll", EntryPoint = "Decode", CallingConvention = CallingConvention.StdCall)]

public static extern String Decode(String input);

...全文

相关推荐

评论 6
收藏 已收藏
分享
返回顶部
wx114
.NET技术其他语言 1,979 成员 12,447 内容