View Issue Details

IDProjectCategoryView StatusLast Update
0028760FPCRTLpublic2017-07-23 11:51
ReporterMartokAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformWin32OSOS Version
Product Version3.1.1Product Buildr31810 
Target Version3.2.0Fixed in Version3.1.1 
Summary0028760: Incorrect imports in shlobj.pp: REFIID parameters
DescriptionFile: source\packages\winunits-base\src\shlobj.pp

REFIID parameters in shell32.dll imports should be constrefs; current imports generate pass-by-value.

Confirmed for SHBindToParent (line 2788), which should look like:
  function SHBindToParent(pidl:LPCITEMIDLIST; constref riid:TREFIID; ppv:Ppointer; var ppidlLast:LPCITEMIDLIST):HRESULT;StdCall;external External_library name 'SHBindToParent';
Or even better, using a var parameter for the interface:
  function SHBindToParent(pidl:LPCITEMIDLIST; constref riid:TREFIID; var ppv:Pointer; var ppidlLast:LPCITEMIDLIST):HRESULT;StdCall;external External_library name 'SHBindToParent';


Possibly also true for SHCreateFileExtractIcon (l. 2803ff), but have not tested that.
TagsNo tags attached.
Fixed in Revision36770
FPCOldBugId
FPCTarget
Attached Files

Activities

Michael Van Canneyt

2017-07-23 11:51

administrator   ~0101867

According to
https://msdn.microsoft.com/en-us/library/cc237816.aspx
the definition of REFIID is
REFIID = ^TIID
while FPC defined it as REFIID = TIID

I corrected the definition and fixed some resulting compile errors.

Issue History

Date Modified Username Field Change
2015-09-30 17:07 Martok New Issue
2017-07-23 11:51 Michael Van Canneyt Fixed in Revision => 36770
2017-07-23 11:51 Michael Van Canneyt Note Added: 0101867
2017-07-23 11:51 Michael Van Canneyt Status new => resolved
2017-07-23 11:51 Michael Van Canneyt Fixed in Version => 3.1.1
2017-07-23 11:51 Michael Van Canneyt Resolution open => fixed
2017-07-23 11:51 Michael Van Canneyt Assigned To => Michael Van Canneyt
2017-07-23 11:51 Michael Van Canneyt Target Version => 3.2.0