Jump to content

DelphiUdIT

Members
  • Content Count

    449
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by DelphiUdIT

  1. I'll never used affinity mask, 'cause my experience is that ThreadDirector does a good work. But like told if you want max performance one should use it. There are other systems too, for using max power form the system (eg. if one has additional graphic card): using OpenCL. One can start form here: https://github.com/LUXOPHIA/OpenCL Bye P.S.: I never used it, normaly i use OpenCL with others advanced library (artificial vision).
  2. You can try to call this: function uCoreId: uint64; register; asm //from 10 gen it reads the IA32_TSC_AUX MSR which should theoretically //indicate the CORE (THREAD in the case of HyperThread processors) in which rdpid runs rdpid RAX; end; This function returns the ID of the core (means CORE THREAD) in wich rdpid runs. It works form Intel 10th generation CPU. The first Core Thread is numbered 0 (zero). You will see that also the efficients core will be sometimes used. This is because the ThreadDirector allocates threads (meaning processes) based on various factors. The distribution is not predictable. If you want to avoid using the efficient cores you have to use the affinity mask (for the whole program) and select only the performance cores. Bye P.S.: this is for WIN64 program.
  3. DelphiUdIT

    Import .NET Assembly

    Hello, with CHET you don't have do include nothing. It works on LLVM and this should be available in your system. A community edition of Visual Studio is typically necessary for this. Read the instructions for CHET. I cannot share the include file, 'cause they are not redistributable, but like i told in previous post you have to copy the .h files of halcon in one directory and go on. Some errors will be exposed because some files exposed a subdir path, change this and all will be done. Again, some functions refer to a wrong dll and you must change this in the wrapper (.pas file), but in my previous attachment you can see that. PS.: all Halcon libraries are converted in the wrappers that I posted. But in the wrapper that are only declarations, no code inside of course. Bye
  4. DelphiUdIT

    Import .NET Assembly

    It's a bit complex to explain, however I try. First, to use CHET you have to put all the includes you need into one directory, and then you have to change the definition in the individual file references, which originally point to subdirectories. Second, unlike C, where you can declare variables or definitions anywhere and even out of order, in the wrapper, declarations must be "ordered" (ie first you declare something, then you use it). So you have to take the generated .pas and move several declaration blocks at the head of the wrapper (or between various other declarations). It's not very complex, it just takes a little patience and taking into account that I do it every three years or so, everything is manageable. Another good thing is that once you've done it, you can use tools like Beyond Compare to help you: between the various versions of Halcon there are no abysmal differences, so much so that normally you just need to recompile the projects (or at least change some variables) to port to the new version. In updates between versions (for example between 20.11.01 and 20.11.03) there are no changes in the includes (unless it is explicitly highlighted in the notes) and therefore there is no need to change the wrapper. I normally use the Draw_Rectangle and similar functions without problems. If you want advice, when you can use the functions without the T_ as they use normal variables and not tuples. var ro1, co1, ro2, co2: double; //SomeWhere should be decalre "fWindowHandle: HLong;" and should be assigned of course Draw_Rectangle1(fWindowHandle, @ro1, @co1, @ro2, @co2); //and you can use of course also the _mod function ..... Bye P.S.: Beware of one "thing": when a function returns multiple elements (for example a list of points), it MUST be used in the form "T_" i.e. with tuples, unless it is certain that only one value is returned, such as example when preceded by the SelectObj function.
  5. DelphiUdIT

    Indy with OpenSSL 1.1.1 support is fine

    Hello everyone, sometimes it's good to have some good news in the forums and not always requests for support (even if these always improve technical skills). With Alexandria Rad Studio 10.3 I tried to enable TLS 1.3 support using a trunk version of Indy "https://github.com/mezen/Indy/tree/NewOpenSSL_PR" already described in issue 299. Uninstalled Indy from RAD STUDIO. Known Issues: - Lost support for FMX LivePreview (which I don't use). - Each time Rad Studio is closed, a runtime error is generated in the RTL library.... It is not recursive and when OK it disappears without a trace. I only close RAD Studio 1 or 2 times a day so it doesn't give me any problems. Care must be taken to remove all references to the original Indy sources in the RAD STUDIO LIBRARY path. To make it faster I saved the Windows registry with REGEDIT, edited with a NOTEPAD removing all references to INDY from the various keys and re-imported again with REGEDIT. I then entered the new paths (Core, Protocols, System, OpenSSL) of the new archive (unzipped in a directory on the disk) again in RAD Studio. Without touching anything, recompiling the old project with native OpenSSL 1.0.2 support worked perfectly. Then I modified the source by inserting a $DEFINE and some $IFDEFs to easily switch from version 1.1.1 to version 1.0.2 and vice versa. Version 1.1.1 actually only needs to specify the security keys (cipher) to use which are different from those of 1.0.2, and obviously have access to the two OpenSSL 1.1.1 DLLs. Everything works, with TLS 1.3 support and automatic downgrade to TLS 1.2 (as already reported in other TOPICs). Changing the $DEFINE and recompiling switches to the old "original" version with TLS 1.2 support with OpenSSL 1.0.2 All third-party components (obviously in source format) that use Indy work perfectly even with the new version once recompiled. I haven't tested all of my projects that use Indy to see if there were any issues, but the last 10 recompiled projects didn't produce any glitches. When I have some time I will try to reinstall RAD STUDIO from scratch and directly upgrade the Indy TRUNK in the original RAD Studio version just to see if by recompiling from there you can avoid LIBRARY PATH updates (except the OPENSSL which you have to add by hand) and above all if you manage to avoid the error when closing RAD Studio. Bye P.S.: the project is an HTTPS server directly derived from an Indy demo. It is online in Internet without any filter, protection or other with no issue at all after more than one years in two systems Windows desktop and Linux server (now the Linux server is not anymore online).
  6. You can create different empty projects and see the differences between them. I think that an empty project consists in two relevant files: .cbproj and .cpp (or .c). Use Beyond Compare to see the differences. Bye
  7. DelphiUdIT

    Import .NET Assembly

    This is not an interface with .net assembly. It's a wrapper around C library. This will use the HalconC.dll. Nothing to do with .Net. And Yes i created lot of projects, may be not very big but most of them use 20 and more thread like that in the examples (of course with more and more functions inside) with Halcon. I don't have memory leak, but you must care to "clear" every single hobject that you use, before use it (not need if you are sure that is nil). If you reuse an object without clear it and it's already in use you will "lost" the memory (means LEAKS). Also, the wrapper don't has any know about macro, so you cannot use Halcon macro in Delphi. But this was never a problem for me. Bye
  8. DelphiUdIT

    Import .NET Assembly

    I used that tool, but to use it i had modified the include file (.h) of Halcon and after that i had manually adjust the pas file results of Chet. Some manually works, every 3 years
  9. DelphiUdIT

    Import .NET Assembly

    This is sample program ready for Halcon 20.11 Steady. https://cloud.dyn-o-saur.com/Project_H2011.zip Bye
  10. DelphiUdIT

    Import .NET Assembly

    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
  11. 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
  12. DelphiUdIT

    Import .NET Assembly

    This is all that you need to work for the Halcon 22.11 Steady and Delphi. Hope this help you. Bye HalconC_2211.pas
  13. DelphiUdIT

    Community license

    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
  14. 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
  15. 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
  16. DelphiUdIT

    Community license

    @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
  17. DelphiUdIT

    Community license

    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
  18. DelphiUdIT

    Community license

    😍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.
  19. DelphiUdIT

    Community license

    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
  20. DelphiUdIT

    security with no access to the cmd.exe

    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
  21. DelphiUdIT

    Anyone know of an AVIF Image Decoder for Delphi?

    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
  22. DelphiUdIT

    Anyone know of an AVIF Image Decoder for Delphi?

    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.
  23. DelphiUdIT

    indy + LDAP

    There is a unit IdLdapV3 (under directory "lib\protocols"). Bye
  24. DelphiUdIT

    Looking for RpShell, RpTable, RpDefine, RpBase, RpSystem

    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/
×