forked from kooloveme/pascalweb
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmod_pascal.dpr
49 lines (42 loc) · 1.24 KB
/
mod_pascal.dpr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
library mod_pascal;
uses
Winapi.ActiveX,
System.Win.ComObj,
Web.WebBroker,
Web.ApacheApp,
Web.HTTPD24Impl,
Main in 'Main.pas' {PascalModule: TWebModule},
uPSI_HTTPApp in 'utils\uPSI_HTTPApp.pas',
ExternalFunctions in 'utils\ExternalFunctions.pas',
MultipartParser in 'utils\MultipartParser.pas',
MVCFramework.Session in 'utils\MVCFramework.Session.pas',
SessionUnit in 'library\SessionUnit.pas';
{$R *.res}
// httpd.conf entries:
//
(*
LoadModule pascal_module modules/mod_pascal.dll
<Location /xyz>
SetHandler mod_pascal-handler
</Location>
*)
//
// These entries assume that the output directory for this project is the apache/modules directory.
//
// httpd.conf entries should be different if the project is changed in these ways:
// 1. The TApacheModuleData variable name is changed
// 2. The project is renamed.
// 3. The output directory is not the apache/modules directory
//
// Declare exported variable so that Apache can access this module.
var
GModuleData: TApacheModuleData;
exports
GModuleData name 'pascal_module';
begin
CoInitFlags := COINIT_MULTITHREADED;
Web.ApacheApp.InitApplication(@GModuleData);
Application.Initialize;
Application.WebModuleClass := WebModuleClass;
Application.Run;
end.