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,854 other subscribers

Archive for the ‘Delphi’ Category

Canonical overview on Writing to the Windows Event Log using Delphi – Stack Overflow

Posted by jpluimers on 2016/07/26

A while ago, StackOverflow user Kobus Smit did some brilliant editorial work that – due to current state of StackOverflow – sort of fired backwards: his question got marked as duplicate before he could post his excellent answer. After that answer was posted, the oh-so pride SO-demi gods never took any energy to revisit to see which answers were best.

His simple question:

How can my Delphi app easily write to the Windows Event Log?What is the difference between TEventLogger and ReportEvent? How do I use the ReportEvent function?

Which somehow should be encompassed by this Delphi 5 question (apparently that 15+ year old Delphi version is still considered current by the SO demi-gods).

The answer summarises and extends existing answers spread out over StackOverflow and adds an EventLog git repository wrapping the ReportEvent and RegisterEventSource (which somehow is always a pain: Delphi services for instance often forget that).

Lesson learned when doing editorial work:

  1. prepare both the answer and question in markdown off-line
  2. ensure you mention in the question that the answer is meant as collection of “best of” answers found elsewhere
  3. post the question and answer in rapid succession
  4. cross your fingers for the StackOverflow demi-gods being in a good mood

–jeroen

via: Writing to the Windows Event Log using Delphi – Stack Overflow

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | 1 Comment »

delphi – Building Multi threaded TCP/IP Server – Stack Overflow

Posted by jpluimers on 2016/07/21

On the research list: TIdSchedulerOfThreadPool (now that TIdThreadMgrPool is gone).

Need to manage the lifetime of these as I don’t want the threads to live forever, but also don’t want to make the instantiation cost too high.

Most likely I want to wait for them to finish as well upon process exit, so this might be worth a look as well:

–jeroen

Source: delphi – Building Multi threaded TCP/IP Server – Stack Overflow

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

Delphi packages I have disabled by prefixing their description with an underscore (and why)

Posted by jpluimers on 2016/07/19

There is a little trick to disable “Known IDE Packages”: you can stop Delphi from loading one by either making “Value data” of the registry blank, or prepending it with an underscore:

packages that might have been disabled, by checking any string entries where the data has been pre-pended with an underscore OR is blank

