webservice调用dll返回值问题!!
既生瑜 2011-12-28 04:18:05 c# 写了一个webservice,调用一个dll文件!
#region 导入dll
[DllImport("a.dll")]
public static extern int add(int i, int j);
#endregion
[WebMethod]
public string start()
{
int m = add(1,1);
return m.toString();
}
返回值为0;
dll在windows应用程序中调用正常
在web应用程序中调用和在webservice中调用一样
请问是什么原因!?