[Mono-devel-list] Patch for DllNotFoundException

Bernie Solomon bernard at ugsolutions.com
Tue Jan 13 17:42:33 EST 2004

I've been meaning to post this for review for a while. This patch raises
DllNotFoundException and EntryPointNotFoundExceptions on DllImport problems.

It isn't perfect as really the exception Message is just the dll/entry point
name which is not the same as MS but that could be fixed in the managed code
(what the string is as the arg of the constructor isn't well specified).
Also if a DLL/.so is found but fails to load for some reason it may get
misreported (but the g_module interface doesn't really provice as much info
as might be wanted).

My main concerns are

a) moving mono_lookup_pinvoke_call from loader.c to icall.c - is this OK?
Needed so it can call mono_raise_exception
b) is calling mono_raise_exception from where it is OK too? (I do have
another small patch to fix the interpreter to handle this as well - but it
seems to work).

If there are no objections I can commit this.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dll.diffs.txt
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040113/58e8bc29/attachment.txt 

More information about the Mono-devel-list mailing list