The Wiert Corner – irregular stream of stuff

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

  • Home
  • Wiert.me
  • About the Wiert Corner
  • Privacy Policy
  • Conferences, seminars and other public appearances
  • Posting categories
  • Archives
  • Toolbox
  • Contact form
  • License
  • Subscribe

    • Entries (RSS)
    • Comments (RSS)
  • March 2023
    M T W T F S S
     12345
    6789101112
    13141516171819
    20212223242526
    2728293031  
    « Feb    
  • Archives

    • March 2023 (25)
    • February 2023 (27)
    • January 2023 (24)
    • December 2022 (33)
    • November 2022 (26)
    • October 2022 (23)
    • September 2022 (25)
    • August 2022 (24)
    • July 2022 (26)
    • June 2022 (26)
    • May 2022 (23)
    • April 2022 (32)
    • March 2022 (69)
    • February 2022 (63)
    • January 2022 (66)
    • December 2021 (75)
    • November 2021 (66)
    • October 2021 (64)
    • September 2021 (67)
    • August 2021 (69)
    • July 2021 (69)
    • June 2021 (69)
    • May 2021 (68)
    • April 2021 (67)
    • March 2021 (72)
    • February 2021 (63)
    • January 2021 (65)
    • December 2020 (70)
    • November 2020 (64)
    • October 2020 (68)
    • September 2020 (67)
    • August 2020 (67)
    • July 2020 (71)
    • June 2020 (68)
    • May 2020 (64)
    • April 2020 (67)
    • March 2020 (70)
    • February 2020 (61)
    • January 2020 (74)
    • December 2019 (70)
    • November 2019 (63)
    • October 2019 (73)
    • September 2019 (68)
    • August 2019 (66)
    • July 2019 (68)
    • June 2019 (68)
    • May 2019 (72)
    • April 2019 (73)
    • March 2019 (64)
    • February 2019 (68)
    • January 2019 (78)
    • December 2018 (87)
    • November 2018 (77)
    • October 2018 (79)
    • September 2018 (77)
    • August 2018 (76)
    • July 2018 (74)
    • June 2018 (63)
    • May 2018 (70)
    • April 2018 (63)
    • March 2018 (72)
    • February 2018 (48)
    • January 2018 (83)
    • December 2017 (67)
    • November 2017 (62)
    • October 2017 (63)
    • September 2017 (52)
    • August 2017 (62)
    • July 2017 (48)
    • June 2017 (57)
    • May 2017 (68)
    • April 2017 (55)
    • March 2017 (59)
    • February 2017 (58)
    • January 2017 (60)
    • December 2016 (59)
    • November 2016 (74)
    • October 2016 (61)
    • September 2016 (87)
    • August 2016 (57)
    • July 2016 (51)
    • June 2016 (49)
    • May 2016 (48)
    • April 2016 (51)
    • March 2016 (49)
    • February 2016 (50)
    • January 2016 (48)
    • December 2015 (59)
    • November 2015 (57)
    • October 2015 (37)
    • September 2015 (31)
    • August 2015 (41)
    • July 2015 (31)
    • June 2015 (37)
    • May 2015 (30)
    • April 2015 (32)
    • March 2015 (37)
    • February 2015 (52)
    • January 2015 (50)
    • December 2014 (43)
    • November 2014 (39)
    • October 2014 (40)
    • September 2014 (41)
    • August 2014 (58)
    • July 2014 (32)
    • June 2014 (23)
    • May 2014 (38)
    • April 2014 (105)
    • March 2014 (145)
    • February 2014 (81)
    • January 2014 (56)
    • December 2013 (58)
    • November 2013 (32)
    • October 2013 (26)
    • September 2013 (26)
    • August 2013 (54)
    • July 2013 (47)
    • June 2013 (41)
    • May 2013 (33)
    • April 2013 (41)
    • March 2013 (50)
    • February 2013 (47)
    • January 2013 (55)
    • December 2012 (32)
    • November 2012 (23)
    • October 2012 (37)
    • September 2012 (52)
    • August 2012 (46)
    • July 2012 (40)
    • June 2012 (30)
    • May 2012 (27)
    • April 2012 (30)
    • March 2012 (29)
    • February 2012 (32)
    • January 2012 (25)
    • December 2011 (38)
    • November 2011 (28)
    • October 2011 (46)
    • September 2011 (63)
    • August 2011 (35)
    • July 2011 (24)
    • June 2011 (24)
    • May 2011 (24)
    • April 2011 (29)
    • March 2011 (50)
    • February 2011 (48)
    • January 2011 (18)
    • December 2010 (5)
    • November 2010 (18)
    • October 2010 (22)
    • September 2010 (29)
    • August 2010 (24)
    • July 2010 (27)
    • June 2010 (29)
    • May 2010 (25)
    • April 2010 (23)
    • March 2010 (10)
    • February 2010 (6)
    • January 2010 (16)
    • December 2009 (12)
    • November 2009 (3)
    • October 2009 (11)
    • September 2009 (21)
    • August 2009 (11)
    • July 2009 (11)
    • June 2009 (5)
    • May 2009 (12)
    • April 2009 (20)
    • November 22 (1)
  • *nix *nix-tools .NET About Apple C# Conferences Conference Topics Delphi Delphi XE2 Delphi XE3 Development Event Google History Internet LifeHacker Linux Mac OS X / OS X / MacOS Personal Power User Scripting Security SocialMedia Software Development Source Code Management VMware Windows Windows 7 Windows 8
  • Recent Comments

    Mike Verhagen on geerlingguy/my-backup-plan: Ho…
    Attila Kovacs on docs.embarcadero.com unreachab…
    David Blue on MacOS: converting a man page t…
    jpluimers on How do I pretty-print JSON in…
    jpluimers on Delphi 10.2 Tokyo Godzilla ISO…
  • Recent Posts

    • ThreadReaderApp alternatives?
    • Some notes on converting Twitter threads/tweets to Markdown
    • Installing Windows OpenSSH from the command-line on Windows 10 and 11
    • Attackers Tier List | Pokemon GO Wiki – GamePress
    • Redacteur Jeroen Wester hielp zijn oude, alleenstaande oom in zijn zoektocht naar zorg, en verdwaalde – NRC
  • Blog Stats

    • 3,337,266 hits
  • Meta title

    • Register
    • Log in
    • Entries feed
    • Comments feed
    • WordPress.com
  • Tag Cloud Title

    .NET Framework android Apple april 1st arts aviation batch file bitbucket blogging command-line computer Conferences c runtime library Delphi delphi 1 delphi 5 denial of service attack design DevDays09 documentation dos vulnerability education embarcadero flickr gadgets geeks gmail google google maps google search hash collision internet iOS iphone iphone 5 jeroen landmarks mac os x marc hoffman Media microsoft patches microsoft security bulletin microsoft surface mobile nick hodges nintendo nes path names pdf photography power button quest mode research rsync science scott hanselman severity rating software sourcecode language sourceforge ssd stack overflow technology transportation Travel twitter vcl vm VMware VMware Fusion VMware Workstation wget speedfan windows phone Windows XP wordpress xkcd
  • Top Clicks

    • stackoverflow.com/questio…
    • cdn.shopify.com/s/files/1…
    • web.archive.org/web/20191…
    • amazon.com/dp/B00JKFTYA8
    • github.com/winnfsd/winnfs…
    • blog.ligos.net/2016-12-27…
    • microsoft.com/en-us/softw…
    • web.archive.org/web/20180…
    • home-assistant.io/integra…
  • Top Posts

    • C13/C14 wiring diagram live/neutral/earth
    • The only practical way of running x86 VMs on Apple M1 seems to be QEMU based UTM
    • Calls from +18553308653 might be because someone is trying to use your phone number to setup a Microsoft account two factor authentication
    • Windows 10 22H2 ISO download hashes
    • Delphi multi-threading: confused by TThread.Synchronize / TThread.Queue? You're not alone. And you need to be aware of exceptions there too.
    • MacOS: killing Chrome from the terminal
    • LIDL Radio Controlled Wall Clock IAN 100489 English manual
    • OpenSSL on Windows: fixing the "unable to write 'random state'" (via: Stack Overflow)
    • Zypper or YaST locked: System management is locked by the application with pid ##### (/usr/lib/YaST2/bin/y2base).
    • Windows Users like "Window Manager\DWM-3" are virtual users
  • My badges

    Mastodon
  • Twitter Updates

    • @BSDGURU @NS_online @ProRail @MachinistStefan Pas op dat je niet ontspoort 2 hours ago
    • Steeds meer mensen lopen een Blauwtje nos.nl/l/2469510 2 hours ago
    • RT @peterhuppertz: Laat alles vallen en ga naar edition.cnn.com/politics/live-… Dit is wereldnieuws. Delen mag! 2 hours ago
    • @OldTechAdverts Dell Unix had drivers for it: tech-insider.org/unix/research/… 2 hours ago
    • @OldTechAdverts Not sure this is about the same SmartVu: patents.google.com/patent/US53882… 2 hours ago
  • My Flickr Stream

    20140508-Delphi-2007--Project-Options--Cannot-Edit-Application-Title-HelpFile-Icon-Theming20140430-Fiddler-Filter-Actions-Button-Run-Filterset-now20140424-VMware-Fusion-6.0.3.-no-reclaimable
    More Photos
  • Pages

    • About the Wiert Corner
      • bio
      • Music I like
    • Archives
    • Conferences, seminars and other public appearances
    • Contact form
    • License
    • Posting categories
    • Privacy Policy
    • Toolbox
      • DNS
      • Links
      • spring4d
      • Status
    • Wiert.me
  • All categories

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

    Join 4,183 other subscribers

