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 1,839 other subscribers

Archive for the ‘Delphi’ Category

A Post-Mortem on the Recent Developer Story Information Leak – Meta Stack Overflow

Posted by jpluimers on 2018/03/27

I wish many other companies would disclose post mortem information like this: [WayBackA Post-Mortem on the Recent Developer Story Information Leak – Meta Stack Overflow

via: [WayBackInteresting and very appropriate top commenthttp://meta.stackoverflow.com/questions/340960/a-post-mortem-on-the-recent-developer-story-information-leak – This is why I Code – Google+

–jeroen

 

 

Posted in .NET, Delphi, Development, Pingback, Power User, Software Development, Stackoverflow | Leave a Comment »

Update for DprojNormalizer | The Art of Delphi Programming

Posted by jpluimers on 2018/03/20

Important small [WayBack] Update for DprojNormalizer | The Art of Delphi Programming: it fixes usage of SanitizedProjectName in all other properties.

It is now at [WayBack] Version 2.2.1.

via: [WayBack] Small update for DprojNormalizer available – Uwe Raabe – Google+

–jeroen

 

Posted in Delphi, Development, Software Development | Leave a Comment »

Delphi: do not mix interfaces and classes part X

Posted by jpluimers on 2018/03/15

A very interesting discussion on what the mixing of interfaces and classes can get you into: [WayBack] I’ve got an interface with generics which accepts classes:IMyGeneric = interface…..end;What I want to do is to allow this interface to… – John Kouraklis – Google+

TL;DR: do not mix interfaces and classes.

As often, Asbjørn Heid chimes in showing some insight on clever mixing of the two with sample code accepting an unconstrained type. Don’t do that unless you really know what’s going on behind the scenes.

–jeroen

Read the rest of this entry »

Posted in Delphi, Development, Software Development | 4 Comments »

15 months later: what happened to Delphi Language Enhancements?

Posted by jpluimers on 2018/03/13

This is a reminder to myself to see what Idera has accomplished in 15 months on the suggested [WayBackDelphi Language Enhancements after it bought Embarcadero some 30 months ago on credit and 21 months after firing a very large portion of the Delphi R&D team even outside Spain.

The odd thing is that despite all the Borland, Inprise, Codegear and Embarcadero hassle Delphi has always survived. So lets this be my reminder to investigate what happened.

–jeroen

via: [WayBack] Blogged – Delphi Language Enhancements – Vincent Parrett – Google+

Related:

Posted in Delphi, Development, Software Development | Leave a Comment »

libssh-delphi will migrate from Mercurial on BitBucket to git on GitHub soon (or finding about “fatal: repository … not found”, “MSVCR120.dll is missing” and “D3DCOMPILER_47.dll is missing” when prepping a fresh VM for a presentation)

Posted by jpluimers on 2018/03/08

When git on Windows suddenly gives you this when the repository URL opens fine in Chrome:

C:\Users\jeroenp\Versioned>git clone https://bitbucket.org/jeroenp/libssh2-delphi
Cloning into 'libssh2-delphi'...
remote: Not Found
fatal: repository 'https://bitbucket.org/jeroenp/libssh2-delphi/' not found

but this worked fine:

C:\Users\jeroenp\Versioned>git clone https://github.com/jpluimers/GExperts.git
Cloning into 'GExperts'...
remote: Counting objects: 12031, done.
remote: Total 12031 (delta 0), reused 0 (delta 0), pack-reused 12031R
Receiving objects: 100% (12031/12031), 9.77 MiB | 1.36 MiB/s, done.

Resolving deltas: 100% (9284/9284), done.

I first thought “huh?”.

Then I remembered: this was a Mercurial repository, but I hardly use Mercurial any more…

C:\Users\jeroenp\Versioned>hg clone https://jeroenp@bitbucket.org/jeroenp/libssh
2-delphi
destination directory: libssh2-delphi
requesting all changes
adding changesets
adding manifests
adding file changes
added 30 changesets with 56 changes to 25 files
updating to branch default
12 files updated, 0 files merged, 0 files removed, 0 files unresolved

Since I wanted to switch away from bitbucket for a long time anyway, it was time to say goodbye and find out how to make the conversion to git.

A quick search revealed there were many tedious manual ways involving command-lines: [WayBack] Convert Mercurial project to Git – Stack Overflow

But then I found out that github can fully automagically import a Mercurial Repository (of course without the BitBucket attached bells and whistles like issue tracker):

So it is now at github.com/jpluimers/libssh2-delphi with one user still to be mapped at github.com … libssh2-delphi/import/authors: Zeljko Marjanovic. If I ever get in contact with him (I tried over the last 2 years), then I will add him.

For now, I will be in touch with Vadum Lou (a.k.a. https://github.com/pult, full nameVadim V. Lopushansky) who already made another manually copied fork and get his additions integrated.

I might redo the conversion process later on as at least some of his submissions are at least partially in a Mercurial pull request.

Then I need to merge the develop branch into the master branch and prepare a release.

Oh: if it fails to debug in Delphi, then run the EXE alone. You will get an error like this:

---------------------------
SftpClientDemo.exe - System Error
---------------------------
The program can't start because MSVCR120.dll is missing from your computer. Try reinstalling the program to fix this problem.
---------------------------
OK
---------------------------

I need to document this better in the README.md: the underlying libssh2 DLLs require the Visual Studio 2013 C++ run-time library to be installed. The latest version I could find as of writing is vcredist_x86.exe version 12.0.40649.5 from the Update for Visual C++ 2013 and Visual C++ Redistributable Package at https://support.microsoft.com/en-us/kb/3138367 (download selection) or http://download.microsoft.com/download/C/C/2/CC2DF5F8-4454-44B4-802D-5EA68D086676/vcredist_x86.exe (direct download).

I need to update If a program you wrote can’t start becuase MSVCR*.dll is missing, then you forgot to ship the Visual C++ runtime… from 2012 on this as well as there are more versions available now than listed there.

Another error I got was the one below when running .NET stuff, but that might be because Windows Update was in progress:

---------------------------
SourceTree.exe - System Error
---------------------------
The program can't start because D3DCOMPILER_47.dll is missing from your computer. Try reinstalling the program to fix this problem.
---------------------------
OK
---------------------------

Later: yes, that was indeed fixed during Windows update. Apparently, Microsoft has an update installation order issue or a dependency requirement issue where part of .NET depends on that DLL, even though it is not yet present.

–jeroen

Posted in .NET, Delphi, Development, Power User, Software Development, Windows, Windows 7 | Leave a Comment »

Packet Sender is a good tool when debugging protocols: free utility to send & receive network packets. TCP, UDP, SSL

Posted by jpluimers on 2018/03/07

It was fitting to bump into [WayBack] Packet Sender is a good tool when debugging protocols…” Written by Dan Nagle… – Lars Fosdal – Google+ on the day presenting [WayBack] Conferences/Network-Protocol-Security.rst at master · jpluimers/Conferences · GitHub

It also means that libssh2-delphi is getting a bit more love soon and will move to github as well after a conversion from mercurial.

Some of the things I learned or got confirmed teaching the session (I love learning by teaching):

Here is some more info:

–jeroen

Read the rest of this entry »

Posted in Communications Development, Delphi, Development, Encryption, Hardware, Harman Kardon, Home Audio/Video, HTTP, https, HTTPS/TLS security, Internet protocol suite, Let's Encrypt (letsencrypt/certbot), OpenSSL, Power User, Security, Software Development, TCP, TLS | Leave a Comment »

multithreading – Closure in TTask.Run(AnonProc) not released after AnonProc has finished – Stack Overflow

Posted by jpluimers on 2018/03/06

For my link archive: [WayBackmultithreading – Closure in TTask.Run(AnonProc) not released after AnonProc has finished – Stack Overflow

via: [WayBackHow the combination of inline, interfaces and missing RVO can break your code – Stefan Glienke – Google+

TL;DR from RAD StudioRSP-12462 TThreadPool worker thread holds reference to last executed task by Asbjørn Heid as a regression since XE8:

A temporary variable in TThreadPool.TQueueWorkerThread.Execute keeps a reference to the last executed work-item (task), which is only released when the Execute method ends.

Being in a pool the thread is usually kept alive until the pool is destroyed, which for the Default pool means during finalization of the unit. Thus the last executed tasks are not released until the program terminates.

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

WouterVanNifterick/C-To-Delphi: C To Delphi converter

Posted by jpluimers on 2018/03/01

Reminder to self: check out WouterVanNifterick/C-To-Delphi: C To Delphi converter and the state it is in now.

via: [WayBack] Hi, I’ve created a C to Delphi converter.Because it’s been so useful to me that I’ve decided to share it.It converts C code as-you-type, and it keeps… – Wouter van Nifterick – Google+

–jeroen

Posted in C, Delphi, Development, Software Development | Leave a Comment »

Do NOT download the Embarcadero patch for RAD Studio 10.2.2!

Posted by jpluimers on 2018/02/11

[WayBack] Embarcadero just released a patch for RAD Studio 10.2.2. It breaks linking projects with runtime packages, like GExperts, any other IDE expert and probably also most component packages. – Thomas Mueller (dummzeuch) – Google+ in a response to [WayBack] RAD Studio 10.2.2 Tokyo February 2018 Patch available now at https://cc.embarcadero.com/item/30819. This patch for RAD Studio 10.2.2 (build 2004)… – Marco Cantù – Google+.

RSP-19914 (by Thomas Mueller)

Summary

After installing the RAD Studio 10.2.2 Tokyo February 2018 Patch I can no longer compile any project with “Link with runtime packages”.

Error message:
[dcc32 Fatal Error] Project1.dpr(5): E2225 Never-build package ‘vcl’ must be recompiled

Steps to reproduce

1. Create a new VCL project
2. Open project options
3. Select Packages -> Runtime Packages
4. Set “Link with runtime packages” to true
5. Close dialog with OK
6. Compile the project
-> Error

You might have noticed that the MVP logo is no longer on the blog. It got revoked because I was too critical. Given releases like the above, I can’t stop being critical in a public way as the internal ways to effectively voice criticism that used to work in the past stopped working a long time ago.

Not just the MVP was revoked, the account to which the MVP was attached got killed without notification. That account also had the tech-partner licenses attached: the ones I used to support Delphi open source projects. Which means I do not have any Embarcadero provided licenses to support open source Delphi projects any more except the ones I own (the most recent ones being Delphi 2007 and XE4).

Many people in the Delphi community even refuse to become MVP because formally the MVPs are not allowed to be be critical publicly. Which means these community members have a limited list of Delphi versions they can use to support and test their open source projects with.

I am glad for the time I could use those licenses to support open Delphi source projects, but alas, that time is over. I still like the concepts of Delphi as those are strong. I don’t like how Embarcadero handles their infrastructure and product quality.

In the next 2 years there will be Delphi posts on my blog as that’s about the depth of the posting queue right now. After that: time will tell. For the last decade or so, I’ve spend more free time supporting Delphi than spending time on paid Delphi projects. That won’t last forever.

For now I’m going on a two week holiday tomorrow after which I will be available for new projects.

–jeroen

Related:

Posted in Delphi, Delphi 10.2 Tokyo (Godzilla), Development, Software Development | 22 Comments »

Mixing x64 Outlook with x86 Delphi: never a good idea…

Posted by jpluimers on 2018/02/07

Via [WayBack] Hi all,I’m a bit stuck here with a “simple” task.Looks like Outlook 2016 doesn’t supports “MAPISendMail”, at least, if i trigger this, Thunderbird… – Attila Kovacs – Google+:

Basically only MAPISendMail works cross architecture and only if you fill all fields.

This edited [WayBackemail – MAPI Windows 7 64 bit – Stack Overflow answer by [WayBack] epotter is very insightful (thanks [WayBackRik van Kekem – Google+):

Calls to MAPISendMail should work without a problem.

For all other MAPI method and function calls to work in a MAPI application, the bitness (32 or 64) of the MAPI application must be the same as the bitness of the MAPI subsystem on the computer that the application is targeted to run on.

In general, a 32-bit MAPI application must not run on a 64-bit platform (64-bit Outlook on 64-bit Windows) without first being rebuilt as a 64-bit application.

For a more detailed explanation, see the MSDN page on Building MAPI Applications on 32-Bit and 64-Bit Platforms

–jeroen

Posted in Delphi, Delphi x64, Development, Office, Outlook, Power User, Software Development, x86 | Leave a Comment »