mvanrijnen
Members-
Content Count
471 -
Joined
-
Last visited
-
Days Won
1
Everything posted by mvanrijnen
-
and if you stay with the findfirst/findnext solution, do not forget the findclose 🙂
-
TStringDynArray, i believe its defined in the unit "System.Types". you call this function for example with: FindFilesWithPatttern('C:\MyFolder', '*.sys'); // get all the .sys files FindFilesWithPatttern('C:\MyFolder', 'myfile.txt'); // get the myfile.txt file(s) (maybe for your example u should use an overload of the TDIrectory.GetFiles method which also recurs over the (sub)folders. the line: files := TDirectory.GetFiles(directoryPath, filePattern); you change in: files := TDirectory.GetFiles(directoryPath, filePattern, TSearchOption.soAllDirectories); for that. As said before by someone else, a filemask can also be a full filename.
-
The "ChatGPT" solution: Question: uses System.SysUtils, System.IOUtils; procedure FindFilesWithPattern(const directoryPath, filePattern: string); var files: TStringDynArray; fileName: string; begin try files := TDirectory.GetFiles(directoryPath, filePattern); for fileName in files do Writeln(fileName); except on E: Exception do Writeln('An error occurred: ' + E.Message); end; end; Explanation from ChatGPT:
-
Why not use (in unit System.IOUtils), TDirectory.GetFiles(), see: System.IOUtils.TDirectory.GetFiles - RAD Studio API Documentation (embarcadero.com) (i think it's better to use those functions because you do not know how to use findfirst/next etc correctly)
-
Why not use (in unit System.IOUtils), TDirectory.GetFiles(), see: System.IOUtils.TDirectory.GetFiles - RAD Studio API Documentation (embarcadero.com)
-
Just a quick question is the 16Mb limit still valid for the tool? i keep getting: "Cannot locate debugging information for file `D:\Data\company\Delphi\Projects\SVN\appname4\Clients\appname\Win32\Debug\appname.exe'. Cannot match the module with the symbol file `D:\Data\company\Delphi\Projects\SVN\appname4\Clients\appname\Win32\Debug\appname.pdb'. Make sure to specify the correct path to the symbol file in the Binary/Symbol Search list of directories." While the .pdb is there. (i replaced the msdia dll) works, replaced the wrong msdia.dll 🙂
-
Bitdefender going crazy about with MARS compiles program
mvanrijnen posted a topic in MARS-Curiosity REST Library
Just trying to put the first tests for using MARS to our testserver, getting this from the BitDefender there: "Malware: DeepScan:Generic.EmotetK.D02D57D4 File Path: C:\Program Files (x86)\Company\myservicename.exe" We the only one with this problem? anyone a solution? (except white listing all the coming executables) -
Bitdefender going crazy about with MARS compiles program
mvanrijnen replied to mvanrijnen's topic in MARS-Curiosity REST Library
The result of the "console" version of that file (original is a service): VirusTotal - File - 7f7461788afdcbf62851b388ae8078fb96f1536897891beaa424b83acb4c0a37 so somehow it seems like a combination of using MARS in a service, combined with some of our own stuff 🙂 Here is the MARS Helloworld example, result: https://www.virustotal.com/gui/file/81b5df036d3e194d2275bafc50a40830d585f4fa86d05e185bb2d4277796ec5f?nocache=1 end as last, a simple helloworld (writeln), console result: VirusTotal - File - a0011e091fca526d855541185805f8a28c2cb5543b42c32241edd091b4fc1dfe -
Bitdefender going crazy about with MARS compiles program
mvanrijnen replied to mvanrijnen's topic in MARS-Curiosity REST Library
Yes, its a false positive, we have like few hundred delphi compiled executables, here's the virustotal link: VirusTotal - File - 871ae239973e56fe9e62ee15bff3cdaec454871c0948db71c1241bca9315477d But ok, it's not a common thing for programs including MARS. thats what i wanted to know. -
we use agent ransack for searching things like this, found on: Agent Ransack – Mythicsoft then search on all *.pas, *.dfm, *.fmx files. But if you smart then you use a TDatamodule, where you put yout connection in/on, and in other units you point to that connection, (maybe nog the connection itself), but ask the datamodule for a new connection instance etc.
-
So, a topic which returns now and then 🙂 Printing existing PDF Files. There are some options using cmdline tools/applications, adobe activex etc etc, But with al those options i have not enought control over how to print an existing pdf. like: * Which printer * Which bin of that printer etc. etc. Anybody a tip for a final solution? I prefer something which is 100% incorperated in the software itself (delphi vcl application).
-
ah ok, gonna take a look again, thanks for the tip
-
No i already have a PDF (generated with ReportBuilder), printing to PDF we already can. Now i have to print a already generated .pdf (at a later stage). gonna take a look into the sumatra pdf. I see it has a lot of printing options etc.
-
Would be nice if it (could) work the same as in VisualStudio, when i use a class/record type, it would give a hint in which units this would be.
-
Delphi - send mail from Office 365 with EWS protocol
mvanrijnen replied to J23's topic in ICS - Internet Component Suite
i believe EWS is deprecated, take a look at the MS Graph API: Microsoft Graph overview - Microsoft Graph | Microsoft Learn -
Delete all failed jobs from the printer spooler
mvanrijnen replied to msd's topic in Delphi IDE and APIs
🙂 Print Spooler API Functions - Win32 apps | Microsoft Learn -
Can we update or do we need to reinstall ?
-
Hands-On Design Patterns with Delphi
mvanrijnen replied to Primož Gabrijelčič's topic in Tips / Blogs / Tutorials / Videos
Is asian kind of thing, same as "Same same, but different" 🙂 -
I never got time to make our own generator public . I am on holiday now. But try this out as soon as I get back
-
TDateTimeHelper from D11 that can be used in D10.4?
mvanrijnen replied to David Schwartz's topic in RTL and Delphi Object Pascal
i know, but i find it a hassle to keep this in sight which one (in this case System.DateUtils or our own Helpers.DateTime) is where in the uses clausules, in all our sourcecodes. But it's not a big problem, only hope there will be a solution for this problem. -
TDateTimeHelper from D11 that can be used in D10.4?
mvanrijnen replied to David Schwartz's topic in RTL and Delphi Object Pascal
Yes, and we hit direct the problem with these class/record helpers. We had our own TDateTimeHelper, so we could change all code. Because it's never clear which helper it would pick, yours or theirs. -
Is asked ChatGPT: What is Internet Component Suite for Delphi?
mvanrijnen replied to FPiette's topic in ICS - Internet Component Suite
I got the following answer on the same question: " ICS (Internet Communications Suite) is a suite of applications that includes several programs for communicating over the internet, such as email, instant messaging, and web browsing. To use ICS to fetch a webpage, you will need to use a web browser program that is part of the ICS suite, such as Netscape Navigator or Mozilla Firefox. Here is a general outline of the steps you can follow to use ICS to fetch a webpage: Open your web browser program by double-clicking on its icon or selecting it from the list of programs on your computer. In the address bar at the top of the browser window, type the URL (Uniform Resource Locator) of the webpage you want to fetch, and press Enter. The URL is the web address of the webpage, and it typically begins with "http://" or "https://". Wait for the webpage to load. This may take a few seconds or longer, depending on the size of the webpage and the speed of your internet connection. Once the webpage has finished loading, you can scroll through it and interact with any links or buttons on the page. I hope this helps! Let me know if you have any other questions. " -
Delphi Code Coverage WIzard Plus V2.0 released
mvanrijnen replied to TurboMagic's topic in Delphi Third-Party
looks good, already usefull! -
Delphi Code Coverage WIzard Plus V2.0 released
mvanrijnen replied to TurboMagic's topic in Delphi Third-Party
cool, was just thinking we would need something like this. -
Send message frmo VCL app to another machine in lan
mvanrijnen replied to mikak's topic in General Help
i wonder if thats the best solution for the use case your describing (just) now. (just maybe a database event may just be better here .....) But mostly article prices have a startdate/enddate, so i wonder how big the customers problem is? What about if the government decides to change sales tax at 13.15 hour ? , change the order pricing/totals also?