-
Content Count
1167 -
Joined
-
Last visited
-
Days Won
16
Everything posted by FPiette
-
How to register a shell property sheet for a single file type?
FPiette replied to FPiette's topic in Windows API
Thanks @Remy Lebeau. I will give it a try. -
Best Practice Question: Bidirectional EXE-to-EXE communication
FPiette replied to Alexander Halser's topic in RTL and Delphi Object Pascal
You need "Inter Process Communication" (IPC) between your different executable. I personally use sockets to communicate between exe because the exact same socket and code can also be used when the exe are running on different networked computers! This means you can choose with no code change between local computing or distributed computing. Using sockets, as any other IPC, you have to design messages that will be exchanged between your executable. You can use your own design or use XML or JSON or whatever you like most. There are several "socket" libraries fro Delphi. I'm using "Internet Component Suite" (ICS) which also supports SSL/TLS if you are concerned with communication security. -
How to register a shell property sheet for a single file type?
FPiette replied to FPiette's topic in Windows API
Because I don't know what to make it point to. You told that the ProgId is used when the file must be opened. I don't want to change the application opening it. My code is just to display some metadata from the file, not the file data. -
How to register a shell property sheet for a single file type?
FPiette replied to FPiette's topic in Windows API
There is no ProgID for the file type. And yet, Windows open it using Microsoft Windows Photo application (.ARW file is Sony RAW file for photo). If you want to try with a real file on your system, you can download a photo in .ARW format: http://wiki.overbyte.be/arch/FPI09894.ARW (Can't attach it here because it is a 50MB). It is possible that you need to install Microsoft RAW extension (https://apps.microsoft.com/store/detail/extension-dimage-raw/9NCTDW2W1BH8) It is needed for Win10 but already included by default with Win11. If you have Adobe Photoshop or Lightroom installed, thing may be different, not sure. -
How to register a shell property sheet for a single file type?
FPiette replied to FPiette's topic in Windows API
Thank you for your message but you are still out of scope of my question! My question about a property sheet handler associated with a file extension. To say it otherwise, I don't want to create a new file extension nor associate a program to open a file having that file extension (This is what you show). I guess that you don't know what a "Property Sheet Handler" is. A property sheet is what you see when you right-click on a file and select "properties" in the popup menu. Then you see a window with several tabs. A property sheet is a shell extension that build a show a new tab. I wrote such a property sheet handler using Delphi. I can easily register it for ALL file types (AKA file extension) but I don't want it for all files, I want it only for a small number of file extensions. Look at this: https://learn.microsoft.com/en-us/windows/win32/shell/propsheet-handlers -
How to register a shell property sheet for a single file type?
FPiette replied to FPiette's topic in Windows API
Thanks. I already saw that documentation. It is probably outdated because there is no ProgID for the file extension. -
How to register a shell property sheet for a single file type?
FPiette replied to FPiette's topic in Windows API
I dont know if help you, but you try see the result when associating any new EXTention file Doesn't help. My question is not related to the creation of a new file type (extension). -
Is it possible that an exception does not inherits from Exception class?
FPiette replied to Wagner Landgraf's topic in RTL and Delphi Object Pascal
Probably if the process is aborted, DoSomething will not execute. Same if power turned off. Same if fatal system error. -
What would be the best approach for accessing a large number of files stored on a single machine from multiple servers?
FPiette replied to ioan's topic in General Help
Network share is the way to go. You simply have to design the file server correctly: use a Windows SERVER operating system with a lot of RAM (At least 64GB, preferably 128GB. RAM is more important than CPU power in the role). Also make sure the network is not the bottleneck. Use a 10Gbit Ethernet network with all devices properly sized. Not all network interface card are born equal, pay attention to their performance. Use fast hard disks such as 15000 rpm SAS or fast SSD. -
That's what the Release method does. Much easier with Release.
-
You have to use Release instead of Free or Destroy. Release will defer the actual Free until after all events handlers are done.
-
Image pool server
FPiette replied to dkprojektai's topic in Algorithms, Data Structures and Class Design
Adopt a layered architecture. On part is the communication with the sources and one part is the processing. The communication shall work with "connectors" handling a specific protocol, for example HTTP, or FTP, or network share and so on. The communication layer talk to the connectors at one end and talk to the processing at the other end. There shall be a queue between the communication layer and the processing layer. The queue shall be serviced by one or more processing units. Of course this is an overly simplified view of one possible architecture. You have to tell much more about the context and goal to get better help. First you need to think about the architecture, then the implementation. This second stage is where Delphi can do something for you. -
Image pool server
FPiette replied to dkprojektai's topic in Algorithms, Data Structures and Class Design
What are the sources? What is the processing? Is the processing the same for all images? Probably more a batch processing than a pool. -
🙂 TWSocket.SetSocketRcvBufSize include that option. Has a look at the source code. The socket must be open to change that option since the socket handle is required.
-
BufSize is only important for sending. For UDP, it must be large enough to contain the largest packet to be sent. Buf size is an internal TWSocket working thing. SocketRcvBufSize and SocketSndBufSize is directly passed to winsock API and it is quite a complex topic. See Microsoft documentation at https://learn.microsoft.com/en-us/troubleshoot/windows/win32/data-segment-tcp-winsock Also note that the network layer may break packets into smaller one. You must set jumbo packet on all devices between sender and receiver. Use WireShark or other protocol analyzer to see if the packet fragmentation is done at sending side (You see it in the protocol analyzer) or into winsock at receiver side (You don't see it in protocol analyzer).
-
Did you try setting SocketSndBufSize, SocketRcvBufSize and BufSize? The first two are passed to Winsock to set Windows own buffer size. The later (BufSize) is used by TWSocket to manage his linked list of buffers for synchronous send.
-
New to x509 - how to mimic Postman config using ICS
FPiette replied to KMarb's topic in ICS - Internet Component Suite
Since you made it working with Postman, I suggest you use WireShark or other network analyser software to dump the Postman request and then dump the request you send with ICS. Comparing the two will give you a good idea about what is wrong. -
Anyone using MQTT protocol with ICS?
FPiette replied to Angus Robertson's topic in ICS - Internet Component Suite
Maybe a message on GitHub would reach more peoples? Or in https://en.delphipraxis.net/forum/29-network-cloud-and-web/ ? -
In small demo applications, I use a TDataModule with component dropped on it. For real world large application, I use a simple unit have the code that encapsulate database access and database components are created at runtime. The unit offers classes that give access to the data stored in the database in an abstracted way. More code but much better program if correctly designed.
-
Writing & Reading as a Console App?
FPiette replied to Steve Maughan's topic in RTL and Delphi Object Pascal
Classic Pascal I/O is probably not the most efficient. I would use direct WinAPI call (GetStdHandle, ReadFile, WriteFile). Using that API, you can easily make it non blocking (using I/O Completion Ports and/or multi threading). To organize your software, you should probably create an abstract class offering the services you need to communicate and then make one or more implementation using various I/O mechanisms. -
Writing & Reading as a Console App?
FPiette replied to Steve Maughan's topic in RTL and Delphi Object Pascal
I read in UCI specification: "the engine must always be able to process input from stdin, even while thinking.". Are you sure it is the case with your engine ? -
Hello, I'm trying to write a shell property sheet extension. The DLL with the COM object is not an issue for me since I already done that kind of work with my context menu extension (That's easy with Delphi). But for a property sheet extension, the COM object must implement IShellPropSheetExt. In that interface AddPage method must create the UI. There are many C++ examples on the web but I did not found any Delphi example. The C++ examples all use the old Windows dialog box feature. I don't want to use a windows dialog box but a Delphi form. I have no idea how to do that and search for some Delphi example or tutorial (Already done extensive Google searches without success). Any help will be appreciated! Thanks.
-
Writing a property sheet shell extension (IShellPropSheetExt)
FPiette replied to FPiette's topic in Windows API
That's what I have done and it works. The trick is to use an empty template and then from WM_INITDIALOG create a parented Delphi VCL form. -
You should probably enter a bug report at https://quality.embarcadero.com. Don't forget to attach your MSVC test program (Entire solution) and the Delphi DLL complete project. with a good report, chances are that it is tested quickly. Once the report is created, provide the link here.
-
Writing a property sheet shell extension (IShellPropSheetExt)
FPiette replied to FPiette's topic in Windows API
A Delphi VCL form is a standard window. It is probably possible to overload a dialogbox control using a parented Delphi form. That's what I'm trying to do to begin.