Jump to content

mvanrijnen

Members
  • Content Count

    471
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by mvanrijnen

  1. mvanrijnen

    File Search

    and if you stay with the findfirst/findnext solution, do not forget the findclose 🙂
  2. mvanrijnen

    File Search

    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.
  3. mvanrijnen

    File Search

    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:
  4. mvanrijnen

    File Search

    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)
  5. mvanrijnen

    File Search

    Why not use (in unit System.IOUtils), TDirectory.GetFiles(), see: System.IOUtils.TDirectory.GetFiles - RAD Studio API Documentation (embarcadero.com)
  6. mvanrijnen

    MAP2PDB - Profiling with VTune

    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 🙂
  7. 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)
  8. 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
  9. 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.
  10. mvanrijnen

    Find all mentions of the database

    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.
  11. mvanrijnen

    Printing PDF

    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).
  12. mvanrijnen

    Printing PDF

    ah ok, gonna take a look again, thanks for the tip
  13. mvanrijnen

    Printing PDF

    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.
  14. mvanrijnen

    Introducing Delphi Uses Helper

    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.
  15. i believe EWS is deprecated, take a look at the MS Graph API: Microsoft Graph overview - Microsoft Graph | Microsoft Learn
  16. 🙂 Print Spooler API Functions - Win32 apps | Microsoft Learn
  17. mvanrijnen

    Delphi 11.3 is available now!

    Can we update or do we need to reinstall ?
  18. mvanrijnen

    Hands-On Design Patterns with Delphi

    Is asian kind of thing, same as "Same same, but different" 🙂
  19. mvanrijnen

    swagger help needed

    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
  20. 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.
  21. 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.
  22. 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. "
  23. mvanrijnen

    Delphi Code Coverage WIzard Plus V2.0 released

    looks good, already usefull!
  24. mvanrijnen

    Delphi Code Coverage WIzard Plus V2.0 released

    cool, was just thinking we would need something like this.
  25. 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?
×