-
Content Count
1167 -
Joined
-
Last visited
-
Days Won
16
Everything posted by FPiette
-
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? -
Can't resolve unit named WinDos and Undeclared identifier: 'doserror'
FPiette replied to KPB's topic in General Help
As it's name implies, DosError is the error code returned by an MS-DOS function. With Delphi, used to build Windows application, you have Windows API function GetLastError which is more or less the same function. BUT Delphi mostly use exception to report errors. There is also a global variable "error". To help you much, you should publish the part of your application which generate an error. -
TFileOpenDialog - limit functionality in RemoteApp
FPiette replied to chkaufmann's topic in Windows API
It is much better to handle the problem at the system level. The client connect to the server using credentials (User code and password) that maps to a user on the server. You can change that user permissions so that it can access just what he has to on that server. If there are several users, it is easier to create a group and assigned the permission to the group, denying almost everything else to the user. -
Need help with Delphi 7 / DCPCrypt - TDCP_rijndael.DecryptString - How to make it work?
FPiette replied to steve faleiro's topic in RTL and Delphi Object Pascal
Have you checked that the first stage (Base64 decoding) gives the same result? -
It is better to show at least the full class declaration. No need to insert a screen dump, you can directly insert source code in your message. For now, put private keyword between line 21 and 22 and recompile.
- 4 replies
-
- delphi
- compiler error
-
(and 1 more)
Tagged with:
-
Bits, not bytes. I don't know the rest of the code, but I would suggest to initialize variable I to zero before the move so that the 4th byte is not at an unknown value. Also note that this code is not portable across processor architecture. Intel and AMD processors are "little endian" while ARM processor is "little endian" by default but may be changed. No idea if Android and iOS change the default value. To have predictable value and portable value, it is better to assemble the bytes your self. The code you have may be replaced by: I := Byte(S[1]) + ( Byte(S[2]) shl 8 )+ ( Byte(S[3]) shl 16 ); or event this, if the variable S is really a constant: I := Byte('r') + ( Byte('C') shl 8 )+ ( Byte('f') shl 16 ); This latest expression is constant and once compiled result in only a single CPU instruction.
-
This is way to broad! Use different conversation for each topic. And use a specific subject. Think that those conversation will remains for other to find help. Mixing everything will not help much other peoples, forcing them to read a lot of messages in a given conversation. The best is a lot of SMALL conversations focused on a specific topic. There is no problem if you start 10 conversations for 10 different topics. For the unicode string issue, I would select https://en.delphipraxis.net/forum/5-rtl-and-delphi-object-pascal/
-
32bit RGBA TBitmap to RGB byte stream.
FPiette replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
That has no sense: you ask to change the way to convert from RGBA to RGB, so you can change that part. Sorry but I won't participate any more in this useless conversation about an XY problem. -
32bit RGBA TBitmap to RGB byte stream.
FPiette replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
As you like. There are other existing solutions to convert RGBA to RGB depending on which file format you want to create. An RGB stream copied to a file can't do much. The reader cannot even know the width and height.