Converting between application types

Last Updated: 9/22/2008



Sections above here:
Home  ยป  Deployment

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

Search Documentation:

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.
  1. Change the program clause to library.
  2. Remove the IWMain and Forms from the uses clause.
  3. Add IWInitISAPI to the uses clause.
  4. Remove everything between BEGIN..END.
  5. Add IWRun between BEGIN..END.
  6. 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 CBuilder

Open 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



(C) 2002-2009 - Atozed Software Ltd.