

DelphiUdIT
Members-
Content Count
777 -
Joined
-
Last visited
-
Days Won
17
Everything posted by DelphiUdIT
-
I compared Delphi with industrial software, because the probable sales are more homogeneous in terms of numbers than the sales of houses like Microsoft or Epic (I think they sell millions of copies)... However the problem (I repeat) is definitely not the download of the software (I understand that you would like to have everything perfect) as much as its possible activation. And this is because the activation process (without an subscription license) includes contact with a possible third-party commercial company whose "core business" is the sale of products (including "subscription licenses"), as @Uwe Raabe has highlighted. The state of affairs is this, and if the normal measures of the "good father of a family" (in Italy they say so) are adopted at the time of purchase, there will certainly be much fewer problems in the future.
-
Leaving aside product-specific bugs for a moment, I'd say that preventing products purchased over time from being readily available for later "download" is a practice that not only Embarcadero but many other software vendors adopt. In the industrial field several software and SDKs (nothing to do with Embarcadero or Pascal) can be downloaded for a limited period after the purchase (typically 1 or 2 weeks) via a temporary link provided (and increasingly the copy is digitally marked ). This is to avoid "piracy" and the spread of illegal copies. Naturally, within the period of validity of the guarantee, it is possible to request a new copy by e-mail, specifying the reason. If you carry out software maintenance contracts (updates beyond the warranty limit) you can request updates in the same way (either via the WEB portal or via e-mail). I would say that this attitude, as unethical as it may seem, is in any case legitimate on the part of the producer (it is my thought). The downloaded copy should be kept "safely" by the buyer like any other good purchased with its documents. What I think could instead be a problem is not so much the download of the correct installer of the product, but rather its activation which still has a limited number of actions. Just to remind you, for example, even Windows can't install an infinite number of copies (at least until you have digitally licensed hardware on board like new laptops). And if this isn't a problem for those with an active license (Embarcadero always extended the number of activations when I requested it), it is for those who don't have an active license (at least I think ...). Bye
-
Can I use managed C# DLL in unmanaged Delphi application ?
DelphiUdIT replied to AndrewHoward's topic in General Help
Look at this: https://stackoverflow.com/questions/2048540/hosting-clr-in-delphi-with-without-jcl-example There is also an example to use C# with reflection (without COMVISIBLE). I use JCL to use C# DLL with [COMVISIBLE(TRUE)] Bye -
What is the recommended method of obtaining my devices IP address?
DelphiUdIT replied to JohnLM's topic in Cross-platform
That may be right. The USB when is inserted and connected take 192.168.xx.xxx, and there is another NIC adapter that has the 10.0.0.3. That may be also a VM virtual adapter (like VirtualBox or VMWare). In Windows 11 there is the virtual IP for WSL too. In the Phone 127.0.0.1 is a localhost IP. I don't know in Android if there should be an IP with USB cable. Bye -
What is the recommended method of obtaining my devices IP address?
DelphiUdIT replied to JohnLM's topic in Cross-platform
Yes, that's exactly what I meant. In the second post I indicated how to transmit these information in a simple way. I use this to keep track of the IPs assigned to all systems (individual processing industrial line). So I can also know and monitor the IPs assigned to the various NICs (each PC has 4/5 NICs and about 8 IPv4 addresses). Otherwise I wouldn't know how to get such data from a PC on the network (except using SNMP). Thanks very much for the suggestion. Really appreciated. -
Is it possible to create a VPN client/server in Delphi?
DelphiUdIT replied to Clément's topic in RTL and Delphi Object Pascal
You can start from RAS ... Jedi units RAS32 and JvRas32 encapsulate Windows api about RAS. In this way you can create your "client" VPN in Windows (I use it in Windows 7, hope that it works in new Windows version too). I had an example how to use it to create from "zero" a vpn connection with RAS many years ago. If I find it i will post here. For server I dont'know .... Bye -
What is the recommended method of obtaining my devices IP address?
DelphiUdIT replied to JohnLM's topic in Cross-platform
Yes, i know that. But arp implemented is very slowly (in some networks needs 15 minutes to be updated). In my solution you may have the knowledge immediately, of course like you told if there is the software running. Other way is to replicate the arp discovery for IPV4 (RFC826) scanning the whole net and do it more "fast". Of course one must implemented the NDP for IPV6 (RFC4861). But this means that you must run other software too. Bye -
What is the recommended method of obtaining my devices IP address?
DelphiUdIT replied to JohnLM's topic in Cross-platform
Another solution could be to create a simple UDP server with Indy on port x and use the UDP broadcast to send a packet (perhaps containing the list mentioned in my previous post). Obviously this solution works only on local networks. Each device connected to the LAN would receive that packet on port X from which you can detect both the "remote" address and possibly read the UDP packet data. -
What is the recommended method of obtaining my devices IP address?
DelphiUdIT replied to JohnLM's topic in Cross-platform
You can use Indy to find local addresses of every device. You can send these lists wherever you want. This is an example: uses IdStack, IdStackWindows; //<--- This is for Windows, but I think you can use others Units for others platforms (IdStacklibc, IdStackLinux, IdStack......) function GetLocalIpList(Name: string): TStringList; var Lista: TIdStackLocalAddressList; temp: TCollectionItem; GProva: TIdStackWindows; begin result := TStringList.Create; try Lista := TIdStackLocalAddressList.Create; GProva := TIdStackWindows.Create; GProva.GetLocalAddressList(Lista); for temp in Lista do if temp is TIdStackLocalAddressIPv4 then result.add((temp as TIdStackLocalAddressIPv4).IPAddress); GProva.Free; Lista.Free; except on e:exception do ; end; end; -
Communication between Unicode and non-Unicode applications
DelphiUdIT replied to dummzeuch's topic in Indy
Uses IdGlobal; procedure TForm1.Button1Click(Sender: TObject); var s: ansistring; t: TIdBytes; begin s := AnsiString('ABCD'); t := rawToBytes(s[1], length(s)); IdTCPClient1.IOHandler.Write(t); end; To communicate with older devices, I use ansistrings like that. -
I agree with @Brian Evans, it is likely that BergSoft components or FasteReport need to be updated. Bye
-
JEDI Installation Annoyances 10.4
DelphiUdIT replied to PeterPanettone's topic in Tips / Blogs / Tutorials / Videos
I never had any issue with Jedi, but i always worked with license Embarcadero, not with CE. Just download 3 zipfiles from github, decompress them and run at cmd "install" two times. That's all. No path edit, no other things. Always working. But not with CE, because there is no support to command line compiler. Bye -
Map file = Detailed also produces DRC file
DelphiUdIT replied to Fr0sT.Brutal's topic in Delphi IDE and APIs
With 11.3 it's the same. The .drc file is generated anyway. -
My old projects (first made for Android 4.4) work in Delphi 11.3 (of course updating very little some code) and with old SDK. They run in Android 11 (and in the old Android simulator, still available with old SDK). Of course you cannot use new functions. I use local SQlite, Bluetooth and Internet. But of course I can't in any way guarantee you that your project will compile or work with it. P.S.: I don't distribute the APK via Google Play. I install it directly on the phone.
-
Warning: Windows Update KB5028166 breaks NT Domains
DelphiUdIT replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
May be this should help: https://techcommunity.microsoft.com/t5/storage-at-microsoft/smb-signing-required-by-default-in-windows-insider/ba-p/3831704 It was released one month ago and I think it's now effective on the release channel. -
Strange behaviour Windows VCL app on specific laptop
DelphiUdIT replied to mvanrijnen's topic in VCL
HP have some laptop models with NVidia P600 Quadro (eg. HPZB15VG5). Like @FPiette said be sure that you use the latest driver installed. Also, try to force the app to works with integrated graphics (Intel GPU) or with NVidia. You can use the Optimus / GPU Nvidia settings from NVidia control panel. Bye -
Run process with normal user privileges from elevated process
DelphiUdIT replied to PawelPepe's topic in Windows API
May be you can also use this: https://learn.microsoft.com/en-en/windows/win32/api/securitybaseapi/nf-securitybaseapi-createrestrictedtoken?redirectedfrom=MSDN If you use a thread to launch the activities, you can set new lower privilege with "SetThreadToken" and after that launch what you need. If you don't use a thread you must use "NtSetInformationProcess" to set lower privilege to current application. I use that very long time ago and I don't have any example at hand (and I don't know if it works now). Bye -
Delphi code for reading a .ply file
DelphiUdIT replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
I have no other suggestions, sorry. I had used that package several years ago only for the purpose of displaying various graphic formats in an application (and I had to display just a PLY coming from a 3D scanner). Good luck -
Delphi code for reading a .ply file
DelphiUdIT replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
You can try to see if you find anything useful in this project. It can open and view various graphic formats (including "PLY"). It is possible that something is also exposed on pascal the "PLY" and not only in DLLs. https://sourceforge.net/projects/glscene/files/GLScene/GLScene v2.2/ -
For zip you can use Delphi integrated library System.Zip.TZip https://docwiki.embarcadero.com/Libraries/Sydney/en/System.Zip.TZipFile For 3des and others you can use getit to get for example LockBox 3 2021.11 or DEC Lite 6.3. Both components can also be found on github. Bye
-
Parallel for and CPU with Performance and Efficient cores
DelphiUdIT replied to Jud's topic in RTL and Delphi Object Pascal
Using "priorities" to manage threads and their (hypothetical) distribution between cores is not simple and as mentioned it is not the right tool. For now multiple processors, processor groups and numa nodes are out of Delphi's handling, or better let's say Delphi is not optimized for that. Memory and all shared and non-shared resources are handled "differently" in these systems. Those who have programmed in multiprocessor systems (such as Xeon platforms) have experienced this. Bye -
Parallel for and CPU with Performance and Efficient cores
DelphiUdIT replied to Jud's topic in RTL and Delphi Object Pascal
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). -
Parallel for and CPU with Performance and Efficient cores
DelphiUdIT replied to Jud's topic in RTL and Delphi Object Pascal
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. -
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
-
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.