|
Sections below here:
Topics in this section:
Deployment Overview
External Files
Permissions
ISAPI Deployment
ISAPI Notes
ISAPI Utilities
ISAPI Hosting
ISAPI Common Issues
Standalone Deployment
Apache
Service Deployment
Launching Applications
Converting between application types
Application Ports
|
Converting from Standalone to ISAPI in Delphi
Lets take the Guess demo as an example: program Guess;
uses Forms, IWMain, Main in 'Main.pas' {formMain: TIWFormModuleBase}, ServerController in 'ServerController.pas' {IWServerController: TDataModule};
{$R *.res}
begin Application.Initialize; Application.CreateForm(TFormIWMain, formIWMain); Application.Run; end.
- Change the program clause to library.
- Remove the IWMain and Forms from the uses clause.
- Add IWInitISAPI to the uses clause.
- Remove everything between BEGIN..END.
- Add IWRun between BEGIN..END.
- Add GetExtensionVersion, HttpExtensionProc, TerminateExtension to
the exports clause.
Your program should now look like this: library GuessDLL; uses ISAPIApp, IWInitISAPI, Main in 'Main.pas' {formMain: TIWFormModuleBase}, ServerController in 'ServerController.pas' {IWServerController: TDataModule};
{$R *.RES} exports GetExtensionVersion, HttpExtensionProc, TerminateExtension;
begin IWRun; end.
Converting from StandAlone to ISAPI in CBuilderOpen your bpr file in a text editor such as NotePad.
1. Change the EXE to DLL 2. Locate the line that says -tW -tWM"/> and add "D" after the first W 3. Change c0w32.obj to c0d32.obj 4. Save the changes and open the updated project file in C++ Builder 5. Remove IWMain and Forms from the uses clause 6. Add IWInitISAPI to the uses clause. 7. Build the project
|