Jump to content

FPiette

Members
  • Content Count

    1200
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by FPiette

  1. FPiette

    Audio via TCP/IP

    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/
  2. 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
  3. FPiette

    Include External Text Files in Output Folder

    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.
  4. FPiette

    Create Form

    Try this: if CardForm = Nil then CardForm := TForm.Create(Self);
  5. FPiette

    Global Variable value "resets"

    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.
  6. 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.
  7. 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.
  8. 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.
  9. 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?
  10. FPiette

    Is there a component can help me automate web actions ?

    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.
  11. 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.
  12. 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.
  13. FPiette

    Turbopower Visual Planit??

    And which are the issue you have? Compilation errors? Compile but doesn't run?
  14. Glad it works. I have no idea which protocol wss:// use. Maybe you should read the documentation related to wss?
  15. 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.
  16. 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...
  17. You must pass the hostname in the TWSocket.Addr property, not a whole URL. The hostname in your case is ws.twelvedata.com.
  18. FPiette

    VCL menu control needed

    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.
  19. FPiette

    VCL menu control needed

    I think so.
  20. FPiette

    VCL menu control needed

    Look at CategoryPanelGroup and CategoryButtons.
  21. FPiette

    DsPack for Delphi 11?

    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.
  22. 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.
  23. FPiette

    Attach to Process along with Stepping through Code

    I asked because you mentioned you generate remote debug symbols.
  24. FPiette

    Attach to Process along with Stepping through Code

    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?
  25. FPiette

    Attach to Process along with Stepping through Code

    Have you moved the exe file from where you produced it?
×