it seems the compiler emits wrong code.
It is a long standing problem for me, which i have circumvent by using an old version of the compiler (Version 7.2.77.1621 from 2012)
(I need this kind of code for my debugger)
It would be nice to have this solved so that i can completely switch to the actual compiler.
Thanks
function Next([&In] celt:Cardinal;
[&Out, MarshalAs(UnmanagedType.LPArray, ArraySubType := UnmanagedType.IUnknown)] rgelt: array of Object;
[&Out] out pceltFetched:Cardinal):Integer;
The 2nd parameter has attribute out but it is declared w/o out modifier.
Yes, it seems to give some value.
If you’ll find a way to do this without the unsafe modifier (which wasn’t needed with the old compiler) then it would be fine.
Otherwise i would call this a regression…
Thanks for your investigation.
But i don’t want to add an extra (unsafe) assembly.
And i don’t want to rewrite my code.
The old compiler was able to do that correctly, why don’t you accept this as a a bug/regression ?
I can provide you with this version (and also the assembly for il comparision) in case you don’t have this version any more.
Evgeny, i’ve tried to test your solution with the MS interop package, but i’ve got an
error on compiling under 64 bit OS and an error on running on 32 bit OS.
When running on my W10/32 bit OS, it seems the assemblies are not copied into the local bin directory. What do i miss ? Can you send me your project ?
(I get a FileNotFoundException)
When compiling under W10/64 bit OS, i get
E: There was an exception executing the Elements compiler: ‘No path set for EBuildObject Reference: netstandard’
I can’t reproduce this. in my case all assembles were resolved as
Reference 'mscorlib' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\mscorlib.dll' for target 'Echoes'.
Reference 'System' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.dll' for target 'Echoes'.
Reference 'netstandard' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\Facades\netstandard.dll' for target 'Echoes'.
Reference 'System.Core' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Core.dll' for target 'Echoes'.