DelphiUdIT
Members-
Content Count
612 -
Joined
-
Last visited
-
Days Won
11
Everything posted by DelphiUdIT
-
I've tried again several times and it actually works 1 time in a while. Saying that there aren't many ways: do you use what @Remy Lebeau told you or do you use a simple timer i.e. you set "enable = false" for all the controls and then call a timer (with a 50 ms interval) and perform your processing in the timer event. At the end of the timer you reactivate the controls.
-
As documentation says: So, is better to use directly Update for each control after every "enabled = false". I tried and for me is working, but I really don't know if it's OK in all situation (i.e. under heavy load).
-
I don't use c++ to build interfaces, only for device interfacing. I normally use Delphi instead, but the principle is the same: when you use any property of a component (but also functions, procedures, methods, etc ...) especially graphical components, i.e. which is executed "behind" the property it can be synchronous or asynchronous. So you cannot in any way expect that your action will have an immediate response, especially with graphics. Normally the graphics have a lower priority level (let's call it that) than the standard code and it is still unlikely that the graphics will be able to follow the code in real time (and it doesn't even make sense normally). To clarify the situation better, I present the use of the "SendMessage" and the "PostMessage". Both perform the same function, i.e. send messages to the queue.... but while SendMessage "makes sure" that the message is deposited and returns to the caller only after the message has been deposited in the queue (synchronous operation with your code), PostMessage instead sends it to the queue and returns immediately, without making sure that it is actually in the queue (the message will arrive in the queue asynchronously with respect to your code). With SendMessage at the next line of your code it is certain that the message is present in the queue, with PostMessage it is not certain (and no time prediction can be made) that the message is present at the queue of the next line of your code.
-
You can start from here: https://github.com/IndySockets/Indy/wiki/Updating-Indy
-
Even if you disable Windows Update policies, the updates imposed by Microsoft will still be carried out. This is certain in the latest version of Windows 11 Pro. I have lot of PC with the policies disabled and all of them do sometimes some upgrades.
-
Datasnap Server doesn't response after awhile?
DelphiUdIT replied to Mustafa Simsek's topic in Network, Cloud and Web
Which operating system are you using? For TCP/IP connections, there are limits on the number of available IP ports and the number of concurrent connections. If you have a high connection/disconnection speed, you may run out of available ports as they may all be in the TIME_WAIT state. But it could also be that the "used" and released ports are not reused "immediately" and therefore the server "stops" when the range of available ports has run out. Look this https://learn.microsoft.com/en-us/answers/questions/482793/tcp-ip-concurrent-connections -
You can try PasLibVlc, is a wrapper around VLC made in Pascal. https://prog.olsztyn.pl/paslibvlc/
-
Call for Delphi 12 Support in OpenSource projects.
DelphiUdIT replied to Tommi Prami's topic in Delphi Third-Party
If I'm not mistaken, nothing can be publicly distributed that is developed with the Beta stage environment. And on the other hand, until it becomes public (ie sold publicly by Embarcadero) it doesn't make much sense to do anything. Any features could change at the last moment and therefore frustrate the work done (as well as producing unusable libraries). -
I think that with regular account (subscription active) you cannot use CE.
-
I speak in practical terms, beyond the legal terms of the license. The CE is on a time basis. It must be renewed every year. In particular, it is no longer possible to renew 10.4 CE and it is necessary to "move" to 11.3 CE. At the end of the annuity, the development environment ceases to operate and can no longer be used, neither for new nor for existing projects. In general projects developed with 10.4 can be ported to 11.3 without much effort, with the exception of third-party components where without source or developer support it is not possible to use them. Obviously then it is necessary to check the legal terms of the new 11.3 CE to see if they are compatible with what we do.Insert other media Bye
-
Algorithms. Irrational numer storage.Playing with 6 axis robot.
DelphiUdIT replied to skyzoframe[hun]'s topic in Algorithms, Data Structures and Class Design
Pi was an example, I meant using an "irrational" number with a float, i.e. increasing the number of significant digits in the calculation...at least I think that's what @skyzoframe[hun] wanted suggestions on. -
Algorithms. Irrational numer storage.Playing with 6 axis robot.
DelphiUdIT replied to skyzoframe[hun]'s topic in Algorithms, Data Structures and Class Design
In my applications (even with robot guides) I also tend to use only integers (for example managing the vector of the last movement section precisely with integers), but having carried out several applications with robots I must say that often the float calculations are unavoidable, for example if you have to perform non-linear movements, perhaps using "quaternions". So it could be that the request made by @skyzoframe[hun] in this thread is legitimate and that its use is also a necessity. Bye -
Algorithms. Irrational numer storage.Playing with 6 axis robot.
DelphiUdIT replied to skyzoframe[hun]'s topic in Algorithms, Data Structures and Class Design
Apart from the controller hardware (an element that should not be underestimated), on the numerical calculation part currently in hardware the precision you can obtain is in EXTENDED (80 bit) for 32 bit software and DOUBLE (64 bit) for 64 bit software . If you want to go beyond these limits you have to use libraries that take advantage of HW + SW to increase calculation precision. I can point this out to you, even though I've never used it. https://github.com/TurboPack/RudysBigNumbers Good luck -
What @mjustin meant is that normally a custom CONTEXT is used where for each connection received additional data can be inserted, such as an ID, a particular string of marking, or any other information we need for the activity. Example: TMyContext = class(TIdServerContext) // <-- must derive from TIdServerContext public /// <summary> This is a new RefID field </summary> RefID: UInt64; ChargeStr: string; end; //Somewhere, BEFORE activate the server assign MyContext to the component begin IdTCPServer1.ContextClass := TMyContext; IdTCPServer1.Activate := True; end; //In the Connect event you can initialize the Context procedure IdTCPServer1Connect(AContext: TIdContext); var Ctx: TMyContext; begin Ctx := TMyContext(AContext); Ctx.RefID := 0; Ctx.ChargeStr := ''; end; //Now you can use the new context whereever you want
-
Delphi CE application accesses unknown IPs
DelphiUdIT replied to everybyte's topic in Network, Cloud and Web
Checking some of these IPs, you notice that they transit under "edgecastcdn.net", "msn.net" and "hwcdn.net". The first is a digital content provider (belongs to the owner of the Yahoo group), msn.net is known, hwcdn.net is the Windows update network and access is very often related to activities with Edge. I don't know the reasons because i never used TNetHttp and I don't know nothing about it (except the it exists). -
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.