-
Content Count
1200 -
Joined
-
Last visited
-
Days Won
16
Everything posted by FPiette
-
There is a new Delphi book in FRENCH. It will be useful to all people wanting to learn object oriented programming using Delphi. The books is based on Delphi 10.3 Community Edition but of course is also very good for all other editions and recent versions. To be noted: the author make use of UML schemas to illustrate OOP. The book is mostly oriented to Windows with VCL but also includes two chapters introducing FMX. https://www.editions-eni.fr/livre/delphi-10-3-programmation-orientee-objet-en-environnement-windows-9782409024665
-
You could check for a resource that is only accessible from within the intranet. You could also connect to a share only accessible in your intranet, using a user/code password correctly hidden in the DLL. Of course this would not stop a real hacker, but the casual user will be barred.
-
Are you trying to read an existing file format or are you trying to design your own to store your own data? We can only help you correctly if you tell us what you need to do! Telling us a problem you get with a solution you imagined for a problem we don't know is not the best track to the real solution.
-
You want a typed file, right? Then you cannot have any dynamic type in the record which makes the file. A string is a dynamic type. Instead use an array of characters with specific length: THeader = packed record flags : integer; dummy : integer; name: array [0..25] of Char; padding: integer; end; You could add a property or a method to the record to transform that array of characters to a string for ease of use. Don't forget that characters are 16 bit unicode since Delphi 2009. If you need 8 bit characters, use AnsiChar instead. Also not that I used the keyword "packed" so that the compiler do not insert padding data for alignment for better performances.
-
Problem With Latest C++ Builder Community Ed. Install
FPiette replied to vchowdhr's topic in General Help
If I understand well, you have first created a blank VCL project. Compiled it and ran it. It works as expected. Now you added one TButton on the form and wrote NO code, compiled and go NO error compiling. When you run the project, nothing happens. Not even a form flashing. Is it what you've done? If you have not done that, please do it now and tell us if it works. -
Could you show a minimal reproducible example of the behavior you observe? Publish the .pas and .dfm so that we can easily check if we reproduce the behavior here.
-
Problem With Latest C++ Builder Community Ed. Install
FPiette replied to vchowdhr's topic in General Help
Does the application stop immediately? Did you run the application under the debugger? If not, you should. -
Would you show the code you currently use? It is always easier to answer a question when a minimal reproducible example is given. Provide the code and the required test images.
-
For years Wilfried Mestdagh was maintaining a very good ICS FAQ at www.mestdagh.biz/ics/faq. He recently died 😞 RIP. We are looking for volunteers wanting to copy his valuable content to wiki.overbyte.be where other FAQ are already there. I'm afraid this content will disappear soon. If you want to help, contact me privately by email (You'll find my email at www.overbyte.be). Thanks.
-
I have received the file from @Mark- it is now located at http://wiki.overbyte.eu/arch/MestdaghFAQ.zip Any volunteer to translate to wiki syntax? Contact me by email and I'll give you instructions.
-
The difficult (Not difficult but time consuming actually) part of the work is to recreate the content using the Wiki syntax. Can you do that also ? Anyway, I'll be glad to received the zip file since it has been done. Thanks.
-
You should not pass thru ColorToRGB.
-
You need to first copy the file from the web server to your computer (in memory or on disk as you like). For that purpose you need a HTTPS component such as the one in ICS (Internet Component Suite http://wiki.overbyte.be and available from GetIT menu in Delphi IDE), or from Indy (Included in Delphi). Using that component you can download the file and then do whatever you need with it.
-
It is likely that you have dcu for D10.3 found by D10.4 which result in the error you see. I'll assume you installed D10.4 in another directory than D10.3. Make sure the paths in Delphi options, in project options and global to the system are all pointing to the correct Delphi instance. Using SysInternals ProcessMonitor you can see which dcu files Delphi is using.
-
Do you have several Delphi versions installed?
-
TFileOpenDialog - limit functionality in RemoteApp
FPiette replied to chkaufmann's topic in Windows API
tsclient is the host-name. The host-name portion of a UNC name can consist of either a network name string set by an administrator and maintained by a network naming service like DNS or WINS, or by an IP address. By default, the host-name is made equal to the computer name. -
TFileOpenDialog - limit functionality in RemoteApp
FPiette replied to chkaufmann's topic in Windows API
If you correctly set Windows permission, the user will not even see what he has not to see. -
slowdown tcp transfer under Windows 10 64bits
FPiette replied to Alain1533's topic in ICS - Internet Component Suite
Warning: to much logging or display will drastically slow down network I/O. It is better to log in memory (TMemoryStream) during the execution and save to a file if needed at the end of program. -
slowdown tcp transfer under Windows 10 64bits
FPiette replied to Alain1533's topic in ICS - Internet Component Suite
One of the involved network card is failing or the Ethernet cable is defective, or the connections, or the junction in the patch panel (if any) or the switch (if any). If it is possible, change the way the PC and PLC are connected (direct cable is best, maybe cross-cable if old network card not able to seen how it is connected). By the way, are error displayed with command 'netstat -e" I suggested to use? -
A class that returns different types of components
FPiette replied to Stano's topic in Algorithms, Data Structures and Class Design
You mean return an instance of TSpinEdit or TPanel, or do you mean it return a class type (In which case the rest of the line is wrong). So let's assume it returns an instance of a class like TSpinEdit or TPanel. This can be done by returning a common ancestor such as TComponent. But which instance is returned? But don't expect the compiler to generate code to access properties like Value or Top. It can only access properties declared in the base class. Using RTTI, it is possible to have more or less the equivalent: MyClass.DBSource(3, 'Value', SpinEdit, 'Value'); // TSpinEdit MyClass.DBSource(5, 'Top', SpinEdit, 'Value); // TPanel RTTI, under some conditions, will allow to discover a property of a given name, his type and setter/getter. I don't see any advantage doing such trick. -
A class that returns different types of components
FPiette replied to Stano's topic in Algorithms, Data Structures and Class Design
Sorry, it doesn't explain anything. What are those lines supposed to do? What is MyClass? What is method DBSource supposed to do? What is the argument? -
A class that returns different types of components
FPiette replied to Stano's topic in Algorithms, Data Structures and Class Design
You may understand what you want, but at least I don't! If you want a good answer, you have to formulate a good question. If you want to use your own terms, you must describe each one using concept of Delphi/Object Pascal. And don't forget that not everybody is familiar with non standard component you are using. You'd better express your requirements using only what comes out of Delphi box. -
A class that returns different types of components
FPiette replied to Stano's topic in Algorithms, Data Structures and Class Design
I don't understand your question! A class do not "return different types of component". A class could have a method returning a value which can be an object type or an object instance or another data type. Please rephrase your question... -
slowdown tcp transfer under Windows 10 64bits
FPiette replied to Alain1533's topic in ICS - Internet Component Suite
We'll try to determine if the slow down comes from the computer or from ICS. If you still have the old computer, is it possible to test a simple file copy using Windows explorer from the old computer to a third computer and from the new computer and the same computer. Same file in both cases. Use a big file so that the duration is at least 30 seconds. The goal is to compare the throughput of Windows networking with a common reference (the 3rd computer). Measure several copies, usually the first is slower than the next because the file is not yet in disk cache. Other test: setup a web server or a ftp server on the 3rd computer (You may use ICS demo application). Then measure the throughput to copy the same file as above using ICS at both ends. Again the goal is to compare is HTTP of FTP has changed speed between the old and new computer, everything else staying the same. Using the command line, run "netstat -e" to show Ethernet statistics. You'll see the error and reject count. They should be both zero. By the way, are you using IPv4 or IPv6? -
slowdown tcp transfer under Windows 10 64bits
FPiette replied to Alain1533's topic in ICS - Internet Component Suite
Did you check the speed when compiling your application as 32 and 64 bit? I would also check if connectivity is OK. Maybe the new machine has a bad Ethernet cable or switch or network card and experience a lot of retries. Are "jumbo packets" enabled on the network card? Is there any "security" product checking connections (Firewall, anti-virus,...)? Is the new computer hardware superior to the old one?