EugeneK
Members-
Content Count
79 -
Joined
-
Last visited
-
Days Won
1
Everything posted by EugeneK
-
Was anyone able to install EurekaLog 7.12.0.4? For me it crashes after login/password screen. 7.12.0.3 is ok.
-
If you are on Windows you can check GetDurationFormatEx in Winapi
-
Hi Anyone else has this issue? It happens when I start debugging. Is it worth create a ticket for Embarcadero? Do they work with antivirus companies to prevent it?
-
It is challenging when you are in a big organization you need to work with IT team, Security team, get approval from management etc. and then repeat it for each new version. I wish Embarcadero worked with antivirus providers to whitelist it permanently.
-
Declaring inline variable inside a loop vs. before the loop
EugeneK replied to Marsil's topic in RTL and Delphi Object Pascal
I always declare it inside the loop if it is not used outside. Declaring it outside may lead to hard to find bugs. -
Yes I figured it out, looks like my work firewall or antivirus blocks it.
-
Site seems to be down right now.
-
Hi Anyone else has internal errors after upgrading? I've got 2 so far https://quality.embarcadero.com/browse/RSP-43437 https://quality.embarcadero.com/browse/RSP-43435 really disappointing that quality degrades, especially when it is so easy to avoid by letting more people in the beta program. Don't understand why Embarcadero is shooting itself in the foot like this.
-
I was not aware of it, the only post I've seen is this one https://blogs.embarcadero.com/delphi-supports-android-api-33-via-yukon-beta/ in comments they say it only goes to selection of customers based on certain criteria.
-
It was only for "premium" subscription, there was whole thread about it
-
Hi There is following code in the end of TCustomSslWSocket.TriggerSSLHandshakeDone Disconnect := FALSE; if Assigned(FOnSslHandshakeDone) then FOnSslHandshakeDone(Self, ErrCode, FSslPeerCert, Disconnect); if Disconnect and (ErrCode = 0) then Close; I wonder why last two lines not just if Disconnect then Close; User can't force disconnect on failed handshake?
-
Another blog about changes https://blog.marcocantu.com/blog/2023-october-nativeint-weak-alias.html
-
Hi Say I have following simple component, in runtime it shows it as blue, but in design time in has default color, how to fix it? unit UTestPanel; interface uses System.Classes, Vcl.Controls, Vcl.ExtCtrls; type TBluePanel = class(TPanel) strict private FPanel: TPanel; public constructor Create(AOwner: TComponent); override; end; procedure Register; implementation uses System.UITypes, Vcl.Forms; constructor TBluePanel.Create(AOwner: TComponent); begin inherited; FPanel := TPanel.Create(Self); FPanel.Parent := Self; FPanel.Align := alClient; FPanel.ParentBackground := False; FPanel.ParentColor := False; FPanel.Color := TColors.Blue; end; procedure Register; begin RegisterComponents('TestObjects', [TBluePanel]); end; end.
-
Get a list of bluetooth devices
EugeneK replied to AndrewHoward's topic in Algorithms, Data Structures and Class Design
Drop TBluetooth on form and check PairedDevices property. -
Right now code for TSocket.Send is following { Return -1 if error, else return number of byte written } function TCustomWSocket.Send(Data : TWSocketData; Len : Integer) : Integer; begin if (FState <> wsConnected) and (FState <> wsSocksConnected) then begin WSocket_Synchronized_WSASetLastError(WSAENOTCONN); SocketError('Send'); Result := -1; Exit; end; bAllSent := FALSE; if Len <= 0 then Result := 0 else begin Result := Len; PutDataInSendBuffer(Data, Len); end; if bAllSent then Exit; TryToSend; So actual sending is happens TryToSend and if it fails result is not -1 but number of bytes written, which is confusing, because it implies that Send was successful. Can we change it to something like if not TryToSend then Result := -1;
-
Yes, but it is a different conversation. I'm just saying if you know that something went wrong it is better to return error and let user handle it than return total length of data have or have not been sent, implying a success.
-
Why do you check for it then? This is from TryToSend, which is called from Send, this is exactly what happens, maybe it does not happen always, but that does not mean it never happens. Count := RealSend(Data, Len); if Count > 0 then begin Dec(FBufferedByteCount, Count); if FBufferedByteCount < 0 then FBufferedByteCount := 0; FWriteCount := FWriteCount + Count; { V8.30 was in RealSend } end; if Count = 0 then break; // Closed by remote if Count = SOCKET_ERROR then begin
-
What happens is that client drops connection but on my side I don't know it so State is still wsConnected and initial check in at the start of Send does not return failure, actual call to sendto inside TryToSend returns error and closes session, but Send still returns number of bytes written. I have to call Connect again in this case which clears buffer so I don't see how it will be sent twice. I handle OnSessionClosed right now, just will be more convenient to see it as result of Send right away.
-
Success is asynchronous, failure you can see right away if sendto returns error, just trying to make code simpler.
-
Missing namespace in OverbyteIcsHttpProt.pas
EugeneK posted a topic in ICS - Internet Component Suite
Hi In latest revision of OverbyteIcsHttpProt.pas this line TypInfo, { V8.71 JK } needs to be changed to {$IFDEF RTL_NAMESPACES}System.TypInfo{$ELSE}TypInfo{$ENDIF}, -
How to draw a semitransparent ellipse on a canvas?
EugeneK replied to vshvetsov's topic in General Help
You can easily do it with Direct2D // ... uses Winapi.D2D1, Vcl.Direct2D; // ... procedure TForm1.Button3Click(Sender: TObject); begin if (TDirect2DCanvas.Supported) then begin var D2DCanvas := TDirect2DCanvas.Create(Canvas, ClientRect); try D2DCanvas.Font.Assign(Font); D2DCanvas.RenderTarget.BeginDraw; D2DCanvas.RenderTarget.SetAntialiasMode(D2D1_ANTIALIAS_MODE_PER_PRIMITIVE); D2DCanvas.Brush.Color := clRed; D2DCanvas.Brush.Handle.SetOpacity(0.5); D2DCanvas.Ellipse(10, 10, 200, 200); D2DCanvas.RenderTarget.EndDraw; finally D2DCanvas.Free; end; end end; -
Hi Is anyone able to use GetIt in 11.3 (online installer), I have following error
-
Yes it was temporary issue, works now.
-
Hi We now have method to sending TBytes in socket, can we have the same for receiving?
-
Hi I wonder what is the need for MaxLen parameter? There is no such logic in ReceiveStr functions, if there is more data than MaxLen is it discarded or you can receive it in next call?