DelphiUdIT
Members-
Content Count
593 -
Joined
-
Last visited
-
Days Won
11
Everything posted by DelphiUdIT
-
This is sample program ready for Halcon 20.11 Steady. https://cloud.dyn-o-saur.com/Project_H2011.zip Bye
-
I knew that Halcon informally supported COM up to version 18.05. After that, COM support was dropped entirely. I think that you can use COM with 20.11 only for the old functions. But that doesn't matter, since they decided to remove COM support anyway and therefore it was still necessary to switch to something else. Meanwhile, I'm attaching the wrapper for 20.11 Steady (which is the penultimate version), then I'm attaching an example for 20.11 to use the wrapper similarly to how you now use COM. I'll give you the example with a THREAD, which is the best way to use Halcon. HalconC_2011.pas Bye
-
Job Offer - 5 Delphi Devs for bit Time Professionals
DelphiUdIT replied to Daniele Teti's topic in Job Opportunities / Coder for Hire
The compensation indicated is commensurate in Italy for a young developer hired as an employee. For living and working in Rome (as well as in Milan) perhaps it could be increased, but for working remotely outside the big cities it is in line with the market. If you worked as a collaborator, it depends on the workload you have to carry out: if you worked full-time, the proposed compensation would cover around 3 months of work (always remotely). Bye -
This is all that you need to work for the Halcon 22.11 Steady and Delphi. Hope this help you. Bye HalconC_2211.pas
-
Why does TRegistry.GetKeyInfo double the returned values of MaxSubKeyLen/MaxValueLen for far eastern locales?
DelphiUdIT replied to David Heffernan's topic in RTL and Delphi Object Pascal
FarEast is always true on Delphi x Windows: -
I also don't care about the CE, I have an Enterprise license and it wouldn't make sense to use a CE anyway. I use Delphi to "make money", why should I expose myself to legal issues? That's why I don't let anyone around me use the CE, even if it would be possible. It is not and will never be a problem to use software (obviously legally owned and in countries not subject to restrictions) on industrial machines produced by me. So i can use it without any issue in USA, in EU, and anywhere I legally sell (or export) my line and work on (generally start up / maintenance). I certainly don't come to America to steal the work of native developers 😉 Bye
-
Sending email by Delphi Sydney on windows 7
DelphiUdIT replied to NBilov's topic in Network, Cloud and Web
I always use port 465 (implicit TLS) and I must do IdSMTP1.Connect; IdSMTP1.Authenticate; if IdSMTP1.DidAuthenticate then begin IdSMTP1.Send(IdMessage1); end; to avoid any problem. If the simple and short way is working with port 587 there is not need to change. Bye- 10 replies
-
Sending email by Delphi Sydney on windows 7
DelphiUdIT replied to NBilov's topic in Network, Cloud and Web
Try the @David Schwartz suggestion (this is the official library of Indy: https://github.com/IndySockets/OpenSSL-Binaries) and also the following. You use port 465, (implicit TLS) so is better to put: IdSMTP1.UseTLS := utUseImplicitTLS; And I use that: IdSMTP1.Connect; IdSMTP1.Authenticate; if IdSMTP1.DidAuthenticate then begin IdSMTP1.Send(IdMessage1); end; Hope this help you. Bye- 10 replies
-
@David Schwartz I don't understand why you get so excited and I didn't think my post could offend anyone. I live in Italy where I mainly work, even if I often travel around the world (in the next months I will come to California). But this is absolutely indifferent to what I said. I am not an employee and I have no employees or collaborators in the area near me and the only reference I have made in this whole speech is what I quoted and commented in the post (I am re-formulating my answer more clearly): "a person who connects to a NON-PUBLIC network does not necessarily have to be an employee / collaborator or have an economic relationship with the owner of the network" This I think (and in my case that I described is). But to avoid "legal" trouble I prevented Delphi or C++ CE from being used on my network, to my reluctance. And this is because I have repeatedly heard EMBT (see also in previous posts) discussing the use of a CE license within an organization's network. I don't think it's right or wrong. I only "detected" the possible critical issues and avoided any legal problems. Bye
-
This discourse is absolutely misleading and meaningless. This is the problem with the CE license. I report my case, i have a subscription active and I'm not licensed to use a CE: I have a very wide "internet" band available and I have decided to share this resource in the neighborhood with students and other people who don't have economic possibilities (free of course). Does this mean that whoever connects to my network works for me? What if some students use the CE? That's why I asked the students not to use CE (one of them actually wanted to learn Delphi but I directed him to Lazarus). This is reality, not fantasy and many structures leave accessibility to the resources they have without there having to be an economic activity behind it. Surely the Community Edition has its advantages, but the legal aspect is so stringent that those who want to approach this tool prefer other ways. Bye
-
😍PASCAL is the best programming language in the world 😍 but Delphi CE is not the right product if you want to distribute your projects freely. Behind Delphi there is a structure (now is Embarcadero / IDERA) which is not "non-profit" and which rightly must be rewarded for the work it does. Despite all the Delphi environment (overall) remains for me the best programming environment in Pascal and I use it as a job to be able to pay for it.
-
It's not important where or how many people use the compiled project or sources. Important thing is that you don't get more then $5000 of revenue and you don't use at work the RAD IDE. But this is not so simple to divide the revenue of your normal work from your use of RAD IDE. So, except for students that normally don't have a big revenue , is really difficult to use the CE edition according with license. Even just to test, try and look at the potential of the environment, it takes hundreds of hours of work with the IDE ... especially for an inexperienced user. Does Embarcadero consider this to be in compliance with the CE license? Quoted from https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Community_Edition
-
If you want to test, make a VM and try there, you can remove the "cmd.exe" and doing all know things with "gpedit" about that. SO you can try multiple solutions without damage your working PC. Bye
-
Anyone know of an AVIF Image Decoder for Delphi?
DelphiUdIT replied to Yaron's topic in General Help
They only seems to have static library, not dll. There is a project for Lazarus / FPC that have this dll. This is the main branch: https://github.com/bgrabitmap/lazpaint The libraries "libavif.zip" (but i don't know nothing about them) are in subfolder "lazpaint/release/windows". Look at license of course. bye -
Anyone know of an AVIF Image Decoder for Delphi?
DelphiUdIT replied to Yaron's topic in General Help
ImageEn https://www.imageen.com/info/ support AVIF format. But is not free. Bye Edit: also you can extract c headers form there https://github.com/AOMediaCodec/libavif and convert to pascal wrappers. -
There is a unit IdLdapV3 (under directory "lib\protocols"). Bye
-
Looking for RpShell, RpTable, RpDefine, RpBase, RpSystem
DelphiUdIT replied to georges pletinckx's topic in Windows API
Fast Report have a converter from Rave file (*.rav) so you can convert the whole project to use it in Delphi 10.4 and Fast Report This is the link: https://www.fast-report.com/en/blog/show/frconverter-console-utility/ -
How can I allocate memory without raising exceptions ?
DelphiUdIT replied to Marus's topic in General Help
This may be a bit OT, but if you want to avoid try .. and maybe even single windows api testing, you can use this feature (I've been using it for years): type TFMain = class(TForm) ....... protected procedure ErroriRunTimeNonGestiti(Sender: TObject; E: Exception); ....... end; procedure TFMain.ErroriRunTimeNonGestiti(Sender: TObject; E: Exception); begin .... do something; end; // In the form create event you can insert: Application.OnException := ErroriRunTimeNonGestiti; //Handle critical system errors (caused by the application) //By default critical errors are handled directly by Windows SetErrorMode(SEM_FAILCRITICALERRORS OR SEM_NOGPFAULTERRORBOX); Obviously this occurs if you don't use the try ... except.ì, i.e. for all the exceptions that your program generates and are not managed by it. The fact that you assume that an allocation error is reported to you by the operating system is misleading: if the memory allocation fails (at least for a string allocation) it is likely that your program will not notice it because it probably "won't run", the operating system will probably have notified you on screen that there is a "lack of resources" and will "hang". -
Scanning for files while they are created or deleted
DelphiUdIT replied to Marus's topic in Windows API
I haven't used FindFile... for many years. To list the files I suggest you to use the functions of the System.IOUtils unit, for example: var FileList1: TStringDynArray begin FileList1 := TDirectory.GetFiles('.\Images\', '*.*', TSearchOption.soAllDirectories); for var ix := Low(FileList1) to High(FileLis1t) do begin //Do Something //This catches the last modified time of the file //TFile.GetLastWriteTime(FileList1[ix]) //You can use the next line to check if the file really exists //FileExists(FileList1[ix])) end; //Clear the list SetLength(FileList1,0); end; -
Poor image quality with DrawBitmap when destination is smaller than source
DelphiUdIT replied to XylemFlow's topic in FMX
If you want to use the GPU, you can use OPENCL standards. I use OPENCL through some computer vision libraries, but the OPENCL is transparent to my code. I can enable or disable both partial and full OPENCL functionality for the whole library at runtime, so a certain function will be able to run under GPU or CPU without the code being modified. However, with modern processors (I have been using the Intel I7 12xxx series since it was on the market) the differences in terms of quality and performance are negligible on the vast majority of functions. Then taking into account the cost of an additional graphics card (NVIDIA / INTEL / AMD) .... Probably a careful use of Threads and the good library could lead to a better quality / performance of what you want to do (but I can't help you specifically because I've never needed better performance / quality than the standard image resizing). Start from here: Embarcadero blog on OPENCL Bye -
Now is OK, with proper heading and better indentation. You must terminate with a "end." (end with a period) The last begin is closed in this way in an "app console" (if you look a dpr file of a vcl application, you will see the same ... begin .... end.)
-
And something like this ? program Test; {$APPTYPE CONSOLE} {$R *.res} Uses System.SysUtils, WinApi.Windows; var Termina: boolean = false; function handle_ctrl_c(fdwCtrlType: UINT64): WORDBOOL; begin //If it returns TRUE then the chain of managers is not continued. //If I return FALSE then the next handler in the chain is also called. case fdwCtrlType of // Handle the CTRL-C signal. CTRL_C_EVENT: begin Termina := True; Beep(750, 300); writeln('Ctrl-C event'); result := TRUE; end; // CTRL-CLOSE: confirm that the user wants to exit. CTRL_CLOSE_EVENT: begin Termina := True; Beep(600, 200); writeln('Ctrl-Close event'); result := TRUE; //The program will' close ... end; // Pass other signals to the next handler. CTRL_BREAK_EVENT: begin Termina := True; Beep(900, 200); writeln('Ctrl-Break event'); result := TRUE; end; CTRL_LOGOFF_EVENT: begin Termina := True; Beep(1000, 200); writeln('Ctrl-Logoff event'); result := FALSE; end; CTRL_SHUTDOWN_EVENT: begin Termina := True; Beep(750, 500); writeln('Ctrl-Shutdown event'); result := FALSE; end; else result := FALSE; end; end; //Main begin //Implements ctrl-... handler SetConsoleCtrlHandler(@handle_ctrl_c, TRUE); Writeln(DateTimeToStr(now)+' - Is running - press CTRL-C to terminate or the key "F2"'); while (not Termina) do begin try sleep(10); //This is another way to catch a key //Pressing F2 key will exit if (GetKeyState(VK_F2) and $8000) <> 0 then begin Termina := true; //This is not necessary since there is a break condition break; end; //put here your code except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end; end.
-
Win11/Intel(R) Core(TM) i7-12700H CPU @ 2.30GHz (Max 4,7 GHz)/6P+8E-cores/20-threads/32GB/RAD11.3/Release/<below data> D:\spritz_bench>spritz_bench.exe spritz prng: 182.30 MiB/s D:\spritz_bench>spritz_bench.64.exe spritz prng: 196.31 MiB/s Lazarus 2.2.6 (Release 64 -O3) spritz prng: 174.48 MiB/s
-
That "variable" (Value) is not a global variable but a local one. It is in fact a different "object" in each single procedure. Very often these variables are automatically generated by component imports such as COM objects or wrapper or getter/setter generators. However, it is a standard acquired by programmers to use for example "Value" as a generic input datum in a procedure / function / method.
-
The color value (for example clAcqua) is matched to the input (status or value). Color, other than visual meaning, has no effect on the code (it shouldn't). Typically those controls were designed and used as a "level": the highest value "won" over the others and that was the state (color) displayed. The component is closely linked to the hardware (PLC), it must be thought of as a representation of the state and the PLC vice versa must be programmed to coherently represent the state. If not, you need to build your own component and/or derive from an existing one by overriding the methods. Bye P.S. To better specify, the component could work like this: the displayed color is represented by the highest active bit in Bit1, Bit2, Bit3 ..... etc., if more bits are active the highest one "wins", but typically ONLY one of these should be active.; the alarm bit has priority over all and if active the component will display the matched colour.