IRpcChannelBuffer.FreeBuffer definition problem lazarus / 67-Windows ---------------------------------------------------------------------- 440bx · 2025-07-02 05:10 Hello, In activex.pp, IRpcChannelBuffer.FreeBuffer is defined as:Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i        Function FreeBuffer(Const pMessage : RPCOLEMESSAGE):HResult; StdCall; where "pMessage" is specified as "const". The C/C++ definition is: Code: C  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i         virtual HRESULT STDMETHODCALLTYPE FreeBuffer(            /* [annotation][out][in] */            _Inout_  RPCOLEMESSAGE *pMessage) = 0; Notice that the parameter is "inout" indicating that the values in the structure are modified, IOW, they are NOT "const". In addition to misleading, it is questionable to rely on "const" passing the parameter by reference given that it is explicitly documented that FPC may decide not to pass a const parameter by reference. The parameter should be "var".