The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,115 other followers

Archive for August 20th, 2020

Delphi unit aliases: multiple ones can point to the same unit

Posted by jpluimers on 2020/08/20

A while ago, I had to figure out how to get some GExperts stuff cross-compile to older Delphi versions, because of UITypes usage that is not available in Delphi XE and lower (but much of what it contains is in the Types unit).

So I went down memory lane, as I remember in Delphi 2, the Delphi 1 WinTypes and WinProcs units were merged into the Windows unit.

A quick search revealed the stackoverflow entry mentioned here:

for the Delphi 1 -> Delphi 2 migrations, these aliases were used where multiple units pointed to the same one:

WinTypes=Windows;WinProcs=Windows;DbiProcs=BDE;DbiTypes=BDE;DbiErrs=BDE

See [WayBack] delphi – wintypes.dcu not found and code completion stops working – Stack Overflow

A longer search found this in my own archives:

File D2-CS-2.0\DEMOS\DOC\AUTOPROJ\AUTOPROJ.DOF

Has this line:

UnitAliases=WinTypes=Windows;WinProcs=Windows

Source: [WayBack] GX_GenericUtils.pas fails to build in Delphi 2007 because it uses unit UITypes · Issue #22 · jpluimers/GExperts · GitHub

(Ab)using unit aliases to fail on VCL

You can use unit aliases so your applications cannot use the VCL any more.

The trick is to alias Forms or VCL.Forms into something that does not exists, like Forms=__no_VCL_Forms__. The reason this works is that any VCL application uses the Forms unit because of the Forms.Application variable.

Reference:

–jeroen

Posted in Conference Topics, Conferences, Delphi, Development, Event, GExperts, Software Development | Leave a Comment »

Don’t use the TPL as it still has rough edges in unsuspected places

Posted by jpluimers on 2020/08/20

A few posts on why not to use the TPL and be very careful with regular RTL threading code:

In my opinion, threading code needs to be written and maintained by people that live and breath multi-threading. Over the years, RTL and TPL have not lived up to that, but a library like [WayBack] OmniThreadLibrary has.

If you still insist on the TPL, or want to break it, start with these posts: [WayBack] Parallel Programming Archives • Stephen Ball’s Technical Blog

–jeroen

Posted in Delphi, Development, Software Development | 1 Comment »

Happy birthday UDP!

Posted by jpluimers on 2020/08/20

Today it’s the 40th birthday of UDP. Or more precise: 40 years after [WayBackRFC 768 – User Datagram Protocol got submitted.

It is still used a lot today, so be sure to read more background on [WayBackUser Datagram Protocol – Wikipedia.

And of course on a birthday, it is nice to have few good jokes. So here we go:

[WayBack“I would tell you a joke about UDP, but you probably wouldn’t get it.” | Hacker News

[WayBack] I would tell you a joke about UDP, but you probably wouldn’t get it. So here’s a TCP joke | reddit.

[Archive.is]:

  • UDP packet bar walks into
  • The best thing about UDP jokes is that I don’t care if you get it. #sysadmin #networking #IT

You can generate more yourself: udpjoke.py

–jeroen

Read the rest of this entry »

Posted in Communications Development, Development, History, Internet protocol suite, UDP | Leave a Comment »

 
%d bloggers like this: