Browse Source

+ add an echo example for Microsoft's kernel mode HTTP(S) server

git-svn-id: trunk@38015 -
svenbarth 7 years ago
parent
commit
1a301b5cce

+ 2 - 0
.gitattributes

@@ -3046,6 +3046,8 @@ packages/fcl-web/examples/echo/fcgi/echo.lpr svneol=native#text/plain
 packages/fcl-web/examples/echo/fcgi/echo.res -text
 packages/fcl-web/examples/echo/fphttp/echo.lpi svneol=native#text/xml
 packages/fcl-web/examples/echo/fphttp/echo.lpr svneol=native#text/pascal
+packages/fcl-web/examples/echo/httpsys/echo.lpi svneol=native#text/xml
+packages/fcl-web/examples/echo/httpsys/echo.lpr svneol=native#text/pascal
 packages/fcl-web/examples/echo/webmodule/wmecho.lfm svneol=native#text/plain
 packages/fcl-web/examples/echo/webmodule/wmecho.pas svneol=native#text/plain
 packages/fcl-web/examples/fptemplate/README.txt svneol=native#text/plain

+ 63 - 0
packages/fcl-web/examples/echo/httpsys/echo.lpi

@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+  <ProjectOptions>
+    <Version Value="10"/>
+    <PathDelim Value="\"/>
+    <General>
+      <Flags>
+        <MainUnitHasCreateFormStatements Value="False"/>
+        <MainUnitHasTitleStatement Value="False"/>
+      </Flags>
+      <SessionStorage Value="InProjectDir"/>
+      <MainUnit Value="0"/>
+      <Title Value="echo"/>
+      <UseAppBundle Value="False"/>
+      <ResourceType Value="res"/>
+    </General>
+    <i18n>
+      <EnableI18N LFM="False"/>
+    </i18n>
+    <BuildModes Count="1">
+      <Item1 Name="Default" Default="True"/>
+    </BuildModes>
+    <PublishOptions>
+      <Version Value="2"/>
+    </PublishOptions>
+    <RunParams>
+      <local>
+        <FormatVersion Value="1"/>
+      </local>
+    </RunParams>
+    <Units Count="1">
+      <Unit0>
+        <Filename Value="echo.lpr"/>
+        <IsPartOfProject Value="True"/>
+      </Unit0>
+    </Units>
+  </ProjectOptions>
+  <CompilerOptions>
+    <Version Value="11"/>
+    <PathDelim Value="\"/>
+    <Target>
+      <Filename Value="echo"/>
+    </Target>
+    <SearchPaths>
+      <IncludeFiles Value="$(ProjOutDir)"/>
+      <OtherUnitFiles Value="..\webmodule"/>
+      <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
+    </SearchPaths>
+  </CompilerOptions>
+  <Debugging>
+    <Exceptions Count="3">
+      <Item1>
+        <Name Value="EAbort"/>
+      </Item1>
+      <Item2>
+        <Name Value="ECodetoolError"/>
+      </Item2>
+      <Item3>
+        <Name Value="EFOpenError"/>
+      </Item3>
+    </Exceptions>
+  </Debugging>
+</CONFIG>

+ 34 - 0
packages/fcl-web/examples/echo/httpsys/echo.lpr

@@ -0,0 +1,34 @@
+{
+    This file is part of the Free Component Library (FCL)
+    Copyright (c) 2017-2018 by the Free Pascal development team
+
+    Windows HTTP Server API based TCustomWebApplication
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+program echo;
+
+uses
+  fpHTTPSys, wmecho;
+
+{
+  Before using this example you need to add the URL to the system using a
+  comand like the following (executed with Administrator priviledges):
+
+  netsh http add urlacl url=http://+:80/fpweb user=DOMAIN\User
+
+  Whereby DOMAIN\User is the user or group you want to execute this example in.
+}
+
+begin
+  Application.Initialize;
+  Application.Urls.Add('http://+:80/fpweb');
+  Application.Run;
+end.
+