当前位置:首页 » 业界相关

DLLProc和ExitProc有什么区别???

 Advertisement:

热门软件下载:


dllproc和exitproc有什么区别???      
  dllproc中有个      
  dll_process_detach值,是dll死亡的时候执行的。那和执行exitproc指向的函数有什么区别???

推荐阅读

  • 扩充产能,英特尔启用新墨西哥Fab11X晶圆厂 [详细内容]
  • 企业展台(6) [详细内容]
  • 日本新技术大幅扩容锂电池 可增加2至5成 [详细内容]
  • 重庆启用“电子身份证” 用于网络通讯中识别身份 [详细内容]
  • QD的得与失 [详细内容]
  • 索尼尚未越过“电池门”中国市场梦延期 [详细内容]
  • 新疆建工集团及下属分子公司启用新中大软件 [详细内容]
  • 网友回答:
    网友:glassesboy

    var  
          lpexitcode   :   dword   ;  
       
      ..................  
         
      getexitcodeprocess(application.handle,   lpexitcode)   ;  
      windows.exitprocess(lpexitcode)   ;                 //     jacky  
       
      points   to   a   programs   exit   procedure.  
       
      unit  
       
      system  
       
      category  
       
      termination   procedure   support  
       
      var   exitproc:   pointer;  
       
      description  
       
      the   exitproc   pointer   variable   enables   you   to   install   an   exit   procedure.   the   exit   procedure   always   gets   called   as   part   of   a   programs   termination.   exitproc   should   only   be   used   when   generating   .exe   files.   do   not   use   exitproc   within   a   dynamically   loaded   package.  
       
      an   exit   procedure   takes   no   parameters   and   must   be   compiled   with   a   far   procedure   directive   to   force   it   to   use   the   far   call   model.  
       
      when   implemented   properly,   an   exit   procedure   actually   becomes   part   of   a   chain   of   exit   procedures.   the   procedures   on   the   exit   chain   get   executed   in   reverse   order   of   installation.   all   exitproc   calls   belong   in   the   finalization   section.  
       
      to   keep   the   exit   chain   intact,   you   need   to   save   the   current   contents   of   exitproc   before   changing   it   to   the   address   of   your   own   exit   procedure.  
       
      the   first   statement   in   your   exit   procedure   must   reinstall   the   saved   value   of   exitproc.    
       
      ........................................  
      points   to   a   procedure   invoked   by   a   dll   entry   point.  
       
      unit  
       
      system  
       
      category  
       
      miscellaneous   routines  
       
      var   dllproc:   pointer;  
       
      description  
       
      dllproc   is   used   to   specify   a   procedure   that   is   invoked   every   time   a   dlls   entry   point   is   called.   a   procedure   assigned   to   dllproc   must   take   one   parameter   of   type   integer.   for   example,  
       
      procedure   libraryproc(reason:   integer);  
       
      when   the   procedure   is   invoked,   this   single   parameter   contains   a   value   between   0   and   3   as   defined   by   the   following   group   of   constants   in   the   windows   unit.  
       
      const  
       
          dll_process_detach   =   0;  
          dll_process_attach   =   1;  
          dll_thread_attach     =   2;  
          dll_thread_detach     =   3;  
       
      for   further   details   on   the   meaning   of   these   constants,   refer   to   the   description   of   the   dllentrypoint   function   in   the   win32   api   online   help.  
       
      note: dll_process_attach   is   passed   to   the   procedure   only   if   the   dll抯   initialization   code   calls   the   procedure   and   specifies   dll_process_attach   as   a   parameter.  
       
      这里说的够清楚了吧

    .  

    相关评论

    Login