⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dwsserver.dpr

📁 一个开源软件
💻 DPR
字号:
program DWSServer;//========================================================================// DelphiWebStart// provide a technique to start delphi apps from a TCPServer
// model: Indy Toolset;
// Ex.:  if sRequest = CTR_LIST then begin
//         for idx:= 0 to meData.Lines.Count - 1 do
//    aThread.Connection.WriteLn(ExtractFileName(meData.Lines[idx]));
//    aThread.Connection.WriteLn('::END::');
//    aThread.Connection.Disconnect;
// V1.6, check one or many instances on a form, 12.2.07, LOCs=66
// this CLX app needs qtintf70.dll
// http://max.kleiner.com, max@kleiner.com
//========================================================================
uses  {$IFDEF MSWINDOWS}
  Windows,
  {$ENDIF}
  QForms,
  Sysutils,
  u_dwsserver1 in 'u_dwsserver1.pas' {AppLoaderFrm_Server};
  //udwsfiler in 'udwsfiler.pas',
  //changefind in 'changefind.pas';

{$R *.res}{The default check of the global function is to allow one instance. But you cancontrol the start of many instances at the commandline prompt with::> yourApplication.exe /allowinstances
If the window is running and you don't want multiple instance at the command
line then no further creation of another instance is possible; the functionletAllowInstances() returns false else true.}function letAllowInstances(const mainForm, cmdLine: PAnsiChar): boolean;var keyWindow: HWND;
begin
  keyWindow:= 0;
  result:= false;
  keyWindow:= FindWindow(mainForm, NIL);
  //check if delphi is at design time and creation is allowed
  if FindWindow('TAppBuilder',NIL) <> 0
                       then keywindow:= 0;
  if (keyWindow <> 0) and not FindCmdLineSwitch(cmdLine, true) then
    //set existing instance
    ShowWindow(keyWindow, SW_SHOWNORMAL)
  else
    result:= true;
end;
begin {$IFDEF MSWINDOWS} if letAllowInstances('TAppLoaderFrm_Server', 'allowinstances') then begin   Application.Initialize;   Application.Title:= 'DWS Server';   Application.CreateForm(TAppLoaderFrm_Server, AppLoaderFrm_Server);   Application.Run; end;  {$ENDIF}   Application.Initialize;   Application.Title:= 'DWS Server';   Application.CreateForm(TAppLoaderFrm_Server, AppLoaderFrm_Server);   Application.Run;end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -