[Gdal-dev] Re: Move gdal-DLLs? (C#)

Mateusz Loskot mateusz at loskot.net
Sun Aug 12 17:04:57 EDT 2007


Tomas R wrote:
> Will the path I set pollute the second plugins path? If we say that
> both plugins use the same method as in the example above and not have
> the DLLs in their local directory. Should not be a problem I think,
> but without asking I can't know for sure.

As you can read in the MSDN documentation, no,
it won't pollute anything:

http://msdn2.microsoft.com/en-us/library/ms686206.aspx

or

http://msdn2.microsoft.com/en-us/library/system.environment.setenvironmentvariable.aspx

BTW, instead of the P/Invoke call to SetEnvironmentVariable, you
can use C# native method Environment.SetEnvironmentVariable (AFAIR,
available from .NET >= 2.0).
Read the doc carefully, because there are two versions of this method.
Unlike the Win32 API call accessed through P/Invoke, the method
Environment.SetEnvironmentVariable has overloaded version that *may*
change environment permanently, across processes.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net



More information about the Gdal-dev mailing list