#1 2015-09-24 11:44:15

lagodny
Member
Registered: 2015-01-28
Posts: 50

THttpApiServer.SetTimeOutLimits problem

Windows 8.1 / Windows 7

Code

      THttpApiServer(FHTTPServer.HttpServer).SetTimeOutLimits(
        2*SecsPerMin, 2*SecsPerMin, 2*SecsPerMin, 20*SecsPerMin, 2*SecsPerMin, 2*SecsPerMin);

raises exception

EHttpApiServer ("HttpSetUrlGroupProperty failed: The data area passed to a system call is too small (122)") at 0070299B  stack trace API 005B3E10 005B3E38 00407E44 776FB5DF 776B0133 0070299B 0070532F 00807412 008078DE 00807B0B 00808022 004971E1 0049B5E8 004B7129 0049B738 0049B5E8 0054523E 0049AC3B 0045A92A 76C262FA 76C26D3A 76C2965E 76C296C5 73EC45A1 73EC4603 73EC448D 76C262FA 76C26D3A 76C30D27 76C30D4D 

Offline

#2 2015-09-24 11:48:58

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: THttpApiServer.SetTimeOutLimits problem

Are you sure FHTTPServer.HttpServer is a THttpApiServer?

Try (FHTTPServer.HttpServer as THttpApiServer).SetTimeOutLimits().

Offline

#3 2015-09-24 11:56:30

lagodny
Member
Registered: 2015-01-28
Posts: 50

Re: THttpApiServer.SetTimeOutLimits problem

Yes, of course! smile

  if FHTTPServer.HttpServer is THttpApiServer then
  begin
    if THttpApiServer(FHTTPServer.HttpServer).HasAPI2 then
      THttpApiServer(FHTTPServer.HttpServer).SetTimeOutLimits(
        2*SecsPerMin, 2*SecsPerMin, 2*SecsPerMin, 2*SecsPerMin, 2*SecsPerMin, 2*SecsPerMin);
  end
  else if FHTTPServer.HttpServer is THttpServer then
  begin
    THttpServer(FHTTPServer.HttpServer).ServerKeepAliveTimeOut := 20 * MSecsPerSec * SecsPerMin;
  end;

Offline

#4 2015-09-24 12:33:44

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: THttpApiServer.SetTimeOutLimits problem

Win64 target?

Offline

#5 2015-09-24 12:37:15

lagodny
Member
Registered: 2015-01-28
Posts: 50

Re: THttpApiServer.SetTimeOutLimits problem

No.
Target: Win32.

Offline

#6 2015-10-01 09:36:10

lagodny
Member
Registered: 2015-01-28
Posts: 50

Re: THttpApiServer.SetTimeOutLimits problem

I am sorry to bother you again.
But how can i fix the problem?

Offline

#7 2015-10-01 11:05:01

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: THttpApiServer.SetTimeOutLimits problem

I may have found something.

One API structure did not match https://msdn.microsoft.com/en-us/librar … p/aa364661 definition.

Could you try http://synopse.info/fossil/info/6f48111 … 54ee3ddeb4 ?

Offline

#8 2015-10-05 05:34:23

lagodny
Member
Registered: 2015-01-28
Posts: 50

Re: THttpApiServer.SetTimeOutLimits problem

It works now!
Thanks!

Offline

Board footer

Powered by FluxBB