-
Content Count
3060 -
Joined
-
Last visited
-
Days Won
139
Everything posted by Remy Lebeau
-
Well, then the hint is valid since the value -1 will never be used.
-
Did they update Abort() to mark it with the new 'noreturn' attribute?
-
Have you tried changing the Size property of the VCL's global TScreen.MenuFont?
-
This is explained in the DocWiki documentation: https://docwiki.embarcadero.com/RADStudio/Florence/en/What's_New#Unified_internal_version_numbers_to_37
-
New Delphi features in Delphi 13
Remy Lebeau replied to David Heffernan's topic in RTL and Delphi Object Pascal
Yes. Major version releases can coexist with each other. It's minor version releases that can't. -
Install, activate and use Delphi on an offline computer (windows)
Remy Lebeau replied to PatAura's topic in General Help
The Community edition does not support offline installation or offline registration.. You need a Paid edition for that. -
udp discovery Delphi Super Fast LAN tethering in IPv4 network using Indy UDP AutoDiscovery IP
Remy Lebeau replied to bravesofts's topic in I made this
Forcing use of client/server components on specific ports does not provide security. Nor are your "secret" ports actually very secret, they are easily discoverable. Also, the server has no way to know if the client is even listening on the "secret" port before replying, so there's no security in favoring one port over another. If you want true security, use a proper security protocol, like DTLS. Also, using an asynchronous server component to receive 1 response is not making the client faster and simpler, it's actually making the client slower and complex (multi-thread handling, breaking up code flow, etc), and it goes against one of Indy's core designs - linear writes and reads in command/response models. But whatever. It's your business design, do what makes sense to you. What do I know? I'm just the guy who maintains the components you are basing your work on. Good luck. -
udp discovery Delphi Super Fast LAN tethering in IPv4 network using Indy UDP AutoDiscovery IP
Remy Lebeau replied to bravesofts's topic in I made this
I have some issues with your implementation: IPv6 networks are not supported. The client request is needlessly wordy. The client broadcasts to 255.255.255.255 instead of to the subnet's actual broadcast IP. Some routers block traffic to 255.255.255.255 by default. In case the client is run on a machine with multiple networks installed (VPN, etc), there is no option to let the user decide which network to broadcast to. The client is using separate UDP sockets to send the request and read replies. You are forcing the client to receive on a specific listening port. The server is not sending its reply back to the real port that actually sent the request. Most routers will block this traffic if port forwarding is used. On the server side, always reply to the sending port. On the client side, either 1) let TIdUDPClient read replies on its sending port, or 2) let TIdUDPServer send the request on its listening binding. Use one or the other, not both. Doesn't use Indy's TIdStack.GetLocalAddressList() method to discover local networks (at least on Windows, as it may have issues on Android). Since your goal is to allow a TCP client to discover a server, I would opt to get rid of the TIdUDPServer on the client side, and just use TIdUDPClient by itself. Send a request, read a response, done. You don't need to make that process asynchronous with TIdUDPServer in most use cases. Using TIdUDPServer on the client side makes more sense if you want to discover multiple servers and then let the user choose between them, or to leave it open so servers can just broadcast their presence over time. -
Global in RTL for unit communication?
Remy Lebeau replied to david berneda's topic in RTL and Delphi Object Pascal
Why? You said you are creating IDE design-time packages. So they run in the IDE process, and the IDE is not itself a cross-platform application, it is a Windows-only VCL application. What am I missing? Can you provide more exact details of what you are actually trying to accomplish? -
Global in RTL for unit communication?
Remy Lebeau replied to david berneda's topic in RTL and Delphi Object Pascal
System.Classes.RegisterClass()? It is not clear what you are actually looking for. Please clarify. Can you provide an example of what you want to accomplish? Maybe using custom window messages, or System.Messaging.TMessageManager ? Are they separate packages in the same process, or are they in separate processes? It makes a big difference depending on whether you have to cross the process boundary or not. There is nothing like that framework in the common RTL. And it wouldn't make sense anyway if your two units can't share a common unit that defines what they need to share. -
If I'm reading your codes correctly, you are both assuming that ReturnAddress() itself doesn't have a stack frame, and it is returning the address stored in its caller's stack frame. Which means it won't work correctly if its caller has no stack frame, or if it is called from inside of an inline function.
-
ICS 8.71 UDP ServerScoket inside a Thread
Remy Lebeau replied to LennyKrost's topic in ICS - Internet Component Suite
Never heard of CleanTalk. Are you putting your code snippets in code blocks (the `</>` button on the editor toolbar)? I'm guessing you did not read the ICS documentation. It says: https://wiki.overbyte.eu/wiki/index.php/TWSocketServer On a side note: `while PeekMessage() = False do WaitMessage();` is the exact same as calling `GetMessage()` without a loop. Makes sense, if you are creating a TCP server socket expecting it to receive UDP traffic. You need a UDP server socket. -
ICS 8.71 UDP ServerScoket inside a Thread
Remy Lebeau replied to LennyKrost's topic in ICS - Internet Component Suite
Can you provide the actual code you are having trouble with? Did you set the component's MultiThreaded property to true? Does your thread have a message loop? -
debugging an executable started by the one being debugged
Remy Lebeau replied to dummzeuch's topic in Delphi IDE and APIs
"The only way I currently see would be to attach to that program after it has been executed. But that's rather cumbersome." -
Start Menu items missing for RAD Studio 12.3
Remy Lebeau replied to Remy Lebeau's topic in Delphi IDE and APIs
The only useful tidbits I get from that page are that: the Start Menu doesn't display two shortcuts pointing to the same target the Start Menu tries to block showing Uninstallers. Good to know. Seems to be on track with what I'm seeing. -
I just installed RAD Studio 12.3 on Windows 10. On my Start Menu, underneath "Embarcadero RAD Studio 12", I see the following shortcuts: C++Builder 12 C++Builder 12 (DPI Unaware) Delphi 12 Delphi 12 (DPI Unaware) Migration Tool RAD Studio 12 (64-bit Initial Release) RAD Studio 12 (64-bit Initial Release) (DPI Unaware) RAD Studio 12 RAD Studio 12 (DPI Unaware) RAD Studio Command Prompt RAD Studio Command Prompt (x64) Uninstall Note the two highlighted items are missing. However, in the "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Embarcadero RAD Studio 12" folder, I see the following shortcuts: C++Builder 12 C++Builder 12 (DPI Unaware) Delphi 12 Delphi 12 (DPI Unaware) Migration Tool RAD Studio 12 (64-bit Initial Release) RAD Studio 12 (64-bit Initial Release) (DPI Unaware) RAD Studio 12 RAD Studio 12 (DPI Unaware) RAD Studio Command Prompt RAD Studio Command Prompt (x64) Uninstall So, why are these two items not appearing on my Start Menu? Anyone else ever see this happen?
-
Start Menu items missing for RAD Studio 12.3
Remy Lebeau replied to Remy Lebeau's topic in Delphi IDE and APIs
It turns out that I had a separate "RAD Studio 12" shortcut in the "%APPDATA%\Microsoft\Windows\Start Menu\Programs" folder from an earlier installation. So the Start Menu was displaying "RAD Studio 12" underneath "R" instead of underneath "Embarcadero RAD Studio 12". When I deleted the rogue shortcut, "RAD Studio 12" now appears under "Embarcadero RAD Studio 12" as expected. But, the "Uninstall" shortcut is still missing. And I have several other programs with "Uninstall" shortcuts that are also missing. Apparently, the Start Menu doesn't like displaying multiple shortcuts with duplicate names, even though they are in different folders. Nice one, Microsoft. -
Or TThread.ForceQueue(), eg: procedure TMyForm.Edit1Exit(Sender: TObject); begin TThread.ForceQueue(nil, procedure begin ShowDialog('It works!'); end ); end;
-
v13 has not been released yet, and no information about its pricing is available at this time.
-
Calling a 64 bit DLL from 32 bit code
Remy Lebeau replied to dummzeuch's topic in Delphi IDE and APIs
In a word, no. Certainly not directly, anyway. Basically. Load the DLL into a 64bit process, and then use some kind of IPC with the 32bit process. The article is using C#, but the technique is not limited to C#. A COM out-of-proc server is aits own EXE process, and can be instantiated by 32bit and 64bit clients. So, you can write a 64bit server that wraps the 64bit DLL (or use COM's own DllSurrogate if the DLL is itself a COM object) , and then a 32bit client can use the server's COM object. I'm not familiar with that. It looks interesting but I wouldn't trust it in production code. -
The Result variable (enabled by default via the {$EXTENDEDSYNTAX ON} / {$X+} directive) has been available for a very very long time, much earlier than 2000. But even so, assigning values to the function's name is still an allowed option, too.
-
Your descriptions are a bit confusing. Can you show the updated code that is not working the way you want?
-
Obviously, I'm aware of the existence of class procedures/functions, but I've never seen a "procedure of class" declaration before. I didn't know that was a possibility. In any case, a "class" procedure/function still has a hidden Self parameter, it simply points at the class type instead of an object instance. Your code is not taking that parameter into account. You have to declare a "class" procedure/function as "static" in order to remove its Self parameter.
-
There's no such thing as an "active" class method. Non-static, dynamic, virtual methods - these all have a hidden implicit Self pointer to the object instance they are called on. Yes, because they will all be using the Self pointer. For example procedure TForm5.FormClick(Sender: TObject); begin ABCycle.Visible := True; end; Is really this: procedure TForm5.FormClick(Sender: TObject); begin Self.ABCycle.Visible := True; end; If such a procedure is trying to access members of the Form of object, then yes. I suggest you brush up on your fundamentals. For instance: https://docwiki.embarcadero.com/RADStudio/en/Procedures_and_Functions_Index https://docwiki.embarcadero.com/RADStudio/en/Classes_and_Objects_Index https://docwiki.embarcadero.com/RADStudio/en/Methods_(Delphi)
-
Since we can't see the rest of your code, we can't help you with these errors. The sole function you have shown only had one mistake in it. So clearly these other errors are caused by other problems (likely other syntax mistakes) higher up in your code that we can't see. Because clearly THIS unit has other mistakes in it that are breaking its compilation. Obviously yes, but what that flaw could be specifically is anybody guess without seeing the rest of the code in question. That behavior happens when the failing code is NOT inside a non-static method of the TForm5 class, thus requires an explicit object reference to reach the ABCycle member. It doesn't matter if you have 1 Form or 100. You need a valid TForm5 object reference in order to access its ABCycle member. Inside of a method of the TForm5 class, that reference can be the implicit 'Self' pointer. But code outside of TForm5's methods will need an explicit pointer to the Form5 object. That behavior would happen if DaysInMonth() is a non-static method of the TForm5 class, and thus must be called on a valid Form5 object reference, but the calling code does not have such a reference without qualifying it.