动态连接库调用
wx114 2006-12-07 10:07:17 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);