There is a huge section on this on the mono website. Basically  
something about the app path and mono path being different.

Maybe you are running into it ?
-raj



On Dec 9, 2009, at 6:52 AM, Damien <[email protected]> wrote:

> Hi,
>
> I have a DllImportException when I try to call a DllImport function,  
> from a dll that is not in current program path but in environement  
> path that I have set a few lines of code above the call...
>
> I'm using :
> Mono version 2.4.3
> Windows 7 Ultimate x86
>
> I alter the Environement path this way :
> --8<----8<----8<----8<----8<--
> string current = Environment.GetEnvironmentVariable("path",  
> EnvironmentVariableTarget.Process);
> current += ";" + newpath;
> Environment.SetEnvironmentVariable("path", current,  
> EnvironmentVariableTarget.Process);
> --8<----8<----8<----8<----8<--
>
> Then I have a call to my dll, but I have a DllNotFoundException.
>
> It seems that Mono does not take in account the modified path when  
> searching the dll.
>
> Does someone have idea if it is a bug or a simple mistake from me ?
>
> It works well using microsoft framework.
>
> Thanks.
>
> Damien
> _______________________________________________
> Mono-list maillist  -  [email protected]
> http://lists.ximian.com/mailman/listinfo/mono-list
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to