Changes between Version 3 and Version 4 of GdalOgrCsharpUsage


Ignore:
Timestamp:
Oct 24, 2007, 9:25:56 PM (17 years ago)
Author:
mdsumner
Comment:

added using directive, fixed minor typo, changed path setting to be slightly more generic and understandable

Legend:

Unmodified
Added
Removed
Modified
  • GdalOgrCsharpUsage

    v3 v4  
    2121you can do it this way, in C#
    2222{{{
    23 DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)]
     23using System.Runtime.InteropServices;
     24
     25...
     26
     27[DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)]
    2428public static extern bool
    2529   SetEnvironmentVariable(string lpName, string lpValue);
    2630
     31...
     32
     33string GDAL_HOME = @";C:\Program Files\FWTools\bin";  // for example
     34
    2735string path = Environment.GetEnvironmentVariable("PATH");
    28 path += @";C:\Program Files\FWTools\bin";
     36path += ";" + GDAL_HOME;
    2937SetEnvironmentVariable("PATH", path);
    3038}}}
     39
    3140Now, for current process, all DLLs from FWTools package are accessible.
    3241