Pacth from Joost van der Sluis : Delphi CoInitialize/CoUninitialize handling separated from FPC code

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@680 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
inoussa 2009-01-27 16:53:43 +00:00
parent c972082d9f
commit e107b3682f
5 changed files with 25 additions and 14 deletions

View File

@ -91,13 +91,13 @@ implementation
uses
{$IFDEF WST_DELPHI}
ActiveX,
{$IFDEF INDY_9}
wst_indy9_utils,
{$ENDIF INDY_9}
{$IFDEF INDY_10}
wst_indy10_utils, IdSchedulerOfThread, IdSchedulerOfThreadDefault,
{$ENDIF}
{$ENDIF WST_DELPHI}
{$IFDEF INDY_9}
wst_indy9_utils,
{$ENDIF INDY_9}
{$IFDEF INDY_10}
wst_indy10_utils, IdSchedulerOfThread, IdSchedulerOfThreadDefault,
{$ENDIF}
base_service_intf,
server_service_intf, server_service_imputils,
metadata_wsdl;

View File

@ -19,8 +19,7 @@ uses
user_service_intf in '..\..\user_service_intf.pas',
user_service_intf_binder in '..\..\user_service_intf_binder.pas',
user_service_intf_imp in '..\..\user_service_intf_imp.pas',
server_service_intf in '..\..\..\server_service_intf.pas',
wst_indy10_utils in '..\..\..\wst_indy10_utils.pas';
server_service_intf in '..\..\..\server_service_intf.pas';
var
AppObject : TwstListener; AppObject2 : TwstListener;

View File

@ -52,7 +52,7 @@
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
<Version Value="8"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="http_server"/>
@ -67,9 +67,6 @@
<IncludeAssertionCode Value="True"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Linking>
<Debugging>
<UseLineInfoUnit Value="False"/>

View File

@ -27,20 +27,28 @@ type
end;
implementation
uses ActiveX;
{$IFDEF WST_DELPHI}
uses
ActiveX;
{$ENDIF WST_DELPHI}
{ TwstIndy10Thread }
procedure TwstIndy10Thread.AfterExecute();
begin
{$IFDEF WST_DELPHI}
CoUninitialize();
{$ENDIF WST_DELPHI}
inherited;
end;
procedure TwstIndy10Thread.BeforeExecute();
begin
inherited;
{$IFDEF WST_DELPHI}
CoInitialize(nil);
{$ENDIF WST_DELPHI}
end;

View File

@ -26,20 +26,27 @@ type
end;
implementation
uses ActiveX;
{$IFDEF WST_DELPHI}
uses
ActiveX;
{$ENDIF WST_DELPHI}
{ TwstIndy9Thread }
procedure TwstIndy9Thread.AfterExecute;
begin
{$IFDEF WST_DELPHI}
CoUninitialize();
{$ENDIF WST_DELPHI}
inherited;
end;
procedure TwstIndy9Thread.BeforeExecute;
begin
inherited;
{$IFDEF WST_DELPHI}
CoInitialize(nil);
{$ENDIF WST_DELPHI}
end;
end.