首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

asp.net网站如何调用delphi编写的dll文件

2012-12-17 
asp.net网站怎么调用delphi编写的dll文件?using System.Runtime.InteropServices[DllImport(@D:\CG_Syst

asp.net网站怎么调用delphi编写的dll文件?
using System.Runtime.InteropServices;

[DllImport(@"D:\CG_System\RedpassCrypt.dll")]//绝对路径提示找不到服务器
public static extern string enpass(string Str);

[DllImport("RedpassCrypt.dll")]//相对路径提示找不到dll文件public static extern string enpass(string Str);


TextBox2.Text = enpass(TextBox1.Text);//调用

放到Bin文件夹下也不行,这是个delphi编写的非托管dll,就这一个,好像也没有相关的dll没拷进来。到底要怎么引用啊!!!老大们知道的帮帮忙!
[解决办法]
[DllImport("RedpassCrypt.dll"),CharSet = CharSet.Auto]
public static extern string enpass(string Str);
加入charset后就可以了,但是输出值是乱码@@

热点排行