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 sorcery: Generics, modules and typeinfo

Posted by jpluimers on 2017/02/23

the release of 1.2 is almost there! We are working hard to deliver it shortly after the next Delphi release which will happen … soonish, I think. ;)

The release/1.2 branch has been around for a while – please take a look if you haven’t already. It contains a lot of new features and bugfixes. I will tell you more about some of the amazing features next time which won’t take as long as it took since the last blog post – promise. :)

Apart from a very interesting take on DI resolvers, the above great info too!

Please take a look at spring4d/branch/release/1.2 as it has been very stable for quite some time.

Source: [WayBack]: Delphi sorcery: Generics, modules and typeinfo

–jeroen

via: [WayBack] Finally some blog article again ;) – Stefan Glienke – Google+

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »

Delphi, resource files and includes – some links

Posted by jpluimers on 2017/02/23

Some links that were useful getting back into using Delphi with resource scripts and include files:

Maybe I should have considered this alternative:

–jeroen

PS: a first go on a resource file structure for Version Information is below.

Read the rest of this entry »

Posted in Delphi, Development, QC, Resource Files and Scripts (.res/.rc), Software Development | Leave a Comment »

Delphi and stuff: The strange limitation of 64 threads

Posted by jpluimers on 2017/02/21

… there’s no need to use WaitForMultipleObjects in Step 2. It’s fairly easy to keep a counter of active threads in the pool (interlocked-incremented when a thread starts, interlocked-decremented when a thread is finished). When the counter reaches zero (no more active threads), signal an event. With only one event to wait for, you can use WaitForSingleObject

So no more 64-thread (MAXIMUM_WAIT_OBJECTS) limits for pools…

Source: Delphi and stuff: The strange limitation of 64 threads

–jeroen

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

New version of TestInsight (1.1.4) – just a couple of bug fixes…

Posted by jpluimers on 2017/02/21

