One moment :-) Means that param 0 contains the size, right? Which is correct - param 2 is the number of objects returned.
Hm, so much for borrowed code :-) Thomas Tomiczek THONA Consulting Ltd. (Microsoft MVP C#/.NET) -----Original Message----- From: Mattias Sjögren [mailto:[EMAIL PROTECTED]] Sent: Montag, 14. Oktober 2002 15:20 To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] FW: Interop: Handling OUT parameter of array, gets error "Can not use SizeParamIndex for byref array parameters."?? Thomas, Try it like this [PreserveSig] int Next( int cPins, [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] IPin[] ppPins, out int pcFetched ); Mattias === Mattias Sjögren [EMAIL PROTECTED] You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.