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 2,111 other followers

Archive for the ‘Windows Development’ Category

The alphabet, in alphabetical order, in various languages – The Old New Thing

Posted by jpluimers on 2020/10/09

I had to lough so loud when I bumped into this [WayBackThe 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 »

Delphi XE6 .. 10.1 Berlin truncating non-VCL-control texts to 256 characters when styled

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 »

Not to self: ERROR_ALREADY_EXIST (183) can also mean your named Mutex already exists

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 [WayBackGetLastError returned ERROR_ALREADY_EXIST which according to [WayBackSystem 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 [WayBackFormatMessage returns. And it put me on the wrong foot as it wasn’t a file, but a mutex that was created: indeed [WayBackCreateMutex 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 »

GitHub – blackrosezy/gui-inspect-tool: Gui Inspect tool for Windows

Posted by jpluimers on 2020/08/11

Old but useful: [WayBackGitHub – 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 »

UAC elevation steps

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

  1. Logon:
  2. Elevation steps: decision tree in the various pieces:
  3. Elevation confirmation via consent.exe
  4. Consent example prompt:

 

–jeroen

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

 
%d bloggers like this: