Jump to content

How to convert a standalone project to isapi/standalone


albertovesx

Recommended Posts

Is it enough to modify the source project adding the code contain in  {} to convert it into  isapi/standalone? I did it with a project and it worked, but I dont know if this is all the modification that we need to do.

//{$define UNIGUI_VCL} // Comment out this line to turn this project into an ISAPI module

{$ifndef UNIGUI_VCL}
library
{$else}
program
{$endif}
  Project1;

uses
  uniGUIISAPI,
  Forms,
  ServerModule in 'ServerModule.pas' {UniServerModule: TUniGUIServerModule},
  MainModule in 'MainModule.pas' {UniMainModule: TUniGUIMainModule},
  Main in 'Main.pas' {MainForm: TUniForm};

{$R *.res}

{$ifndef UNIGUI_VCL}
exports
  GetExtensionVersion,
  HttpExtensionProc,
  TerminateExtension;
{$endif}

begin
{$ifdef UNIGUI_VCL}
  ReportMemoryLeaksOnShutdown := True;
  Application.Initialize;
  TUniServerModule.Create(Application);
  Application.Run;
{$endif}
end.
  • Upvote 1
Link to comment
Share on other sites

Hi, A. soltani.

 

I understand your solution, but that is when we want:

 

Standalone/ISAPI ----Want to convert it into ---->ISAPI

 

 

in my case I have the following:

 

Standalone project ----want to convert it into ---> Standalone/ISAPI

 

My question remains. Is it enough to just add the code contains in {} to convert it into standalone/isapi project? I also modified  the stack size in the ISAPI properties.

 

 

Best regards

Link to comment
Share on other sites

Hi

 

 

Standalone like below.

program Project1;

uses
  Forms,
  ServerModule in 'ServerModule.pas' {UniServerModule: TUniGUIServerModule},
  MainModule in 'MainModule.pas' {UniMainModule: TUniGUIMainModule},
  Main in 'Main.pas' {MainForm: TUniForm};

{$R *.res}

begin
  ReportMemoryLeaksOnShutdown := True;
  Application.Initialize;
  TUniServerModule.Create(Application);
  Application.Run;
end.

and Standalone/ISAPI like the first post.compare them,and add anything that is less.

 

 

Best Regards.

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...