[Mono-list] PInvoke Conventions
Andrew Sutton
ansutton@sep.com
Fri, 27 Jul 2001 13:09:49 -0500
> The script could then based on this information spit out all the
> information we need. It would take care of structures, and would also
> take care of mapping UNIX constants to C# constants.
if you take that route, you lose the ability to map run-time additions to
constant sets. for example, if in winsock2 if you add a couple providers,
remove a provider, and add back some of the ones that you removed, you're not
gauranteed to get the same AF for each provider. at least, thats the way i
think it works.
anyway, i don't think this is a very common scenario, but having a static
compile time configuration limits your abilities to do stuff like that.
another idea would be to bury the system differences in an api. then you
could just pinvoke the api to access system functionality. or generate the
System assembly as mentioned above.
Andrew Sutton
ansutton@sep.com