Browse Source

* 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.

marcoonthegit 1 month ago
parent
commit
80d9863c7a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/winunits-base/src/commctrl.pp

+ 2 - 2
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;