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

Archive for the ‘Delphi’ Category

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 »

How to: Set a Thread Name in Native Code

Posted by jpluimers on 2016/06/15

This is what the Delphi [WayBack] System.Classes.TThread.NameThreadForDebugging (introduced in Delphi 2010) is based on:

//
// Usage: SetThreadName (-1, "MainThread");
//
#include <windows.h>
const DWORD MS_VC_EXCEPTION=0x406D1388;

#pragma pack(push,8)
typedef struct tagTHREADNAME_INFO
{
   DWORD dwType; // Must be 0x1000.
   LPCSTR szName; // Pointer to name (in user addr space).
   DWORD dwThreadID; // Thread ID (-1=caller thread).
   DWORD dwFlags; // Reserved for future use, must be zero.
} THREADNAME_INFO;
#pragma pack(pop)

void SetThreadName( DWORD dwThreadID, char* threadName)
{
   THREADNAME_INFO info;
   info.dwType = 0x1000;
   info.szName = threadName;
   info.dwThreadID = dwThreadID;
   info.dwFlags = 0;

   __try
   {
      RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR*)&info );
   }
   __except(EXCEPTION_EXECUTE_HANDLER)
   {
   }
}

Related:

For Delphi 2009 and 2007: It is implemented in the SetThreadName method of the IdGlobal unit.

–jeroen

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

`Known IDE Packages` in Delphi prompted by a comment +Jeroen Wiert Pluimers made

Posted by jpluimers on 2016/06/08

Known IDE Packages in DelphiPrompted by a comment +Jeroen Wiert Pluimers ‘s Google+ post I had a look at what is actually listed in  [HKEY_CURRENT_USER\Software\Borland|Codegear|Embarcadero\BDS|Delphi\#.0\Known IDE Packages] … – Thomas Mueller (dummzeuch) – Google+

Source: Known IDE Packages in Delphi Prompted by a comment +Jeroen Wiert Pluimers ‘s…

Related:

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

SmartBear AQTime links

Posted by jpluimers on 2016/06/02

Since they’re hard to find on-line, and sometimes I need them when not having access to my collective browser or email history:

Notes:

  1. The AQTimeDemo.exe is the same as the latest AQTime###.exe (functionality depends in license).
  2. The installation from Windows Explorer sometimes fails with the below message. Installation from the command-prompt works, but you need to run it from an Administrator command-prompt:

---------------------------
E:\TEMP\AQtime824.exe
---------------------------
Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item.
---------------------------
OK
---------------------------

To get going for my special case, I watched some sample videos (which I did get to work in Internet Explorer but not in Chrome forty-something):

I needed it to do some profiling comparisons of services running under different configurations.

Read the rest of this entry »

Posted in .NET, Debugging, Delphi, Development, MAP Symbol Information, Profiling-Performance-Measurement, Software Development, TD32/TDS Symbol information, Visual Studio and tools | Leave a Comment »

Delphi XE8 does not adhere the `$(PROJECTNAME)` in a “Unit Output Directory”, but does recognise `$(SanitizedProjectName)`…

Posted by jpluimers on 2016/05/24

The background here was a quick project at a client where many .dproj files were in the same directory, but they suffered from conditional define differences. Which meant that even if they were all using the  DEBUG configuration, some defines in the .dproj directories were different therefore poisoning shared .DCU files (as Delphi does not automatically rebuild them when the sources have not changed even though the IDE switched to a new project).

There was no quick possibility to reorganise the project structure (a combination of a version system history being problematic and potentially lots of relative path references in the .dproj and .dpr files could still be broken) so I wanted different “Unit Output Directories” for each project preferably using non-hardcoded project name.

So I tried putting $(PROJECTNAME) in a “Unit Output Directory”. But unlike build-events – where that one has a value – in the Directory it hadn’t.

To cut things short, Uwe Raabe did some spelunking in the .dproj file and found that $(SanitizedProjectName) was recognised so I switched to .\$(Platform)\$(Config)\$(SanitizedProjectName).

Putting it in the OutputDirectory (where your .EXE gets emited) fails for most part. Yes, the .EXE gets put in the right directory. No, the debugger cannot find it as it thinks it needs to use %SanitizedProjectName%. No for TestInsight: it cannot find the EXE either because of the % expansion.

Based on SanitizedProjectName, I did some more spelunking coming with the below list. Remember though:

Only tested for Win32 applications for Delphi XE8

I assembled the list by doing a quick sed on a Delphi XE8 Win32 .dproj file transforming all XML element names to $() form then running it through a uniq like script. After that I added each of them in a “Unit Output Directory” prepended with .\_\ (well I cheated a bit, I did them in groups separated by a back-slash and went back to single items in case of failures. A kind of ‘binary search’).

Ensure the ones you use, are defined before you use them. For example: the definition of SanitizedProjectName need to be in the .dproj file before actually using SanitizedProjectName.

These expand to empty strings:

Read the rest of this entry »

Posted in Conference Topics, Conferences, Delphi, Delphi XE8, Development, Event, Software Development | 2 Comments »