https://bugzilla.novell.com/show_bug.cgi?id=467214

User [email protected] added comment
https://bugzilla.novell.com/show_bug.cgi?id=467214#c3


Robert Jordan <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]




--- Comment #3 from Robert Jordan <[email protected]>  2009-03-15 08:35:07 MST ---
They are both using LoadLibrary on Windows.

I believe that the problem is related to the point in time when mono is trying
to load the library. If you put these statements in the same method, mono will
not notice the path change, because "SomePinvokeFunc" is resolved at JIT
compile time while SetEnvironmentVariable is called later at runtime:

void Foo ()
{
    Environment.SetEnvironmentVariable ("PATH", "blah");
    SomePinvokeFunc ();
}

You may want to try to set the path as early as possible outside the method
that performs the pinvoke call.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to