易截截图软件、单文件、免安装、纯绿色、仅160KB

Delphi编写系统服务二:系统服务和桌面程序的区别

 Delphi编写系统服务二:系统服务和桌面程序的区别 收藏
 Windows 2000/XP/2003等支持一种叫做“系统服务程序”的进程,系统服务和桌面程序的区别是:
系统服务不用登陆系统即可运行;
系统服务是运行在System Idle Process/System/smss/winlogon/services下的,而桌面程序是运行在Explorer下的;
系统服务拥有更高的权限,系统服务拥有Sytem的权限,而桌面程序只有Administrator权限;
在Delphi中系统服务是对桌面程序进行了再一次的封装,既系统服务继承于桌面程序。因而拥有桌面程序所拥有的特性;
系统服务对桌面程序的DoHandleException做了改进,会自动把异常信息写到NT服务日志中;
普通应用程序启动只有一个线程,而服务启动至少含有三个线程。(服务含有三个线程:TServiceStartThread服务启动线程;TServiceThread服务运行线程;Application主线程,负责消息循环);
  摘录代码:
  procedure TServiceApplication.Run;
  begin
    .
    .
    .
      StartThread := TServiceStartThread.Create(ServiceStartTable);
      try
        while not Forms.Application.Terminated do
          Forms.Application.HandleMessage;
        Forms.Application.Terminate;
        if StartThread.ReturnValue <> 0 then
          FEventLogger.LogMessage(SysErrorMessage(StartThread.ReturnValue));
      finally
        StartThread.Free;
      end;
     .
     .
     .
  end;
  procedure TService.DoStart;
  begin
    try
      Status := csStartPending;
      try
        FServiceThread := TServiceThread.Create(Self);
    


相关文档:

Delphi 2010 破解的方法[通用]

破解方法都是用了盒子 Delphi.Distiller.v1.85
费话不多说
 安装任意delphi 2010 正式版
 序列号是 HAAL-DANSGN-FZR5AG-M3BS
  安装完之后点击开始->Embarcadero RAD Studio 2010 ->Check for update
             &nb ......

C#学习及与delphi的比较(一)

刚开始很不习惯c#的风格,哎,先入为主啊,delphi习惯了,{}代替begin/end太扎眼。
属性方法的宣告和代码在一起,没有像delphi分interface/implementation,感觉太乱,都不知道一个class到底有几个方法。
每个属性和方法前面都要单独写private/protected/public,老天,c#是delphi之父设计的揶,怎么不学delphi写一个就行 ......

上位机完工 ——delphi 告一段落

全图

保存数据为txt文档

保存为图像

打印——pdf打印机
 
下一步 有时间的话 实现 标签页面   USB转串口自动识别设备  //重新回到STM32上面-02-26  21:35:21
......

Delphi游戏开发网址大全[转贴]


Source Code
http://www.codefans.com/CodeList/Catalog_5_CodeTime_Desc_1.html
http://www.vscodes.com/sitemap.html
http://www.itlove.net/Soft/261/
DelphiX
http://www.micrel.cz/Dx/
http://www.delphi3d.net/index.php
http://www.pascalgamedevelopment.com/
http://www.2ccc.com/article.asp?articleid ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号