From 80d9863c7aa8b149e5370f3dc81ceee8b80fb31b Mon Sep 17 00:00:00 2001 From: marcoonthegit Date: Fri, 27 Jun 2025 18:16:34 +0200 Subject: [PATCH] * change ref to constref for REF*IID types of recently added functions(HIMAGELIST_QueryInterface and ImageList_CoCreateInstance). These are declared without pointer in FPC, but MSDN says it is a pointer. Analoguous to queryinterface in iunknown. --- packages/winunits-base/src/commctrl.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/winunits-base/src/commctrl.pp b/packages/winunits-base/src/commctrl.pp index 543e0c8bc2..792e63c65b 100644 --- a/packages/winunits-base/src/commctrl.pp +++ b/packages/winunits-base/src/commctrl.pp @@ -632,7 +632,7 @@ CONST function ImageList_Create(cx:cint;cy:cint;flags:UINT;cInitial:cint;cGrow:cint):HIMAGELIST; stdcall; external commctrldll name 'ImageList_Create'; function ImageList_Destroy(himl:HIMAGELIST):BOOL; stdcall; external commctrldll name 'ImageList_Destroy'; -function ImageList_CoCreateInstance(const rclsid:TCLSID; unkOuter:IUnknown; const riid:TIID;out ppv):HRESULT;stdcall; external commctrldll name 'ImageList_CoCreateInstance'; +function ImageList_CoCreateInstance(constref rclsid:TCLSID; unkOuter:IUnknown; const riid:TIID;out ppv):HRESULT;stdcall; external commctrldll name 'ImageList_CoCreateInstance'; function ImageList_GetImageCount(himl:HIMAGELIST):cint; stdcall; external commctrldll name 'ImageList_GetImageCount'; {$ifdef ie3plus} @@ -650,7 +650,7 @@ function ImageList_SetOverlayImage(himl:HIMAGELIST;iImage:cint;iOverlay:cint):BO Function ImageList_AddIcon(Himl:HIMAGELIST;hicon:HICON):cint; // Vista++ -function HIMAGELIST_QueryInterface(himl : HIMAGELIST;const riid : REFIID; out ppv) : HRESULT; stdcall; external commctrldll name 'HIMAGELIST_QueryInterface'; +function HIMAGELIST_QueryInterface(himl : HIMAGELIST;constref riid : REFIID; out ppv) : HRESULT; stdcall; external commctrldll name 'HIMAGELIST_QueryInterface'; CONST ILD_NORMAL = $00000000;