有个dll:mydll.dll,不能引用
在C#web程式里面我的方法是
using System.Runtime.InteropServices;
[DllImport("mydll.dll", CharSet = CharSet.Ansi, SetLastError = true)]
public static extern int GetDLLInfo(char[] sDllVer);
protected void Page_Load(object sender, EventArgs e)
{
char[] ss = null;
int s= GetDLLInfo(ss);
Response.Write(ss); }
可是在int s= GetDLLInfo(ss);地方总是提示:Unable to load DLL mydll.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
有神马办法?
在C#web程式里面我的方法是
using System.Runtime.InteropServices;
[DllImport("mydll.dll", CharSet = CharSet.Ansi, SetLastError = true)]
public static extern int GetDLLInfo(char[] sDllVer);
protected void Page_Load(object sender, EventArgs e)
{
char[] ss = null;
int s= GetDLLInfo(ss);
Response.Write(ss); }
可是在int s= GetDLLInfo(ss);地方总是提示:Unable to load DLL mydll.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
有神马办法?
int s= GetDLLInfo(ss);
Response.Write(ss);
你怎么搞个null值放到getDllinfo()里
Dim s As String * 128
st = GetDLLInfo(s)
对应的C#应该如何写呢
char[] cs = str.ToCharArray(); //将string类型转为char[]
st=GetDllInfo(s);