I have been experimenting with saving a both threaded com object in the
Application object.
( Want to have a common pool of connections (not DB))
However I get the following error even though the object has been set to use
the both threading model.
I get this error on a win98 personal web server and a NT4 based IIS4 system.
Neil (Confused)
ASP Error Message
-----------------
Application object error 'ASP 0197 : 80004005'
Disallowed object use
/Pool/AppPoolCreate.asp, line 6
Cannot add object with apartment model behavior to the application intrinsic
object.
My unit
-------
unit impTBoth;
interface
uses
ComObj, ActiveX, TestBoth_TLB, StdVcl;
type
TTIBoth = class(TAutoObject, ITIBoth)
private
FTime : string;
protected
function Get_TTime: WideString; safecall;
procedure Set_TTime(const Value: WideString); safecall;
procedure SetTime; safecall;
{ Protected declarations }
end;
implementation
uses ComServ, SysUtils;
function TTIBoth.Get_TTime: WideString;
begin
Get_TTime := FTime;
end;
procedure TTIBoth.Set_TTime(const Value: WideString);
begin
FTime := Value;
end;
procedure TTIBoth.SetTime;
begin
FTime := DateTimeToStr(Now);
end;
initialization
TAutoObjectFactory.Create(ComServer, TTIBoth, Class_TIBoth,
ciMultiInstance, tmBoth);
end.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz