Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Retrieving the COM class factory for component with CLSID {5374EC4C-1AA2-4829-A811-DE624ECEC23F} failed due to the following error: 80040111 ClassFactory cannot supply requested class (Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE)).

GeoProcessor gp = new GeoProcessor(); 
gp.SetEnvironmentValue("workspace", PICKSIMPORT); 
IGpEnumList gdbs = gp.ListWorkspaces("", ""); 
string gdb = gdbs.Next(); 
while (gdb != "") { Console.WriteLine(gdb.ToString());
 gp.SetEnvironmentValue("workspace", gdb); 
IGpEnumList fcs = gp.ListFeatureClasses("", "", ""); 
string fc = fcs.Next(); 
while (fc != "") { Console.WriteLine(fc.ToString()); 
fc = fcs.Next();
gdb = gdbs.Next();
share|improve this question
3  
Can you provide the code that leads to this error? –  kenbuja Oct 19 '11 at 19:25
1  
Have you initialized your Arc license? –  Radar Oct 19 '11 at 21:06
    
This forum post may help: forums.esri.com/Thread.asp?c=93&f=1729&t=263376 –  Radar Oct 19 '11 at 21:07
    
Here is the code. it errors out on the first line. –  Fernando Izquierdo Oct 20 '11 at 21:55
1  
Which ArcGIS references have you added to your project? –  kenbuja Oct 21 '11 at 14:26
show 2 more comments

1 Answer

I had a very similar error message within the same context. First, I added a reference (in Solution Explorer, right-click 'References', select 'Add Reference') to the ESRI.ArcGIS.Version assembly.

Then I added the following line before the creation of your geoprocessor object:

ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop);

From: http://blogs.esri.com/esri/arcgis/2009/12/01/migrating-to-engine-9-4-and-using-the-versionmanager/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.