missing out from declaration of function GetRunningObjectTable
Original Reporter info from Mantis: mike.cornflake
-
Reporter name: Mike Thompson
Original Reporter info from Mantis: mike.cornflake
- Reporter name: Mike Thompson
Description:
In ActiveX.pp, the declaration for GetRunningObjectTable appears to be incorrect (IRunningObject.
The attached patch addresses this...
Steps to reproduce:
On Windows XP, Windows 7 and Windows 8 the following code immediately produces an error:
Var
hr: HRESULT;
ROT: IRunningObjectTable;
Begin
hr := GetRunningObjectTable(0, ROT); // <-- Error here
End;
Additional information:
The MSDN documentation for GetRunningObjectTable has the IRunningObjectTable parameter defined as out (which makes sense in that this is how the ROT is returned), however this is not how it is currently defined in ActiveX.pp.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms684004(v=vs.85).aspx
Unfortunately, while I strongly suspect the attached patch is correct, I cannot currently produce code to prove this as I suspect the app I have which uses the ROT (GraphEdt) is 32bit only, and I currently only have 64bit OS's on hand. All I can currently say is that the patch eliminates the error, it looks like I can use the resulting ROT, and that the returned HRESULT is now S_OK...
(I've put fpc 3.1.1 as that's what I'm using, but this issue has been around for at least 2 years)
And finally, here's the correspondence that lead to all this (it's in the following post to this one)
Mantis conversion info:
- Mantis ID: 27555
- Platform: Windows
- Version: 3.1.1
- Fixed in version: 3.0.0
- Fixed in revision: 30028 (#8aba24ec)