Archive for the ‘Delphi 5’ Category

« Previous Entries

Howto create C-Header for Delphi/Free Pascal/Lazarus DLL – data types – Stack Overflow

Posted by jpluimers on 2021/09/23

From a long time ago, but got a request for it a while ago is [WayBack/Archive.is] Howto create C-Header for Delphi/Free Pascal/Lazarus DLL – data types – Stack Overflow:

I have used the below construct to generate header files compatible with the C-mode compiler of Visual C++ 6 from Delphi 5 code when Delphi had the -JPH switch (see notes below).
Note that I have not used this since Delphi 5, but the switch has since then been expanded:
Somewhere along the line, the [WayBack] JPHNE switch has been added to the dcc32 command-line compiler:
  -JPHNE = Generate C++ .obj file, .hpp file, in namespace, export all
Rudy Velthuis has a [WayBack] nice article using the JPHNE switch.
It certainly does not handle all types, and you will need quite a bit of [Archive.is] HPPEMIT and [Archive.is] EXTERNALSYM directives.
I uploaded my [Archive.is] Delphi 5 to Visual C++ 6 HPP conversion from back then to BitBucket.
It generates the .hpp files to import the DLL that was written in Delphi.
Notes from the Delphi 5 era:
{ Visual C++ 6 does not like nested structs/unions the way that BC++ can handle them.
  Visual C++ 6 requires the "typedef" to be present AND the typename AFTER the struct definition.
  You will see this when defining TConversationId, TReturnKey and other types that depend on nested structs/unions

  The trick is to perform these steps each and every time this unit changes:
    - Generate this unit once with all the EXTERNALSYM disabled.
      - Then the DCC32 -JPH will generate the basic structs for them.
    - Copy all the nested struct and union definitions to this file
    - Embed the definitions with (*$HPPEMIT '' *)
    - Append the typename at the end of the struct definition
    - Enable all the EXTERNALSYM again
    - Regenerate the HPP files by using DCC32 -JPH
  To make this process easier, we have introduced two new conditional defines:
    - BCB - disable EXTERNALSYM, disable HPPEMIT
    - VC6 - enable EXTERNALSYM, enable HPPEMIT

  A similar thing is with these constructions that VC6 does not like those either:
    - short strings (BCB defines them as "SmallString<##>" which VC6 does not like).
    - short integers (BCB defines them as "Shortint" so we have included an HPPEMIT for that)
}

