-
Content Count
1213 -
Joined
-
Last visited
-
Days Won
16
Everything posted by FPiette
-
Help to achieve multiple inheritance by class redesign
FPiette replied to iiid354's topic in Algorithms, Data Structures and Class Design
No constructor in interface. The constructor stay in the class. Base methods such as Work() can be in a base interface and all other interfaces inherit from the base interface. -
Help to achieve multiple inheritance by class redesign
FPiette replied to iiid354's topic in Algorithms, Data Structures and Class Design
Since Delphi do not support multiple class inheritance, you should use interfaces. A class can support many interfaces. So TSalesManager can support IHuman, ISales and IManager interfaces. At the class level, you can delegate an interface implementation to another class. -
Don't make it, use an existing proven solution. For example WAMP or LAMP.
-
Good Key/Hash for SQL string
FPiette replied to chkaufmann's topic in Algorithms, Data Structures and Class Design
Almost no hash avoid duplicate values. Only the full data, maybe lossless compressed, use as a key has no duplicate. The hash used as a key in a dictionary is interesting to speed up search for previously executed request. The dictionary should contain the list of all requests having that hash. Once you found the list, using the hash, you can iterate it to find the request. The smaller hash you use, the more duplicates you'll have. -
There once some update to ICS so that FPC could compile it but this has not been maintained. Since FPC is far from being Delphi compatible, there is certainly some work to do. You can do this work and request any ICS change that would be needed to help making if FPC friendly, such as making a method virtual.
-
Read out signed executable certificate possible?
FPiette replied to KodeZwerg's topic in Windows API
Probably what you are looking for is explained in Microsoft documentation. -
You are freeing twice the form: Once from the OnClose because you use caFree caFree, and once when you call Free in the finally block. The second call will crash.
-
You should really do the above. Using the debugger, grab the call stack at the moment of crash.
-
When you said "on the server PC itself", is it using RDP or not? (I'm thinking of what was once name "terminal server"). If this happens on ALL their PC whatever OS they have, this is maybe related to something the have in all enterprise such as a security product, or a remote management or something like that.
-
So this is related to RDP or to the server (What is it?) where Delphi is installed. Do you have a chance to ask someone at the remote site to check if it works locally without any RDP but directly on the machine?
-
Using the debugger, you should see where your application crashes. This would probably give a hint about why it crashes. Did you tried with a minimal program? If not, do it and tell use if it works as expected. If it doesn't, show the code for that minimal program so that we can verify it.
-
That is good. But be sure to check between each step to find out which one is the culprit.
-
So it is not a high DPI issue. Do you have IDE wizard installed? Did you get this issue from the first run after D10.4.2 install?
-
OK, and what is the zoom for text? If not 100%, try with 100%. Just to narrow down the problem. You said "sometimes". Could you find what is causing that? It is very important to have steps to always reproduce an issue, otherwise the guy at Embarcadero will just say "Cannot reproduce" or "need steps".
-
Making a report is indeed very useful BUT you have to find a reproducible way to make this behavior appear or the report will be closed with "cannot reproduce" reason. Just to test, could you set the 4K monitor to 100% to see if the bad behavior persists? If it persists, could you change the video card resolution to full-HD (1920x1080) and 100% to see if the bad behavior persists?
-
I don't see that "effect". Is it such always or only after you've done something?
-
I started to use Pascal in the beginning of '80. I don't remember the exact year but it was something like 1981. At that time I used Pascal on a Motorola 68000 development system to build an image processing system for the industry. I also used USCD Pascal but I don't remember the exact context. Later I moved to C on microcomputers and then CP/M machines and the IBM-PC. On the PC, I used Pascal MT+ at lot before using exclusively C for long time, actually until Delphi was born. And much later, in 1995, I moved to Delphi that I still use today, every days.
-
Cannot Transfer Higher values like Chr(65470)
FPiette replied to AllanF's topic in ICS - Internet Component Suite
ReceiveStr is aimed at AnsiString and use - by default - CR/LF (Two 8 bit ASCII characters, $0D and $0A) as delimiter. I'm not sure that in Unicode, two consecutive bytes are not allowed to be $0D and $0A which are the CR/LF. Probably LineMode would also work if you use $0D, $00, $0A, $00 as LineEnd. But you'll have to provide your own routine to convert the Unicode received as an AnsiString correctly as Angus said above. I have no idea what you are doing and so I cannot advice you better. You should explain what you intend to do. It looks you are designing your own protocol, quit unusually compared to most protocols (FTP, HTTP, SMTP, POP3 and many others) which use ANSI or UTF-8 or Binary or a combination of two. -
Cannot Transfer Higher values like Chr(65470)
FPiette replied to AllanF's topic in ICS - Internet Component Suite
TWSocket makes a conversion to AnsiString when using SendText. This is intended to implement higher level protocols. To send anything, use Send like this: var S : String; begin S := 'Hi ' + Chr(65445) + Chr(65470) + #13#10; WSocket1.Send(PChar(S), Length(S) * SizeOf(Char)); end; -
IcsCommonCB103Design installation failure (WINAPI.WINDOWS.OBJ) C++
FPiette replied to GE1956's topic in ICS - Internet Component Suite
10.4.2 is near the end of beta. Maybe wait a little bit unless you take the update subscription (You should). -
The instead of asking always the same question, retrieve the whole data and then ask a specific question related to parsing text data. That new question should NOT even mention WHOIS nor ICS since it is related to parsing text data. And do NOT ask this question here in ICS dedicated forum, ask in a general purpose forum (Could be on DelphiPraxis other forum or StackOverflow). One last recommendation: Do NOT create new accounts here and there you will just makes people angry (That's mostly the same people answering everywhere and they will recognize you).
-
IcsCommonCB103Design installation failure (WINAPI.WINDOWS.OBJ) C++
FPiette replied to GE1956's topic in ICS - Internet Component Suite
Are you used to work with C++ Builder or are you a newbie? If you are used, I would suggest you create YOURSELF a new component package and add TWSocket.pas to it and then add all missing units. This could be tedious. The using that new package (install it) you then try a fist example using on TWSocket. -
You should better explain what is the problem.
-
And do not post the same question here and on StackOverflow. The same pleoples are answering anyway.
-
AES and different result length
FPiette replied to Jacek Laskowski's topic in Algorithms, Data Structures and Class Design
Would be interesting to check if the decrypting functions of each library is able to decrypt encrypted values generated by other libraries.
![Delphi-PRAXiS [en]](https://en.delphipraxis.net/uploads/monthly_2018_12/logo.png.be76d93fcd709295cb24de51900e5888.png)