A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

© 转达小朋友 中级黑马   /  2013-6-8 23:46  /  1638 人查看  /  2 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

aspnet_isapi.dll 向ISAPIRuntime.ProcessRequest传递数据时 用的是ECB句柄 ,第一次接触ECB不是很明白  ECB是指针吗??
求得道高僧点化。。

评分

参与人数 1技术分 +1 收起 理由
苏波 + 1

查看全部评分

2 个回复

倒序浏览
本帖最后由 无__畏 于 2013-6-9 20:44 编辑

研究生命周期的吧?这个不用重点关心,你要娶研究ECB的话,那你就跑远了! 它只是定义了个类型叫ecb
  1. [SecurityPermission(SecurityAction.LinkDemand, Unrestricted=true)]
  2. public int ProcessRequest(IntPtr ecb, int iWRType)
  3. {
  4.     IntPtr zero = IntPtr.Zero;
  5.     if (iWRType == 2)
  6.     {
  7.         zero = ecb;
  8.         ecb = UnsafeNativeMethods.GetEcb(zero);
  9.     }
  10.     ISAPIWorkerRequest wr = null;
  11.     try
  12.     {
  13.         bool useOOP = iWRType == 1;
  14.         wr = ISAPIWorkerRequest.CreateWorkerRequest(ecb, useOOP);
  15.         wr.Initialize();
  16.         string appPathTranslated = wr.GetAppPathTranslated();
  17.         string appDomainAppPathInternal = HttpRuntime.AppDomainAppPathInternal;
  18.         if ((appDomainAppPathInternal == null) || StringUtil.EqualsIgnoreCase(appPathTranslated, appDomainAppPathInternal))
  19.         {
  20.             HttpRuntime.ProcessRequestNoDemand(wr);
  21.             return 0;
  22.         }
  23.         HttpRuntime.ShutdownAppDomain(ApplicationShutdownReason.PhysicalApplicationPathChanged, SR.GetString("Hosting_Phys_Path_Changed", new object[] { appDomainAppPathInternal, appPathTranslated }));
  24.         return 1;
  25.     }
  26.     catch (Exception exception)
  27.     {
  28.         try
  29.         {
  30.             WebBaseEvent.RaiseRuntimeError(exception, this);
  31.         }
  32.         catch
  33.         {
  34.         }
  35.         if ((wr == null) || !(wr.Ecb == IntPtr.Zero))
  36.         {
  37.             throw;
  38.         }
  39.         if (zero != IntPtr.Zero)
  40.         {
  41.             UnsafeNativeMethods.SetDoneWithSessionCalled(zero);
  42.         }
  43.         if (exception is ThreadAbortException)
  44.         {
  45.             Thread.ResetAbort();
  46.         }
  47.         return 0;
  48.     }
  49. }


复制代码

评分

参与人数 1技术分 +1 收起 理由
苏波 + 1

查看全部评分

回复 使用道具 举报
无__畏 发表于 2013-6-9 19:51
研究生命周期的吧?这个不用重点关心,你要娶研究ECB的话,那你就跑远了! 它只是定义了个类型叫ecb
...

只是想了解下,,我想多了啊
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马