{$ifdef win32}
  { important! Makes sure that the all enumerated types fit in exactly one byte each! }
  {$Z1}

  { force the C/C++ HPP header files to have the C/C++ compiler pack structure elements on byte boundaries }
  {$ifdef BCB}
    {$HPPEMIT '#pragma option push -a1' }
  {$endif BCB}
{$endif win32}

And the download (hopefully I have converted it to git by then):

The link to the converter is now [Archive.is] bitbucket.org/jeroenp/wiert.me/src/default/Native/… – Delphi Coder

–jeroen

Rate this:

Share this:

  • Tweet
  • Share on Tumblr
  • Email
  • Print

Like this:

Like Loading...

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

SequoiaView Homepage

Posted by jpluimers on 2019/07/01

I thought I had scheduled a blog post about the great tool on [WayBack] SequoiaView Homepage, but didn’t. In the mean time, Paolo Buffa posted an overview with a really nice historic perspective:

Is amazing from how many years I’m using this program, and how many operating systems it managed to go thru almost unscathed, without modification.

Paolo Buffa

Source: [Archive.is] SequoiaView: a piece of history. – Data Center IT – Spiceworks

I still use it, despite it being quite old: 2002 era, written in Delphi 5. It’s beautiful in part because of its anciency, but also because it is so simple and intuitive that I still use it regularly.

