Jump to content

djhfwk

Members
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

0 Neutral

Technical Information

  • Delphi-Version
    Delphi 11 Alexandria

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. procedure THttpCli.DoRequestSync(Rq : THttpRequest); { V7.04 Timeout added } var TimeOutMsec : UINT; bFlag : Boolean; dwWaitMs : DWORD; AbortRequired : Boolean; { V8.71 JK } AbortMsg : String; { V8.71 JK } begin DoRequestAsync(Rq); if not Assigned(FCtrlSocket.Counter) then FCtrlSocket.CreateCounter; FCtrlSocket.Counter.LastSendTick := IcsGetTickCount64; // Reset counter { V8.71 } if FMultiThreaded then dwWaitMs:= 10 else dwWaitMs:= 1000; TimeOutMsec := FTimeOut * 1000; while FState <> httpReady do begin {$IFDEF MSWINDOWS} if MsgWaitForMultipleObjects(0, Pointer(nil)^, FALSE, dwWaitMs, QS_ALLINPUT) = WAIT_OBJECT_0 then {$ENDIF} MessagePump; { V8.71 JK see if user wants to abandon this request } In multithread mode, i think we can use lower period for MsgWaitForMultipleObjects.
  2. In some cases, I need synchronous functionality of dnsquery, so I made a change to OverbyteIcsDnsQuery.pas TDnsQuery now was inherited from TIcsWndControl. These functions were added. AAAALookup SendQuerySync MXLookupSync ALookupSync AAAALookupSync PTRLookupSync QueryAllSync QueryAnySync OverbyteIcsDnsQuery.pas
  3. 🤣 seems the problem is in FUdpSocket.RcvdCount , when it return 0, i changed it to 65535 manually, FUdpSocket.ReceiveFrom still can successfuly got data
  4. The UdpDataAvailable procedure should add len check before setlength, sometimes FUdpSocket.RcvdCount will return 0, and this will cause range error in delphi 11.1, although this can be turn off by uncheck the Range Check option in Project Options. procedure TSysLogServer.UdpDataAvailable(Sender: TObject; ErrCode: Word); var RawMessage : AnsiString; Len : Integer; Src : TSockAddrIn; SrcLen : Integer; SrcIP : AnsiString; SrcPort : AnsiString; begin SrcLen := SizeOf(Src); Len := FUdpSocket.RcvdCount; if Len = 0 then //this should be added, but will cause the UdpDataAvailable event hang randomly Exit; SetLength(RawMessage, Len); Len := FUdpSocket.ReceiveFrom(@RawMessage[1], Length(RawMessage), Src, SrcLen); if Len < 0 then Exit; SetLength(RawMessage, Len); SrcIP := IcsStrPas(inet_ntoa(Src.sin_addr)); SrcPort := AnsiString(IntToStr(ntohs(Src.sin_port))); if Assigned(FOnDataAvailable) then FOnDataAvailable(Self, SrcIP, SrcPort, RawMessage); end;
  5. In my prior snapshot, it's already the default order 😂, the reset palette function works
  6. Radstudio 10.3 and later need NET 4.5, but XP do not support 4.5, so....
  7. Thanks, it's also in new order on OPTIONS, just curious why EMB changed it, reorder them manually is a disaster.....
  8. 😥 I reset the order of palette, then the order can't be back..... In 10.2 , the default order is Standard->Additional->Win32->System->..... but for 10.4, it's Standard->Xml->Live bindings->Live bindings Misc->.....
  9. djhfwk

    How to remove default DLL exports Delphi Rio

    not only dll but also exe have these exports. if you have source, modify the source and use BuildRTLGroup to rebuild the source, no source, use the tool to remove the exports.
  10. djhfwk

    Where is BrandingAPI

    VCLEditors include "BrandingAPI", but nowhere to found BrandingAPI. - -! Does anyone found it? thank you
×