I'm getting close to the solution but need some help. This page Windows 10 DLL File Information - sysdm.cpl describes the localized string available for the DLL file for the "Environment Variables" control panel applet. I found how to retrieve the various string resources using the code below. But what I need is to retrieve the localized name of the applet that is found in the "Dialog Caption" section #105. How could I retrieve this piece of text? Thanks.
Code: Select all
#requires AutoHotkey v1.1
#SingleInstance,Force
#NoEnv
MsgBox, % TranslateMUI("shell32.dll", 31236) ; example provided with the function WORKING
; https://windows10dll.nirsoft.net/sysdm_cpl.html
MsgBox, % TranslateMUI("sysdm.cpl", 3) ; String Text WORKING
MsgBox, % TranslateMUI("sysdm.cpl", 105) ; Dialog Caption NOT WORKING
;Gets a localized string from a resource file.
; https://github.com/7plus/7plus/blob/master/MiscFunctions.ahk
TranslateMUI(resDll, resID)
{
VarSetCapacity(buf, 256)
hDll := DllCall("LoadLibrary", "str", resDll, "Ptr")
Result := DllCall("LoadString", "Ptr", hDll, "uint", resID, "str", buf, "int", 128)
return buf
}