The age also shows in the web page (which when writing it was still on-line): The SequiaView home page link above is actually a classic frame inside [WayBack] The SequoiaView Homepage. Back then, it was already starting to be considered obsolete to write HTML using frameset [WayBack] Framing (World Wide Web) – Wikipedia.

The SequoiaView [WayBack] Download Page even points to non-existing ftp-download URLs via counter CGI scripts:

  • Version 1.2 installer: http://www.win.tue.nl/cgi-bin/usr/sequoia/counter2.cgi -> ftp://ftp.win.tue.nl/pub/home/sequoia/SequoiaInstall.exe
  • Version 1.3 installer: http://www.win.tue.nl/cgi-bin/usr/sequoia/counter3.cgi -> ftp://ftp.win.tue.nl/pub/home/sequoia/Sequoia1_3Install.exe
  • Version 1.3 installer for Windows XP: http://www.win.tue.nl/cgi-bin/usr/sequoia/counter3xp.cgi -> ftp://ftp.win.tue.nl/pub/home/sequoia/Sequoia1_3XPInstall.exe
  • Version 1.3 zipped installer: http://www.win.tue.nl/cgi-bin/usr/sequoia/counter3zip.cgi -> ftp://ftp.win.tue.nl/pub/home/sequoia/Sequoia1.3Install.zip

None of them have been archived by the WayBack machine: https://web.archive.org/web//ftp://ftp.win.tue.nl/pub/home/sequoia//

To verify alternative downloads, just check these hashes:

hash command filename hash output
$ md5 Sequoia1.3Install.zip MD5 (Sequoia1.3Install.zip) = 28d356f2bafe258805794257c284a075
$ md5 Sequoia1_3XPInstall.exe MD5 (Sequoia1_3XPInstall.exe) = 142586a5cc7a0139bde8c13e5cc4d301
$ shasum Sequoia1.3Install.zip 762ab30177a7f6a0d4f173fd2442ba7b61df4c2e Sequoia1.3Install.zip
$ shasum Sequoia1_3XPInstall.exe c1db10a0f7d36adbc14b5a7a3f08fc35db1bee8b Sequoia1_3XPInstall.exe

I’ve a copy in my archive that I just use in a portable way: just copy over SequoiaView directory with these files in it:

  • Archives.col
  • DEFAULT.COL
  • Images.col
  • License.txt
  • Movies.col
  • ReleaseNotes.txt
  • Sequoia.cnt
  • Sequoia.exe
  • SEQUOIA.HLP
  • Sound.col

You can download this from gist.github.com/jpluimers/b0df9c2dba49010454ca6df406bc5f3d (ef94f1875377f4054e3a434f8942e1749f0af74a.zip).