[WayBackAccess violation at address 00000000 read of address 00000000, when starting the IDE or opening a project after installing the updates

I’ve pre-pended underscores to some packages in the registry key [HKEY_CURRENT_USER\Software\Borland|Codegear|Embarcadero\BDS|Delphi\#.0\Known IDE Packages] and intend to keep the list below updated over time.

Note that you have to prepend the description with an underscore: it is not sufficient to add these to [HKEY_CURRENT_USER\Software\Borland|Codegear|Embarcadero\BDS\#.0\Disabled Packages].

Empirically, the Disabled Packages seem to work only for packages starting with dcl in their filename.

Read the rest of this entry »

Posted in Castalia, Conference Topics, Conferences, Delphi, Delphi XE8, Development, Event, Keyboards and Keyboard Shortcuts, Power User, Software Development | 5 Comments »

Interesting trick posted by Lars Fosdal on keeping IDE user specific defines

Posted by jpluimers on 2016/07/13

Via Lars Fosdal:

In Tools|Options, Environment Options, Environment Variables – under User Overrides, add a new override

Variable name: DCC_Define

Variable value: billmeyer

This causes a define for billmeyer to exist for anything that you compile in your IDE, across all units, all projects.

Which means you can sprinkle your code with

{$ifdef billmeyer}{$hints on}{$endif}

or

{$ifndef billmeyer}{$hints off}{$endif}

or even isolate out the parts of the code that currently is in development so that it doesn’t get built in the build system.

I believe it was +Uwe Raabe who revealed this gem to me.

–jeroen

via: Is there a mechanism I have not yet found that would allow me to use a DEFINE….

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

Delphi include files and the search strategy are different for the compiler and IDE

Posted by jpluimers on 2016/07/12

Recently I bumped into a thing that I’d long forgotten: the Delphi compiler treats searching for include files (any files used with the {$I} or {$include} directive differently:

  • The compiler first searches the directory where the file that is including resides and then uses the project and IDE search paths.
  • The IDE only uses the project and IDE search paths.

This means that when you press Ctrl-Enter on the filename to be included you might edit a different file than the compiler will include.

So when a product has multiple include files with the same name in different sub-directories, then you must modify them all.

I’m not sure this is a bug or feature, so Embarcadero is free to put this in either their QA system or documentation system.

–jeroen

Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | 2 Comments »

Delphi keeping EXE locked; some links

Posted by jpluimers on 2016/07/12

For my own reference when coping with “[dcc32 Fatal Error] F2039 Could not create output file” which happens with a lot of Delphi versions:

As a temporary measure (in the end you have to restart the IDE), I often use Process Explorer to force close the open handles from bds.exe to the EXE.

It also happens intermittently using Visual Studio, where  devenv.exe keeps handles locked. Same Process Explorer trick applies there too.

You can do similar tricks with LockHunter or Handle.exe.

–jeroen

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

Im memoriam: Gwan Tan, friend, Delphi, Firebird, EKON and Delphi-Tage supporter

Posted by jpluimers on 2016/07/11

Overlijdensbericht Swie Gwan Tan; Eindhovens Dagblad; 20160711

Overlijdensbericht Swie Gwan Tan Eindhovens Dagblad; 20160711

Last friday, my good friend Swie Gwan Tan suddenly passed away. Like most good friends, we didn’t see each other often enough, but when we did it always was like we had last seen each other the day before.

We first met ages ago at early BorCon and EKON conferences: I remember them: Gwan, a little chine guy and a really really tall guy (Edwin) on many conferences. It didn’t take long before we chatted and became friends. It must have been the mid 199os, not even sure which year.

Was it the way he was a people person and both Edwin and me very technical? Or he deep into the database side of things and Edwin/me on the Delphi (and later .NET) side? Or were it the long (usually nights) of discussing all sorts of topics (way beyond software development) with some moderate alcohol intake?

I’m still not sure why. These things happen. The beauty of friendships.

Of course I knew Gwan was ill. More than a decade ago walking became more difficult because of a progressive muscle disease that would not affect his heart. Over time he got bound to a wheel-chair. Somewhere in-between he got a heart condition too.

Gwan stayed imperturbable and optimistic. He was enjoying watching sports (Gwan was – despite living near Eindhoven – a huge fan of AJAX, Edwin of Feyenoord, I didn’t care about soccer at all: we had so much fun!) current affairs and movies keeping in touch with so many people. Irregularly he even managed to visit both German and soccer matches. It was so good to see how he enjoyed those. He was also a great family guy: organising events was his thing. His siblings, nephews and nieces always had a great time when meeting him. And then there were the yearly summer BBQ events in the party: awesome!

So it was only natural that – after we started cooperating with better office Germany – Gwan would organise the Dutch “Knowledge Days” events and the technical guys (usually Edwin and me from the Dutch side and Daniel Magin from better office Germany) would present the sessions.

When better office Germany got in trouble (long story) Gwan asked if I could financially help him to take a stake so at least the German personnel could be payed. We did, lost financially but earned life long friendships (and learned a thing or two on how banks operate).

One of the things with Gwan was that there never was a dull moment and always an opportunity to learn. Even from mistakes. Of course we had words once every now and then. But never a really big fight. I guess that’s part of a good friendship.

Another thing was the combination of being modest about himself and proud about others. For example he always proudly named one of his sisters” my little sister” as he was so fond of what she accomplished.

I vividly remember spring 2009 when – right after the Delphi Live 2009 conference – some USA friends, Edwin and me organised a surprise 50th birthday dinner party for Gwan. Despite his condition, Gwan was really happy that he made it to the conference. So having a party like that was a total blast.

He attended way more conferences and seminars than I did, especially an Germany. Unlike me, Gwan loved driving long distance. So he attended many Firebird, Delphi-Tage and other events I didn’t make it to. When I was at events, I could always spot Gwan with lots of people around him. usually near a bar (:

Around the time Gwan’s mom died about 3.5 months ago he spent some time in hospital to treat the edema that came with his muscle condition. It took a while, but the medicines worked, he attended the funeral and moved to an apartment with facilities for disabled and direct access to care.

Last week he had was hospitalised and his conditions worsened faster than anyone expected. Friday morning he quietly passed away. No more pain. No more sorrow.

Sadly we are left behind, but also pleased that his ordeal is over.

A dear, generous, modest and positive friend is gone.

Attending the funeral service

If you want to attend the funeral service, please let me know so I can inform the family of an attendance estimate.

The funeral service will be held on Thursday morning July 14 at 11:30 at this location (they begin 11:30 sharp, be early!):

Onze Lieve Vrouw Presentatiekerk AalstEindhovenseweg 63
5582 HP Aalst -Waalre
The Netherlands

Phone: +31 40 221 22 85 (preferably between 10:00 and 12:00)

The above catholic church is easy to find as it is right in the center of Aalst-Waalre (see the church icon on the map). They welcome everyone: non-catholics and atheist are equally welcome.

There are parking spots nearby on the south side of “de Leesakker” (right behind Greek restaurant Olympia) or in the street next to Restaurant Lugar (for both, see the P markings on the map).

To stay: look for Hotels near Aalst-Waalre. I can recommend the Van der Valk Hotel Eindhoven as Gwan and I have organised some workshops and seminars there.

Sending flowers

Gwan in 2010

Gwan in 2010

If you want to send flowers, make sure they arrive Wednesday afternoon July 13 at this funeral service:

Monuta Sol funeral service
attn. family of Swie Gwan Tan
Felix Timmermanslaan 2
5644 RN  Eindhoven
The Netherlands

Phone: +31 40 212 9800

Monday (today) opportunity to condole

Today, Monday July 11 there will be a brief opportunity to condole the family from 16:30 till 17:30 at this funeral service:

Monuta Sol funeral service
Felix Timmermanslaan 2
5644 RN  Eindhoven
The Netherlands

Phone: +31 40 212 9800

Dutch “overlijdensbericht”

Op 8 juli 2016 is onze lieve, gulle, dappere broer en oom overleden.

Swie Gwan Tan

* Eindhoven, 16 mei 1959           ✝ Veldhoven, 8 juli 2016

zoon van

Sing Liong Tan en Polly Tan-The

  • Voorschoten: Swie Tjiang en Ida
  • Waalre: Yu Kai
  • Voorschoten: Li Sha en Jordi
  • Amstelveen: Swie Han en Marion
  • Amsterdam: Li Mai en Derek; Yu Ri en Marre
  • Amsterdam: Ingkie en Loes
  • Parijs: Xiu Lin en Bart; Qi Bo, Qi Mo, Qi San

Correspondentieadres:
Monuta Sol, t.a.v. familie Tan
Felix Timmermanslaan 2, 5644 RN  Eindhoven

De uitvaartdienst wordt gehouden op donderdag 14 juli a.s. om 11:30 uur in de Onze Lieve Vrouw Presentatiekerk, aan de Eindhovenseweg 63 te Waalre.

Later die dag brengen we Gwan in besloten krijg naar het crematorium te Heeze

Indien U geen persoonlijk bericht heeft ontvangen, gelieve deze aankondiging als zodanig te beschouwen.

English translation:

On July 8, 2016, our dear, generous, brave brother and uncle deceased.

Swie Gwan Tan

* Eindhoven, May 16, 1959           ✝ Veldhoven, July 8, 2016

son of

Sing Liong Tan and Polly Tan-The

  • Voorschoten: Swie Tjiang en Ida
  • Waalre: Yu Kai
  • Voorschoten: Li Sha en Jordi
  • Amstelveen: Swie Han en Marion
  • Amsterdam: Li Mai en Derek; Yu Ri en Marre
  • Amsterdam: Ingkie en Loes
  • Parijs: Xiu Lin en Bart; Qi Bo, Qi Mo, Qi San

Mailing address:
Monuta Sol funeral service
attn. Tan family
Felix Timmermanslaan 2
5644 RN  Eindhoven
The Netherlands

The funeral service will be held on Thursday, July 14 a.s. at 11:30 pm in the Onze Lieve Vrouw Presentatiekerk, Eindhovenseweg 63 Waalre.

Later that day we will privately bring over Gwan to the cremation center in Heeze.

–jeroen

Posted in About, Database Development, DB2, Delphi, Development, Firebird, History, InterBase, Personal, Software Development | 5 Comments »

case insensitive files systems and git – Lesson Learned – I Can’t Get My Git Repo Clean! | DrupalEasy

Posted by jpluimers on 2016/07/06

via: Lesson Learned – I Can’t Get My Git Repo Clean! | DrupalEasy

One file kept getting added to the git modified list: service/src/main/MySOAPdefinition.pas.

It was part of a repository that had been migrated from SVN (more on that in a future blog post) and along the way been renamed in directory service/src/main from MySOAPdefinition.pas to MySoapDefinition.pas. SVN (and TortoiseSVN) don’t object to this. But git does.

You’d see this on the command-line:

>git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git checkout -- ..." to discard changes in working directory)

        modified:   service/src/main/MySOAPdefinition.pas

no changes added to commit (use "git add" and/or "git commit -a")

>git add service\src\main\MySoapDefinition.pas

>git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git checkout -- ..." to discard changes in working directory)

        modified:   service/src/main/MySOAPdefinition.pas

no changes added to commit (use "git add" and/or "git commit -a")

Basically the add would do nothing.

On Windows, this is how to get around this:

Read the rest of this entry »

Posted in Delphi, Delphi XE8, Development, git, Mac OS X / OS X / MacOS, OS X 10.9 Mavericks, Power User, Software Development, Source Code Management, SourceTree, Windows, Windows 7 | 1 Comment »

Built-in Delphi XE6, XE7 and XE8 Fast Reports have issue “F2051 Unit fs_iinterpreter was compiled with a different version of fs_isysrtti.TfsSysFunctions”

Posted by jpluimers on 2016/06/30

I’ve seen this compiler error in Delphi XE8 and others in Delphi XE6 and XE7 using a project depending on the built-in FastReports:

F2051 Unit fs_iinterpreter was compiled with a different version of fs_isysrtti.TfsSysFunctions

This will probably fail in more recent versions as well.

The easiest workaround is this:

  • Fast Report XE6 (4.15.10)
  • Fast Report XE7 (Version 5.1.5)
  • Fast Report XE8 (Version 5.2)

The problem could be solved with help of technical support (Paul Gursky).

The solution is to remove all pas files from:

  • LibD20 (XE6)
  • LibD21 (XE7)
  • LibD22 (XE8)
  • LibD22x64 (XE8)

The above is paraphrased from Fast Reports forum > Fatal Error F2051 when compiling under Delphi XE6 and XE7

The core of the problem is that Fast Reports stores .dcu/.hpp/.pas files in the same directory whereas Delphi itself stores the .dcu/.hpp/.o files in one directory (actually usually in debug and release directories for each supported platform like win32, win64, etc).

Note: the built-in Fast Reports limits a few features, for instance export to Excel is not supported.

–jeroen

Posted in Delphi, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »

Embarcadero closing down their Spanish office

Posted by jpluimers on 2016/06/24

Embarcadero closes down their spanish R&D office putting some 80 people on the street and diminishing the total Delphi R&D team.

Former Chief Scientist Allen Bauer commented:

The Spain office had taken on most of the IDE, Delphi RTL, GetIT, Installer, some DB, Bluetooth components, IoT, QA, and other miscellaneous tasks. They were by-far the largest single group working on RAD Studio. They were all a wonderful, dedicated, excited group of folks. They were eager to learn and truly enjoyed their jobs. I am deeply saddened by this development.

Source: [WayBackVery bad news!

Related: [WayBackEmbarcadero Discussion Forums: Bad news for Delphi? …

–jeroen

Posted in Delphi, Delphi 10.1 Berlin (BigBen), Development, Software Development | 31 Comments »