“Just a couple of bugfixes”, but one is very important to me: [WayBackdouble clicking on a test-result now doesn’t freeze the IDE and brings you to the right source code line.

[WayBack] I just released a new version of TestInsight (1.1.4) – just a couple of bug fixes and small enhancements.You find the download link on the TestInsight… – Stefan Glienke – Google+

Download: [WayBackhttp://files.dsharp.org/TestInsight/1.1.4.0/TestInsightSetup.zip

More info: [WayBacksglienke / TestInsight — Bitbucket

Fixes bugs: [WayBacksglienke / TestInsight / issues – Resolved — Bitbucket

–jeroen

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

Looking for a run-time fix for CreateInOutError raising an EInOutError with the wrong string.

Posted by jpluimers on 2017/02/21

Does anyone have a run-time fix for CreateInOutError raising an EInOutError with Code=3 (correct) and Message=’Invalid file name – %s’ (incorrect becaus… – Jeroen Wiert Pluimers – Google+

[WayBackDoes anyone have a run-time fix for CreateInOutError raising an EInOutError w…:

Does anyone have a run-time fix for CreateInOutError raising an EInOutError with Code=3 (correct) and Message='Invalid file name - %s' (incorrect because System.SysUtils should have used System.SysConst not System.RTLConst and System.RTLConst wrongly duplicates some resource strings in System.SysConst) See [WayBack] http://qc.embarcadero.com/wc/qcmain.aspx?d=129530.
It would be so cool if a fix fills in the %s with the invalid file name.

–jeroen

Later: this seems to be reported in [RSP-20588] Exception message created for missing file has %s – Embarcadero Technologies

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »

Now that Delphi will reintroduce Linux as a target: what features / support do you expect in the compiler and libraries?

Posted by jpluimers on 2017/02/17

Almost 2 decades after the first Delphi Linux support in [WayBackBorland Kylix by an full tool-chain (IDE, compiler, debugger, libraries) running on Linux, Embarcadero/Idera is about to support Linux again in a cross-compiler fashion that was originally scheduled for late 2016 as Delphi Godzilla [WayBackEmbarcadero RAD Studio 2016 Product Approach and Roadmap – Embarcadero Community and [WayBackLinux support for Delphi to be available end of 2016 – Synopse.

It seems to be finally getting here as Delphi 10.2 Tokyo when you look at the [Archive.is] Delphi Linux Boot Camp promotion for instance at [WayBackDelphi Linux Boot Camp – Community Blogs – Embarcadero Community.

I’m curious at what people expect from it.

So please comment your expectations, for instance:

  • what Linux distribution targets
  • what processor architectures
  • what language support (ARC, classic, 1-based strings, etc)
  • what library support
  • what IDE support (like debugger features)
  • what speeds

If you want to get a head start, then read these:

–jeroen

PS: Please forgive any language/grammar mistakes as I’m a bit bored and very tired after waiting some six ours in the ER room [WayBack] Mentally retarded brother had a bicycle incident. Broke one of is cheekbones, his nose and parts of both orbits. At the ER of LUMC waiting for further r… – Jeroen Wiert Pluimers – Google+

Read the rest of this entry »

Posted in Delphi, Development, Kylix, Software Development | 3 Comments »

HashLib4Pascal is a Delphi/FPC compatible library that provides an easy to use interface for computing hashes and checksums of strings (with a specified encoding), files, streams, byte arrays and untyped data to mention but a few.

Posted by jpluimers on 2017/02/15

One day I will need lots of hashing in Delphi: Xor-el/HashLib4Pascal: HashLib4Pascal is a Delphi/FPC compatible library that provides an easy to use interface for computing hashes and checksums of strings (with a specified encoding), files, streams, byte arrays and untyped data to mention but a few. [WayBack]

via: Hello all,I made a port of “HashLib” (http://hashlib.codeplex.com/) “with some fixes, additions and modifications” for Delphi (2010 ( I hope ) and above)… – Ugochukwu Mmaduekwe – Google+ [WayBack]

It’s a port of the C# HashLib – Home [WayBack]

Another fork is at https://github.com/bonesoul/HashLib

–jeroen

Posted in .NET, C#, Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Encoding, FreePascal, Pascal, Software Development | Leave a Comment »

MahdiSafsafi/delphi-detours-library: Delphi Detours Library

Posted by jpluimers on 2017/02/14

I didn’t know about the MahdiSafsafi/delphi-detours-library: Delphi Detours Library [WayBack] until this question turned up:

Does anybody have a version of Delphi Detours (https://github.com/MahdiSafsafi/delphi-detours-library) that works with Delphi 2007?  – Primož Gabrijelčič – Google+ [WayBack]

No need for it yet, but it will be useful one day.

–jeroen

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

Date format converter from Text or Unix/Mac/Filetime/Microsoft to virtually any readable form

Posted by jpluimers on 2017/02/09

Brilliant Date format converter from dates in Text (almost any format) or timestamp numbers in Unix, Mac, Filetime or Microsoft (which is the same as Delphi TDateTime) format to any of these formats:

Text Date:
Date in human-readable text
Wednesday, March 23, 2016 4:05:39pm
RFC 822:
RFC 822 formatted date
Wed, 23 Mar 2016 16:05:39 +0000
ISO 8601:
ISO 8601 formatted date
2016-03-23T16:05:39+00:00
UNIX Timestamp:
seconds since Jan 1 1970
1458749139
Mac Timestamp:
seconds since Jan 1 1904
3541593939
Microsoft Timestamp:
days since Dec 31 1899
42452.670590278
FILETIME:
100-nanoseconds since Jan 1 1601
131032227390000000
01D1851D:D7B58B80

Source: Date format converter

–jeroen

Posted in *nix, .NET, Apple, Delphi, Development, Mac, Mac OS X / OS X / MacOS, Power User, Software Development | 1 Comment »

Delphi multithreading – AcquireExceptionObject/ReleaseExceptionObject to pass exception from one thread to another thread – via G+ and Stack Overflow

Posted by jpluimers on 2017/02/07

A long time ago, Thomas Mueller (dummzeuch) – Google+ reminded [WayBack] me of this which I required a short while ago:

You can use AcquireExceptionObject():

AcquireExceptionObject returns a pointer to the current exception object and prevents the exception object from being deallocated when the current exception handler exits.

Then you can send the pointer to another thread and if you raise it there it will be freed for you, otherwise you must call ReleaseExceptionObject() to free it.

After the answer by Remy Lebeau [WayBack] and Remko [WayBack] is a comment [WayBack] by mghie [WayBack] that mentions AsyncCalls.pas that now is available on GitHub [WayBack].

If you have a very old (version <= 5) Delphi or just want to look at how AcquireExceptionObject [WayBack] looks like just look at a similar implementation there [WayBack]. Note that instead of the ReleaseExceptionObject [WayBack] call, AsyncCalls re-raises the exception [WayBack].

–jeroen

 

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 2007, Delphi 2009, Delphi 2010, Delphi 5, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »