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

mail2vajram mail2vajram at gmail.com
Fri Jun 25 01:23:20 EDT 2010


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.


More information about the gdal-dev mailing list