Am 23.07.2017 um 14:24 schrieb Michael Van Canneyt via Lazarus: >> The pointer-ness of REFIID is an artefact of the C-ABI. It is not meant to >> mean >> 'pass a pointer to a GUID-struct', but 'pass a GUID using byref'. We have >> constref for that. > > See the link to the Windows MSDN. Yes, so?
REFIID is also the type of the first argument of QueryInterface. <https://msdn.microsoft.com/en-us/library/windows/desktop/ms682521%28v=vs.85%29.aspx> { IUnknown } function QueryInterface({$IFDEF FPC_HAS_CONSTREF}constref{$ELSE}const{$ENDIF} IID: TGUID; out Obj): Hresult; virtual; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF}; But I see already it has been translated differently in every unit (mostly because MS made it uniform only after the headers were translated), so might as well use the new one to keep things interesting. Carry on. -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus