首页 新闻 会员 周边 捐助

webservice 调用dll

0
[已关闭问题] 关闭于 2008-01-26 01:39
环境说明: &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vs2005,nfts文件系统,xp &nbsp; <BR>问题说明: &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 我在webservice里面调用了自己的dll,调试发现可以得到dll的入口,但是在调用里面的方法的时候无法返回程序, &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 下面我将代码贴出来,我会对代码做下分析的,请指点。 &nbsp; <BR><BR>类代码: &nbsp; <BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /// &nbsp; &nbsp; &nbsp; &lt;/summary&gt; &nbsp; <BR>public &nbsp; &nbsp; &nbsp; class &nbsp; &nbsp; &nbsp; Service1 &nbsp; &nbsp; &nbsp; : &nbsp; &nbsp; &nbsp; System.Web.Services.WebService &nbsp; <BR>{ &nbsp; <BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //动态加载DLLs &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [DllImport("kernel32.dll")] &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private &nbsp; &nbsp; &nbsp; extern &nbsp; &nbsp; &nbsp; static &nbsp; &nbsp; &nbsp; IntPtr &nbsp; &nbsp; &nbsp; LoadLibrary(string &nbsp; &nbsp; &nbsp; path); &nbsp; <BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [DllImport("kernel32.dll")] &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private &nbsp; &nbsp; &nbsp; extern &nbsp; &nbsp; &nbsp; static &nbsp; &nbsp; &nbsp; IntPtr &nbsp; &nbsp; &nbsp; GetProcAddress(IntPtr &nbsp; &nbsp; &nbsp; lib, &nbsp; &nbsp; &nbsp; string &nbsp; &nbsp; &nbsp; funcName); &nbsp; <BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [DllImport("kernel32.dll")] &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private &nbsp; &nbsp; &nbsp; extern &nbsp; &nbsp; &nbsp; static &nbsp; &nbsp; &nbsp; bool &nbsp; &nbsp; &nbsp; FreeLibrary(IntPtr &nbsp; &nbsp; &nbsp; lib); &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ////////设置Dll的入口地址 &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &a
cloudgamer的主页 cloudgamer | 菜鸟二级 | 园豆:280
提问于:2008-01-19 01:19
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册