[Mono-devel-list] Patch for DllNotFoundException

Bernie Solomon bernard at ugsolutions.com
Fri Jan 16 16:58:22 EST 2004

Here is a modified patch along the suggested lines.

This seems to work for both mint & mono  properly 
unlike the previous patch. I may add a new
test case in mono/tests as well.

In mono the lookup fails more than once since there
are calls in mini.c & tramp-xxx.c before the wrapper
is generated but I can't see that this is a problem.

Let me know if this OK to commit now.



----- Original Message ----- 
From: "Varga Zoltan" <vargaz at freemail.hu>
To: <mono-devel-list at ximian.com>
Cc: <bernard at ugsolutions.com>
Sent: Friday, January 16, 2004 9:49 AM
Subject: Re: [Mono-devel-list] Patch for DllNotFoundException

>                                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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dll.diffs.txt
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040116/171a8e52/attachment.txt 

More information about the Mono-devel-list mailing list