AnsweredAssumed Answered

Class don´t registry

Question asked by mdmarcgisonline on May 27, 2018
Latest reply on May 27, 2018 by mdmarcgisonline

Hi...

I am receiving this message when i execute my c# program

erro: 80040154 Classe não registrada (Exceção de HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

 

I'm in VS 2017, i have installed ArcGis 10.5 (DeskTop and Server), Windows 7 64 bits and .net 4.6.1.  I installed too ArcGIS_Runtime_SDK_DotNet_100_2_1.vsix, but this don´t show in my control pannel.

 

My code is

System;
// using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Threading.Tasks;
using ESRI.ArcGIS.AnalysisTools;
using ESRI.ArcGIS.Geoprocessor;
using ESRI.ArcGIS.Geoprocessing;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.DataSourcesGDB;
using ESRI.ArcGIS.DataSourcesFile;
using ESRI.ArcGIS.DataManagementTools;
using ESRI.ArcGIS.esriSystem;

 

namespace ConsoleApp3
{
class Program
{
static void Main(string[] args)
{
FeatureClass Myfeatureclass = new FeatureClass();    <==== The exception occurs here.
ListSchemaLocksForObjectClass(Myfeatureclass);
}

//public static void ListSchemaLocksForObjectClass(IObjectClass objectClass)
public static void ListSchemaLocksForObjectClass(FeatureClass objectClass)
{
//Get an exclusive schema lock on the dataset.
ISchemaLock schemaLock = (ISchemaLock)objectClass;

// Get an enumerator over the current schema locks.
IEnumSchemaLockInfo enumSchemaLockInfo = null;
schemaLock.GetCurrentSchemaLocks(out enumSchemaLockInfo);

// Iterate through the locks.
ISchemaLockInfo schemaLockInfo = null;
while ((schemaLockInfo = enumSchemaLockInfo.Next()) != null)
{
Console.WriteLine("{0} : {1} : {2}", schemaLockInfo.TableName,
schemaLockInfo.UserName, schemaLockInfo.SchemaLockType);
}
}
}
}

 

Any help is apreciate.

 

Thanks.

 

Mdm.

 

Outcomes