Recent

Author Topic: shlwapi.pp definition problems  (Read 366 times)

440bx

  • Hero Member
  • *****
  • Posts: 6155
shlwapi.pp definition problems
« on: September 16, 2025, 06:03:28 pm »
Hello,

shlwapi.pp defines:
Code: Pascal  [Select][+][-]
  1.  procedure SetProcessReference( punk:IUnknown);stdcall;external SHLWAPIDLL name 'SetProcessReference';
  2.  function GetProcessReference(punk:IUnknown):HRESULT;stdcall;external SHLWAPIDLL name 'GetProcessReference';
  3.  
Neither of those 2 functions exists in shlwapi.dll

In Win 10 and 11, they are located in shcore.dll, in versions of Windows where there is no shcore.dll, I do not know where and if those functions are implemented but, they are _not_ in shlwapi (as declared in shlwapi.pp)

Just FYI, in the C headers the function is declared in shlwapi.h but, in C that does not mean anything since it does not specify the dll where it is implemented.

If a Pascal program uses those definitions in shlwapi.pp, it would fail to load.  (Disclaimer: I didn't take the time to test this but, that's what should happen.)

HTH.
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

 

TinyPortal © 2005-2018