A few things that could be fixed (if ever hopefully MagnaView open sources it: [WayBack] @jpluimers More @magnaview did you ever consider to open source the Delphi code for http://www.win.tue.nl/sequoiaview/ or give someone NDA access to fix some bugs?):

  • Access violation when re-scanning a drive
  • Option to show multiple links to the same physical file
  • Indication of more rights  needed to index a file or directory
  • Better explorer integration (via context menu)

Read the rest of this entry »

Rate this:

Share this:

  • Tweet
  • Share on Tumblr
  • Email
  • Print

Like this:

Like Loading...

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

“Don’t access VCL from a background thread” – how to demo that?

Posted by jpluimers on 2018/07/11

When accessing the VCL from multiple threads at the same time: adopted from ...\DEMOS\THREADS\THRDDEMO.DPR

When accessing the VCL from multiple threads at the same time: adopted from …\DEMOS\THREADS\THRDDEMO.DPR

Great question a while ago:

[WayBack] “Don’t access VCL from a background thread” – how to demo that? – Primož Gabrijelčič – Google+

For me, the ultimate way why not to access the VCL from a background thread is the precursor of the official threads demo that ships from Delphi 2 to Delphi XE6 in ...DEMOS\THREADS\THRDDEMO.DPR. where you’d think the thread isolation would be in ...DEMOS\THREADS\ThSort.pas but actually is in ...DEMOS\THREADS\SortThds.pas.

The first public showing of that demo did not include main thread protection. It originates from a session at the the 1995 Borland Developers Conference where Ray Konopka showed the below code from Bob Ainsbury.

That session reminded why this joke [WayBack] Via the EKON20 sessions… – Jeroen Wiert Pluimers – Google+ was so funny:  “When Ray Konopka enters the room you have a Raize condition.“.

The question above also made me find back this reference to BorCon95 in San Diego:

Read the rest of this entry »

Rate this:

Share this:

  • Tweet
  • Share on Tumblr
  • Email
  • Print

Like this:

Like Loading...

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 10.2 Tokyo (Godzilla), Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | 2 Comments »

Delphi: playing Chimes.wav as an external file or embedded WAVE resource in Delphi XE5.

Posted by jpluimers on 2018/01/10

As a by-effect, this article seems to one of the few that shows where Delphi uses the .dres file extension introduced around Delphi XE.

Recently I had to play some notification sounds in a Windows Delphi application where the application deployment should be as easy as possible: preferable copying the EXE around.

Playing a sound file seems easy, especially if it is a [WayBack] WAV file: just use the [WayBack] PlaySound or the (older) [WayBack] sndPlaySound API functions.

But if you start searching on the internet, you see lots of curious implementations for playing WAV resources through sndPlaySound.

The actual implementation is really really easy though, just make sure you follow the steps right and nothing can go wrong.

[WayBack] The full source code is on my BeSharp.net repository, here is how to to it step by step:

The steps depend on the MMSystem unit, so most of the code translates back to [WayBack] Turbo Pascal for Windows (yes, the 16-bit Pascal days when the MMSystem unit was introduced) with the exception of the SND_SENTRY flag.

The thing that more recent Delphi versions made a lot easier is embedding WAV files as WAVE resources, more on that further on. Read the rest of this entry »

Rate this:

Share this:

  • Tweet
  • Share on Tumblr
  • Email
  • Print

Like this:

Like Loading...

Posted in Borland Pascal, Delphi, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Pascal, Software Development, Turbo Pascal | Leave a Comment »

MarcoDelphiBooks on GitHub

Posted by jpluimers on 2017/07/04

Just in case I need any of them: now in chronological order.

MarcoDelphiBooks – http://www.marcocantu.com

  • ObjectPascalHandbook
  • MasteringDelphi3
  • MasteringDelphi4
  • MasteringDelphi5
  • MasteringDelphi6 
  • MasteringDelphi7
  • MasteringDelphi2005
  • Delphi2007Handbook
  • Delphi2009Handbook
  • Delphi2010Handbook
  • DelphiXEHandbook

Source: MarcoDelphiBooks

–jeroen

Rate this:

Share this:

  • Tweet
  • Share on Tumblr
  • Email
  • Print

Like this:

Like Loading...

Posted in Delphi, Delphi 2005, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Development, Software Development | Leave a Comment »

« Previous Entries
 
Blog at WordPress.com.
  • Follow Following
    • The Wiert Corner - irregular stream of stuff
    • Join 656 other followers
    • Already have a WordPress.com account? Log in now.
    • The Wiert Corner - irregular stream of stuff
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
  • Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
    To find out more, including how to control cookies, see here: Cookie Policy
  • %d bloggers like this: