On Thu Jul 25 19:45:13 2024 +0000, Alfred Agrell wrote:
The annotations mostly affect COM remoting. They're probably also theoretically usable for some forms of bounds checking, but I'm not aware of any implementation thereof. Yes, that [optional] does indeed not belong. The argument is nullable, but that tag is only for VARIANT and VARIANT* type arguments. Probably related to calling the function from Visual Basic. [local] bans remoting on that function. I'd either skip it and assume the default handler is good enough, or add that tag to half of both IEnumObjects and IObjectCollection (and change it when and if anyone complains). I can't find a clear answer for how [size_is] and [length_is] interact, but I do know that *pceltFetched is not a number if pceltFetched is null. Personally I'd include [size_is] and skip [length_is], unless someone who actually understands this stuff tells me otherwise.
We need the same annotations as native for anything that's remotable, which this is, and especially for anything that's in a native typelib, which this also is. That means that we do indeed need the [local] before Next, as Fabian has it, with the same size_is and length_is on "rgelt", and we also need the RemoteNext method.