[Mono-list] Re: PInvoke Conventions

Fergus Henderson fjh@cs.mu.OZ.AU
Tue, 24 Jul 2001 04:24:44 +1000

On 19-Jul-2001, Rhys Weatherley <rweather@zip.com.au> wrote:
> [MarshalAs(UnmanagedType.ByValArray, SizeConst=1024)]
> There are already quite a number of attributes for doing this in the
> Windows API.  If there isn't any other information, some default
> will no doubt need to be chosen.  BUFSIZ?

No.  There should not be any default size -- that would be a major security risk.
If no size is specifed, report a compile error, if possible,
or throw an exception.

Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.