Archive for the ‘Windows Development’ Category
Posted by jpluimers on 2020/10/21
One of the dreaded things when logging on using RDP is that if another user is logged on, you have to first indicate you want to indeed logon (if you don’t, the RDP connection will close after some 15-30 seconds), then wait for their approval time-out before you can logon.
As of writing there is no way around this.
Some links that helped me conclude this:
–jeroen
Posted in Development, Power User, Software Development, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Development | Leave a Comment »
Posted by jpluimers on 2020/10/09
I had to lough so loud when I bumped into this [WayBack] The alphabet, in alphabetical order, in various languages – The Old New Thing.
I got there because I wanted a few examples of languages having more than 26 ASCII letters in their alphabet.
Basically all non English languages (:
–jeroen
Posted in Development, Fun, LifeHacker, Power User, Software Development, The Old New Thing, Windows Development | Leave a Comment »
Posted by jpluimers on 2020/09/23
As of Delphi XE6, the VCL also styles non-VCL controls, but this truncates the texts to 256 characters, for instance in non-balloon hints. This is fixed in Delphi 10.2 Berlin, by making the buffer dynamic and switching obtaining those texts from using GetWindowText to sending a WM_GETTEXT message.
A fix for Delphi XE6..10.1 Berlin is at gitlab.com/wiert.me/public/delphi/DelphiVclStylesAndHintText, with many thanks to Stefan Glienke who based the patch on the ones used in Spring4D. I think they are similar to the ones in [Archive.is] VCL Fix Pack 1.4 | Andy’s Blog and Tools.
The Old New Thing explains the difference between GetWindowText and WM_GETTEXT in [WayBack] The secret life of GetWindowText – The Old New Thing. TL;DR:
GetWindowText strikes a compromise.
- If you are trying to GetWindowText() from a window in your own process, then GetWindowText() will send the WM_GETTEXT message.
- If you are trying to GetWindowText() from a window in another process, then GetWindowText() will use the string from the “special place” and not send a message.
So for your own process, it does not matter as GetWindowText uses WM_GETTEXT.
–jeroen
Related:
Read the rest of this entry »
Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development, The Old New Thing, Windows Development | Leave a Comment »
Posted by jpluimers on 2020/09/16
A while ago, I had an error like this when debugging plugins:
Project bds.exe raised exception class EOSError with message ‘System Error. Code: 183.
Cannot create a file when that file already exists’.
It got was raised when [WayBack] GetLastError returned ERROR_ALREADY_EXIST which according to [WayBack] System Error Codes (0-499) (Windows) has this description:
ERROR_ALREADY_EXISTS
- 183 (0xB7)
- Cannot create a file when that file already exists.
The last line is the same description that [WayBack] FormatMessage returns. And it put me on the wrong foot as it wasn’t a file, but a mutex that was created: indeed [WayBack] CreateMutex documents it:
If the mutex is a named mutex and the object existed before this function call, the return value is a handle to the existing object, GetLastError returns ERROR_ALREADY_EXISTS, bInitialOwner is ignored, and the calling thread is not granted ownership. However, if the caller has limited access rights, the function will fail with ERROR_ACCESS_DENIED and the caller should use the OpenMutex function.
In the mean time, the plugin doesn’t raise that as an exception any more.
–jeroen
Posted in Development, Software Development, Windows Development | Leave a Comment »
Posted by jpluimers on 2020/08/11
Old but useful: [WayBack] GitHub – blackrosezy/gui-inspect-tool: Gui Inspect tool for Windows, a collection of Windows UI inspection tools:
- AccEvent.exe
- AccExplorer32.exe
- Inspect.exe
- SPYXX.EXE
- swapy-ob-0.4.3.exe
- UISpy.exe
- ViewWizard.exe
- WSEdit.EXE
- swapy-ob-0.4.3.exe
–jeroen
Posted in Development, Software Development, Windows Development | Leave a Comment »
Posted by jpluimers on 2020/07/29
Just in case I need to explain this to someone, as it has been a long time ago I did this: [WayBack] windows – Is there a single UAC binary? – Super User.
Via: [WayBack] Jeroen Wiert Pluimers: Is there a UAC binary? – Google+
Most important reference: [WayBack] How User Account Control Works | Microsoft Docs
- Logon:

- Elevation steps: decision tree in the various pieces:

- Elevation confirmation via
consent.exe
- Consent example prompt:

–jeroen
Posted in Development, Power User, Security, Software Development, Windows, Windows Development | Leave a Comment »
Posted by jpluimers on 2020/05/05
Interesting insights from [WayBack] Andreas Twitter: “I was joking about #Delphi’s splash screen to be shown later so Embt can claim that it finishes much faster now. Today my Internet was down and guess what I had to “witness”. Seattle: 22 sec splash screen time Tokyo: 2 sec splash screen time Sounds fantastic, but…… https://t.co/FGtnJQZDyc”:
- in earlier versions part of the copy protection (WinVerifyTrust calls) were done after the splash screen was visible and now they are done before.
- That the WinVerifyTrust call took so long was because Windows (not Delphi) wanted to check for revoked certificates in the first WinVerifyTrust call (due to the missing only-cache flag) and my router seems to not like it if the modem doesn’t have a connection/link to the provider
- consider using FILE_FLAG_DELETE_ON_CLOSE so that if the IDE is killed during its start (debug session when you see that you forgot something and want to abort) doesn’t wait ~3 minutes or more until the lock is lifted
More relevant links based on the above:
Via [WayBack] Anyone else saw the video on this Andreas Hausladen post? – Cesar Romero – Google+ where I found this observation interesting:
My vm installs have zero net on by default, host only lan, lan only, and internet provided on demand. I’m noticing a lot of differences in the splash screens of 10.2.2.2.2, often lacking registration confirm info (making me nervous).
–jeroen
Read the rest of this entry »
Posted in Development, Software Development, The Old New Thing, Windows Development | Leave a Comment »
Posted by jpluimers on 2020/04/09
On my research list is [WayBack] GitHub – DareDevil73/bug-finder: Windows passive debugger. with an article at [WayBack] Bug Finder, A Real Win32 Extensible Passive Debugger – CodeProject:
The Bug Finder is a real Win32 debugger, entirely written in Borland Delphi, which analyzes your application execution flow, so you can:
- Catch exceptions on the main executable, external DLLs, primary and working threads.
- Produce a detailed stack trace about each exception.
- Place a symbolic breakpoint to get, in place of a program debug break, a full stack trace log message (dynamic tracing).
- Produce detailed and rotative log files for a batch application behaviour inspection.
- Capture output of
OutputDebugString API to log file (to provide extra debugging information by yourself directly into your code).
- Trace Process, Threads and DLLs activities.

I found documentation at [WayBack] DareDevil73 … docs, but the binary dependencies and installer are on SourceForge (where the project was originally located) and CodeProject which cannot be archived so I will look into that when it pops to the top of my research list.
–jeroen
via: [WayBack] Bug Finder by Antonio Petricca (in 2013?) Have any of you tried it? – Lars Fosdal – Google+
Posted in Delphi, Development, Software Development, Windows Development | Leave a Comment »
Posted by jpluimers on 2020/03/24
Designing for a good user experience is hard, especially to programmers. So if you are a programmer, please read, let them sink in, rinse, repeat the below linked articles multiple times. Being ~15 years old, they are still so very relevant:
–jeroen
Posted in Development, Software Development, The Old New Thing, Usability, User Experience (ux), Windows Development | Leave a Comment »