IMallocSpy.PreAlloc definition problem lazarus / 67-Windows ---------------------------------------------------------------------- 440bx · 2025-07-02 23:10 Hello, In activex.pp, IMallocSpy.PreAlloc is defined as follows: 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  PreAlloc(cbrequest:Size_t):Longint; StdCall; Note that the method's returned type is specified to be "Longint". The 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 SIZE_T STDMETHODCALLTYPE PreAlloc(            /* [annotation][in] */            _In_  SIZE_T cbRequest) = 0; Note that the method's returned type is SIZE_T which is _not_ a Longint. ---------------------------------------------------------------------- Thaddy · 2025-07-03 05:28 You should always be careful with definitions. I would add current, so the current C++ definition is... That is because ms has changed the definitions over the past 30 years or so. Not in a lot of places, but specifically COM is affected. Most of this is due to new compiler versions but some of them are because of enhanced portability. And the odd bugfix. That does not mean that activex.pp should not be updated, it just means that activex.pp likely could have been correct at the time of writing. You are right of course that the meaning of SIZE_T differs from longint, but in this case I think this is a change for portability.