[Mono-devel-list] Patch for DllNotFoundException

Varga Zoltan vargaz at freemail.hu
Fri Jan 16 12:49:48 EST 2004


                               Hi,

  Some comments about the patch:

- there is already a method name mono_exception_from_name_msg
  in exception.c, so mono_exception_from_name_one_string is not
  needed.

- instead of raising an exception from the pinvoke lookup
func, it would
  be better if the function returned some kind of error code
+ error
  message. This is needed because the exception should not
be raised
  when the lookup fails, but only when the method in
question is called.
  This is how it works in MS .NET. This is accomplished in
mono_marshal_get_native_wrapper, by generating IL code which 
  raises the exception. I think this could be extended to raise 
DllNotFoundException when appropriate.

                                           bye

                                                       Zoltan







More information about the Mono-devel-list mailing list