Hi,

What kind of exception has been thrown? Perhaps a missing dll may cause like
this.

Tamas


2010/6/25 mail2vajram <[email protected]>

>
> i installed fwtols2.4.7 previously.That time i worked  with gdal with out
> any
> problem but now when i work with gdal it throws the following
> exception.....why. how to fix this.
>
>
> The type initializer for 'OSGeo.GDAL.GdalPINVOKE' threw an exception.
>
> This is the way i used.....
>
> [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
>        public static extern bool SetEnvironmentVariable(string lpname,
> string lpvalue);
>        string GDAL_HOME = @";C:\Program Files\FWTools2.4.7\bin";
> string path = Environment.GetEnvironmentVariable("PATH");
>            path += ";" + GDAL_HOME;
>            SetEnvironmentVariable("PATH", path);
>            Gdal.AllRegister();
>
>
> help me thank you....
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/The-type-initializer-for-OSGeo-GDAL-GdalPINVOKE-threw-an-exception-when-gdal-Allregister-calls-tp5220732p5220732.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to