[gdal-dev] The type initializer for 'OSGeo.GDAL.GdalPINVOKE' threw an exception. when gdal.Allregister() calls

Tamas Szekeres szekerest at gmail.com
Fri Jun 25 10:43:40 EDT 2010


Hi,

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

Tamas


2010/6/25 mail2vajram <mail2vajram at gmail.com>

>
> 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
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100625/a7602ac7/attachment.html


More information about the gdal-dev mailing list