-
Content Count
1200 -
Joined
-
Last visited
-
Days Won
16
Everything posted by FPiette
-
You can use almost all socket component on the market to do that. For example freeware ICS TWSocket (Client side) and TWSocketServer (Server side). There is a group on this website dedicated to ICS: https://en.delphipraxis.net/forum/37-ics-internet-component-suite/
-
Hello, I have an old and excellent code by Russell Libby dated back to 2003 which I updated in 2013 for current Delphi (XE5 at that time). The code is working well for all Delphi XE versions and also for Delphi 10. Starting from Delphi 10.1 up to current Delphi 10.3.1 Rio, the code is broken. It compile fine but stay blocked at runtime. The blocking occurs in the server code, when an asynchronous I/O against a named pipe that is supposed to be finished. (Line 2710 in Pipes.pas, call to GetOverlappedResult). I tried several hours to debug the code, comparing what happen with Delphi 10 (Working) and Delphi 10.3.1 (not working), without success. I suspect something with multithreading more than with asynchronous I/O. I'll be happy if someone has an idea or - even better - has a look at the source code (attached). To test the code, compile and run the server, then the client. On the client, click connect button, then click send button. You'll see data sent by the client into the server window if it works. If it doesn't work, no data displayed on the server Window and the process has to be killed by task manager. Regards, François Piette Embarcadero MVP PipesRussellLibby.zip
-
Include External Text Files in Output Folder
FPiette replied to Jeff Steinkamp's topic in General Help
Use post-build commands in your project options. Add the command to copy the required file to the destination folder. You have a bunch of macros to access many things. You can see the macros when you click the "..." to add post-build commands. For example $(OUTPUTDIR) in your command (such as copy) will be replaced by the actual output directory. -
Try this: if CardForm = Nil then CardForm := TForm.Create(Self);
-
Only if you use a critical section to protect the queues from multiple access by the main thread and the worker thread. Use a custom message to signal the main thread that a message has been queued. Another approach is to use only Windows messaging. The sender will LParam to store what you name Lvl and use LParam to store a pointer to an memory block that you allocate once per message and where you copy the message, including a nul character to give end of message. The message handler MUST free that memory block after getting the message out of it.
-
Display of bmp and jpeg images is poorer quality in Windows 11
FPiette replied to Martin Liddle's topic in General Help
You should start from scratch. Trust me, frequently when doing so, people find themself the error they made or can't reproduce their own issue. Then then fix themself their code in their larger application based on the small example. -
Display of bmp and jpeg images is poorer quality in Windows 11
FPiette replied to Martin Liddle's topic in General Help
The code you show is not that useful. Preferably Show a minimal, complete, verifiable and reproducible example (See https://stackoverflow.com/help/minimal-reproducible-example). to know exactly what that means). With such example, we will be able to reproduce your problem, understand it and try to solve it. -
Display of bmp and jpeg images is poorer quality in Windows 11
FPiette replied to Martin Liddle's topic in General Help
The size need to be expressed in pixel. And speaking about computer, please tell the OS! You have two computers with two different OS and we don't know which is which. Try to manage that the image are NOT rescaled for display. This is how you get best looking. -
Display of bmp and jpeg images is poorer quality in Windows 11
FPiette replied to Martin Liddle's topic in General Help
Is one or both of the computers have screen scaling other than 100%? What is the original size of the image and what is the size of the rectangle where you display it? -
Is there a component can help me automate web actions ?
FPiette replied to William23668's topic in VCL
You can embed TEdgeBrowser in your application and interact with it to automate web actions. You interact mostly by injecting JavaScript once a page is load. -
OAuth Authentication Embedded or Standard Browser?
FPiette replied to Angus Robertson's topic in ICS - Internet Component Suite
That has not changed. But as always, one must pay attention to initialization and finalization units as well as global variables. All 3 will bring code in. -
How to connect to wss:// server ?
FPiette replied to wright's topic in ICS - Internet Component Suite
According to the sources, WSS works like HTTPS. This means you'd better inherit from THttpCli and override a few things (For example URL parsing to allow wss:// prefix). But before doing that, start by understanding how THttpCli works using OverbyteIcsHttpsTst sample program. Verify it works for you to access a standard HTTPS server so that you are sure you correctly deployed OpenSSL which is used by ICS for all "secure" version of protocols. WSS require a few specific HTTP header and THttpCli has provision for that. Probably the only modification is make THttpCli accept wss:// prefix instead of https://. Also you should use WireShark to see all network communication. And a working WSS client (No need to have source) that you'll use preferably with your target website. Using WireShark, you can see the exact exchange between the client and server. You use that to compare with what you wrote with Delphi and understand where is your errors. -
And which are the issue you have? Compilation errors? Compile but doesn't run?
-
How to connect to wss:// server ?
FPiette replied to wright's topic in ICS - Internet Component Suite
Glad it works. I have no idea which protocol wss:// use. Maybe you should read the documentation related to wss? -
How to connect to wss:// server ?
FPiette replied to wright's topic in ICS - Internet Component Suite
If connection cannot be established, you get an error message, possibly after a long timeout. You probably have to enable SSL/TLS in your ICS application. At least if using port 443. -
How to connect to wss:// server ?
FPiette replied to wright's topic in ICS - Internet Component Suite
You can check a host name resolution to IP address using Windows command line nslookup. I did: ws.twelvedata.com is has 4 IP addresses. But ws.xn--twelvedata-lb99c.com is not a valid hostname. That's your problem and NOT an ICS issue! First thing first : check the hostname you use... -
How to connect to wss:// server ?
FPiette replied to wright's topic in ICS - Internet Component Suite
You must pass the hostname in the TWSocket.Addr property, not a whole URL. The hostname in your case is ws.twelvedata.com. -
You should really show a mockup of what GUI you want because all suggestions done could do what I understood you want. And in my opinion you have enough in Delphi to achieve your goal without to much work.
-
Look at CategoryPanelGroup and CategoryButtons.
-
As far as I know, Dspack is not maintained anymore. But DirectX and DirectShow are supported by Delphi "natively". Look at Delphi RTL source code winapi.D2D2.pas, Winapi.D3D10 and other similarly named files.
-
Windows VCL application pauses when window is not focused...
FPiette replied to DavidJr.'s topic in VCL
You probably already know that: 1) you cannot access the GUI from a worker thread. 2) Where the code is has nothing to do with the run context. If a thread call a method of the main form, that method is running in the thread context. And if main form code call a thread method (also thru a getter/setter), the it runs in the context of the main thread. 3) All data access from different contexts (main thread / worker thread) MUST be synchronized using critical section or other similar mechanism. 4) If a thread use Synchronize, then the synchronized method is run by the main thread effectively defeating multi-threading. -
Attach to Process along with Stepping through Code
FPiette replied to PeaShooter_OMO's topic in General Help
I asked because you mentioned you generate remote debug symbols. -
Attach to Process along with Stepping through Code
FPiette replied to PeaShooter_OMO's topic in General Help
You should not. Manage to generate the executable where it must be or run it from the folder where you generate it. Maybe you are using the remote debugger? -
Attach to Process along with Stepping through Code
FPiette replied to PeaShooter_OMO's topic in General Help
Have you moved the exe file from where you produced it?