Windows (10) doesn’t allow the same resource twice

Written by  on February 4, 2021

So, the NAS* I use for years is separated into different partitions. Some for general access and things and one for music, which has a special user, which owns just read-only privileges.

Linux: no problem: mount as many shares with Gigolo and you are done.

Windows: use that 90s-style network-mount of the ‘explorer’ and add share by resource and credentials.
“\\ds213\musik” .. Works, but is awkward and not comfortable.
then you want to mount the second share with different credentials and you get “Can’t mount the same share** with different credentials”.

mount once by resource-name and once by ip: “\\\musik”

Another approach via the hosts-file.

* DS213 from Synology: 2 bay; now running 24/7 for 5 (?) years; upgraded inbetween from 2 TByte drives to 4 TB with complete replication
** is actually “different shares at the same host”, but who am I with my limited knowledge?

Dell Precision 3351: performance spikes on GPU0 for dwm.exe/csrss.exe (win10)

Written by  on October 15, 2020

Starting point: so, I have a brand-new laptop with a fresh Win10 and the apps lag while I move windows around the desktop. Great!

The first recommendations were already checked: Win is up to date; graphics driver for the integrated Intel GPU and for the Nvidia one as well. No, I won’t roll back the system and no, a “clean start” won’t fix this either.
Of course, I was also suspicious if the virusscanner or the dockingstation-three-monitor-setup is the issue. But come one: that are just 6 mio pixel and the hardware is top notch.

0. open the “Dell Power Manager” and set the “Temperaturverwaltung” to “Optimiert” (before “Ruhig”)
1. configure via the Nvidia that their GPU shall be the preferred one for apps: “Grundprofil” = “Hochleistungs-GPU”; check as well if any app has preset the integrated GPU (change this!)
2. disable automatic scaling of applications: System > Display. Under the scaling drop-down, select the Advanced scaling settings link. Disable “fix blurry ..”
3. change the display settings to Performance: run “sysdm.cpl” and then “Advanced (Erweitert)” > “Performance (Leistung)” and then put everything to performance (radio button) and just enable “smooth font rendering”
4. change the graphic settings to “High Performance” for all “classic” and “universal” apps:
Problem is, that the dwm.exe and the csrss.exe use GPU0 no matter what you configure.

The idea to disable the integrated Intel GPU via UEFI/BIOS is not possible, because the Nvidia GPU is not a full replacement card, but relies on the iGPU ..

Windows: time measurement

Written by  on August 7, 2020

StackOverflow has a ton of solutions with PowerShell and other external tools, but _I_ could no install something additional on that system. Nor had PS.

Works around the issue that the time is evaluated at start for each item, as well:
λ cmd /v:on /c "echo !time! & YOURCOMMAND & echo !time!"

Hint: also run cmake with just one core
λ cmd /v:on /c "echo !time! & cmake --build build\CMake\Debug\build -j1 --target all & echo !time!"

tutorial: include-what-you-use for a cmake/mingw-build on win

Written by  on August 5, 2020

0. Get the latest prebuilt version for Win: version 0.8 (3 years old :/)
1. Put this somewhere into you CMakeLists.txt
set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "C:\\include-what-you-use\\bin\\include-what-you-use.exe")
2. Enjoy the overflowing build-output for your legacy-project.

Read more…

Win 10: uptime with Powershell

Written by  on March 18, 2020

(I don’t care about output from the taskmanager or whatever logs. I need a processable duration without much tinkering.)


Written by  on January 24, 2020

The Qt framework offers a quite nice and convenient way to localize your application.
Not only how to mark inside the code translateable strings (tr(..)), but also that the translation-mappings are human-readable xml-format files (*.ts), but also their own tool to do the translation (Linguist). Linguist is quite helpful for translator who sometimes also have to have a look at the “what would you get with that translation of different size inside the widget”-result (more or less: WYSIWYG).

Noticed today some flaws in the localisation of MTuner (nice memory profiler) and offered some help.
This is what I love about OSS: you don’t just take, but can also lend a helping hand and improve the quality 🙂

QtCreator: add online-help if the SDK is not coming from an official package

Written by  on January 1, 2020


having some Qt-SDK without help files. Using help inside a browser is possible, but cumbersome. and local help would be nice for quick parameter-checks.

solution (edited):

Found also the official docu at: as 7z-archive.

Then add it via QtCreator > Tools > Options > Help > Documentation > “add the QCH files”.

Three ways to find the location of a certain DLL at Windows

Written by  on November 11, 2019

Common problem: just using the current working directory is not sufficient, because especially for unit-tests started from the Visual Studio-testrunner the opriginal, relative path is not fitting anymore. Fallback would be check an environment variable , which is set during installation or using the WinAPI (ugh).

versioned code can be found at: github/cppcCollection

Visual Studio 2015: error LINK1158 rc.exe not found

Written by  on October 22, 2019

Challenge: Visual Studio 2015, Windows Kit 8 and 10 installed, test application (as solution) for a SDK not buildable
copy rc.exe and rcdll.dll from
C:\Program Files (x86)\Windows Kits\8.1\bin\x64
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin

Visual Studio testrunner still running … and stopping you from accessing DLLs for linking

Written by  on October 8, 2019

Problem Challenge:
Several instances of vstest.executionengine.clr20.exe are still running, despite closing that nice Visual Studio 2015 and therefore the access to compile and link several DLLs with QtCreator is blocked.
Closing them one by one with the taskmanager is annoying.

* CMD as admin
* $ taskkill /IM vstest.executionengine.clr20.exe /T /F
* or: $ wmic process where name=’vstest.executionengine.clr20.exe’ delete