-
Content Count
419 -
Joined
-
Last visited
-
Days Won
6
Posts posted by Roger Cigol
-
-
https://register.gotowebinar.com/register/5710587862509447008
This is the link for "what's coming in 12.3"
-
1
-
-
On 1/29/2025 at 3:58 PM, Remy Lebeau said:Do you get an error code from SysUtils::File[Create|Open]() or ::CreateFile()?
Doing more error checking is of course a good idea. Perhaps I shouldn't have had to be pushed to do this.
The software does log some errors to the log file. But of course if the log file falls over then I don't get a record of the errors.
There are practical difficulties working with the customer on site (if you do too many version changes they start to feel (with some justification) that you are using them as the debugging team...
However I agree with your helpful hint : I need to see if I can find out what is being reported when this problem occurs. I have created a version that will push error messages into the GUI thread and this thread will display them.
I have asked the customer to take screen shots of any error boxes that pop up.
Thanks for your help @Remy Lebeau I will post here again if I solve the problem or if I get more error information that I need help understanding !
-
On 1/29/2025 at 12:36 PM, Der schöne Günther said:Can't you just spin up a fresh VM with the same windows image and see if the problem persists?
Thank you @Der schöne Günther for this suggestion. It's not quite so easy...
a) I am not sure if I have the IT skills to get an exact copy of Win 10 LTSC from the customer's machine on to a VM (I did not supply the customer's PC).
b) The software talks to significant complex hardware (it's a special purpose machine control system) which is hard to replicate / simulate on a VM system.
-
Well it's a good opportunity to have time to learn Delphi at somone elses expense. Great to have a project to work on where anything you do that isn't a complete failure is considered a good result. I can't think of a better project to learn on !
-
1
-
-
29 minutes ago, Der schöne Günther said:Check Windows Event Viewer for resource exhaustion events and other errors and warnings
@Der schöne GüntherMany thanks for this suggestion. Sadly (for me) I have already checked windows events - no sign of any problem error or warning messages.
-
VCL - RAD Studio 12.2 C++ Classic Compiler
I have a windows C++ (Classic compiler) VCL application that uses TDirectory::GetDirectories() and TDirectory::GetFiles() to get lists of files from the Windows OS file structure.
These files are then opened for read or write using stl ofstream and ifstream along with >> and << operators.
The same code has been in use on different instances of the application on different machines (including Win XP and Windows 7).
I have a new instance where the operating system is Windows 10 LTSC version 10.0.19044 build 19044. I have not run it on this version of windows before.
Problem; Directory and file lists, reading and writing work ok for a longish time (24 hours sometimes, 30 hours sometimes, 10 hours sometimes) and then
the calls to TDirectory::GetDirectories() and TDirectory::GetFiles() both return empty lists. Writing to a log file (with a fixed file name) also stops working at
this time. It's as if my application has been locked out of the file system somehow.
At this point it is possible to use File Explorer to see that there still are files and directories present. It is possible to open the files by other applications.
(some are plain text files and can be opened with notepad). The files are stored in a directory inside C:\Users\Public\Documents\ so
should be available to all applications all of the time.
I cannot offer a reproducible example - all my code works fine on my development machine (which is Windows 10 Pro build 19045.5371 22H2).
This is true if I run it under the IDE debugger or as a free standing exe.
I wonder if any of my fellow Delphi-Praxis colleagues might have any similar experiences or can offer some ideas of what I should try next ?
-
25 minutes ago, Remy Lebeau said:It is actually legal code and does compile:
@Der schöne Günther Please accept my apologies!
@Remy Lebeau Many thanks for your wisdom here - I've learnt something new!
-
2
-
-
1 hour ago, Der schöne Günther said:In that case, let's add
I am not sure that posting code that doesn't compile is very helpful unless it is absolutely clear that it is meant in humour.
Incidentally I am not sure how I feel about myself but I definitely love C++ (whilst conceding that it does have it's drawbacks).
-
3 hours ago, 357mag said:Excuse me sir for asking a question. Jump in a lake.
Whilst agreeing totally with @Lars FosdalI am puzzled by your reaction. It is clear that every posting you received was aimed at helping / educating you. I can't see any sign of anyone being patronising. I like to think that all the many experienced developers that look at Delphi-Praxis are understanding of less experienced folk who are trying to learn. Please continue to ask questions. Be patient if you don't always get a simple answer and check that you have expressed your question in as clear as way as you can.
-
2
-
-
Just now, Der schöne Günther said:Make sure the type of your pointer is correct when doing stunts like pointer arithmetic. For example, PInteger when dealing with Integer
This is good advice (more accurately: this is essential). But the example you give is in Delphi / Pascal rather than C++ so perhaps not entirely suited for the original question posed by a relative newcomer to C++.
-
8 hours ago, 357mag said:I'm trying to understand some basic pointer arithmetic. I guess when a pointer is incremented (like ptr++) it does not get incremented by 1. Instead the address increases by 1 multiplied by the size of the data type it is pointing to.
This is correct.
-
If you add a unit then the IDE adds both the *.cpp and .h files.
There can be cases where you have a .h file with no associated *.cpp file (and this is therefore not what the IDE calls a unit).
In this case you can right click on the project name (= the exe file) in the project tree view and select add existing and navigate to the *.h file you want to add.
-
PCH = pre compiled header. It's a file created at a full build by the compiler with the pure aim of speeding up compilation. In almost all cases you can just ignore it and let the compiler delete/recreate it as it needs to.
-
To get any chance of an answer you need to post some code that behaves differently between two versions. Also check which compiler and target (win32 or 64bit) you are using in each case.
-
I think this sounds like the "auto complete" calculating what to allow you to enter as part of the code. This was a bit flakey on some of the recent versions but works quite well on 12.2
-
2
-
-
Can you paste the contents of the dfm definition of the form here for the FDQuery where the parameter :increment is defined and used.
One way of doing this is to go to the form designer, select the appropriate TFDQuery component on the form, right click and select "copy"
and then paste it into your Dephi-Praxis post....
-
Modern versions of PostgreSQL are only available in 64bit architecture.
The RAD Studio IDE is a 32 bit application. It is not possible to interface to the modern postgreSQL at design time using the IDE.
I have seen examples of people using an old version of the postgreSQL interface dll (a 32 bit version) to talk to modern version of PostgreSQL server. It may work but it cannot be a "guaranteed to work" route since you are asking for a dll to be compatible with a version that wasn't written at the time the dll was created. I've never wasted time trying to get this to work.
-
I use parameters in my TFDQuery with PostgreSQL 13 database all the time. No problems. You need to post more information in order for the community here to be able to help.
-
1 hour ago, Anders Melander said:This is why Windows' own clipboard history (WinKey+V) is always empty when you first invoke it
Not sure about this. It's empty when you first start windows. But as soon as you start using the clip board with any application Windows does maintain a history and WinKey+V does allow you to choose.
However I don't know a way of accessing these values programatically. But that doesn't mean there isn't a way.....
-
11 hours ago, Gord P said:Oh I definitely expect that to be the case for me
It's a definite personal strength to be aware of one's own weaknesses...
-
I've brought a few "Classic" 32 bit VCL apps over to "Clang32". Most of the issues are related to poor code by me (often code that I wrote 30 years ago and would definitely not write now!). So in this sense whilst it is an inconvenience it is actually a good thing - it is making the code base more reliable and more maintainable. Of course I don't know what your apps do and what 3rd party components they use so the same experience may or may not apply in your case.
Equally I have one set of code that is still a significant source of income for me that is based on "Classic" (again 32bit VCL). With this one I am just starting to look at changing over straight to a 64bit app using the "modern" clang64 tool set.
I think I am saying (!!) that you just need to give it a go and see how you get on. You'll know within a day or two whether it's a mamouth task or a relatively straightforward one.
-
BDE is deprecated.
It's still available but it's definitely "had it's day".
On 10/16/2024 at 7:46 AM, shun said:I would like to know if migrating to FireDAC is essential or not
Not essential - but really the only sensible thing to do.
I used BDE for one project and found the upgrade to FireDAC not that difficult to do. Can't comment on how much of a task it will be for your project though !
-
On 10/16/2024 at 1:27 AM, shun said:Could you explain the advantages of migrating to Clang
If you stay with "Classic" you are staying with an obsolete platform. It is likely to be around for years and years to come (because of so much legacy code out there) but it is no longer under any further development; each new version of RAD Studio or C++ Builder comes with exactly the same "Classic" compiler. Staying with "Classic" also ties you to 32 bit only application.
It's not my job to explain all the advances in C++ syntax and the associated STL additions that have happened since the days of the "Classic" compiler - but there are many many many in the list. As soon as you start using Clang you don't want to go back to "Classic". If you are not so familiar with modern C++ start by reading the latest edition of Stroustup's "A Tour of C++" and see how many things in this (fairly brief) text are new to you. Scott Meyer's "Effective Modern C++" is another good book. There are hundreds out there..
There is one disadvantage of the Clang compiler: It's compile times are slower. Make sure you use the TwineCompile plug in (free of charge on Getit package manager).
As an upgrade path I would suggest make the change to 12.2 staying with the "Classic" and once you have all your other issues solved then move to Clang.
-
1
-
-
On 10/16/2024 at 12:53 AM, shun said:Thank you for your response. Could you tell me how to check if there are any features that are exclusive to the 'Enterprise' edition?
Hi @shun Sorry for delay - busy week....
Up to date feature matrix is here:
https://www.embarcadero.com/products/rad-studio/features/feature-matrix
According to this site
https://plaza.kpt.co.id/IT/en/107-2/Embarcadero-Delphi_8137_plaza-kpt.html
Delphi / C++ Builder 5 dates from 1999 - so you are looking for a feature matrix 25 years old (if it ever existed). Fifteen minutes on google has not yielded a hit for this but you might do better.....
-
1
-
Linker error L902
in Delphi IDE and APIs
Posted · Edited by Roger Cigol
Is this "Classic" or "Clang" 32 bit ?
Are you using "incremental linking" ? (if so, does it solve your issue if you change the project setting to "incremental linking = false" ?
Ooops - sorry - this is Delphi code not C++ - please ignore me !