Recent

Author Topic: shlwapi.pp SHRegGetValueFromHKCUHKLM definition problem  (Read 917 times)

440bx

  • Hero Member
  • *****
  • Posts: 6456
shlwapi.pp SHRegGetValueFromHKCUHKLM definition problem
« on: August 14, 2025, 09:20:54 am »
MS claims SHRegGetValueFromHKCUHKLM is no longer supported.  Documentation link:
https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-shreggetvaluefromhkcuhklm

However, in Win7 it is present as unnamed ordinal 629.  In Win 11, it is exported by name but the implementation is a jump to "somewhere" (likely kernelbase or advapi32, untested since I don't have Win 11 running.)

shlwapi.pp declares it but, given the "erratic" existence of the function a warning about using it would probably be appropriate.
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

Remy Lebeau

  • Hero Member
  • *****
  • Posts: 1589
    • Lebeau Software
Re: shlwapi.pp SHRegGetValueFromHKCUHKLM definition problem
« Reply #1 on: August 16, 2025, 07:09:35 pm »
Interesting. I've being using the Registry API for decades and never knew this function existed.
Remy Lebeau
Lebeau Software - Owner, Developer
Internet Direct (Indy) - Admin, Developer (Support forum)

440bx

  • Hero Member
  • *****
  • Posts: 6456
Re: shlwapi.pp SHRegGetValueFromHKCUHKLM definition problem
« Reply #2 on: August 16, 2025, 07:29:06 pm »
It is amazing the _mess_ MS has made in shell32 and shlwapi. 

You've got to see it to believe it.

Plenty of interesting functions though.  Sometimes there are even as many as 3 or 4 ways of invoking the same function, combination of multiple names for the same entry point and undocumented ordinals that jump  to the same entry point.  Go figure!.

MS has been claiming that some functions are either not present past a certain version of Windows or may not be present in some future version, yet many of them are implemented from Win XP to Win 11 (some even from Win 9x).
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

 

TinyPortal © 2005-2018