[Mono-list] DllImport ... help
Fri, 14 Jun 2002 13:40:38 -0400
I've been struggling with DllImport all evening just to call
gethostname(char *buf, int len). Seems like it should be simple. There
appear to be a lot of examples of sending string arguments and getting
string return values, but I can't find anything that addresses filling a
preallocated string buffer.
most tests (that I can get to compile) result in:
** (process:7): WARNING **: unhandled exception
System.NullReferenceException: "A null value was found where an object
instance was required"
Any help is greatly appreciated.