网站首页

家园论坛

老版论坛

家园博客

业界新闻

技术文档

下载中心

速查中心

图片中心

硬件资讯
上一篇:编辑web.config 保证ASP.NET的安全 下一篇:.NET组件和COM组件之间的相互操作
ASP.NET中“找不到指定模块”的解决办法

来源: 作者: 添加日期:2007-10-12 16:31:23 点击次数:

  public Delegate Invoke(String APIName,Type t) 
  { 
  IntPtr api = GetProcAddress(hLib, APIName); 
  return (Delegate)Marshal.GetDelegateForFunctionPointer(api,t); 
  } 
  } 


  用下面代码进行调用

以下是引用片段:
 
  public delegate int Compile(String command, StringBuilder inf);//编译 
  DllInvoke dll = new DllInvoke(Server.MapPath(@"~/Bin/Judge.dll")); 
  Compile compile = (Compile)dll.Invoke("Compile", typeof(Compile)); 
  StringBuilder inf; 
  compile(@“gcc a.c -o a.exe“,inf); //这里就是调用我的DLL里定义的Compile函数 

本新闻共2页,当前在第2页  1  2  

 
设为首页 | 加入收藏 | 业务办理 | 友情链接 | 论坛版面 | 浙ICP备07502118号 |