IntPtr iunkwn = Marshal.GetIUnknownForObject(pWorkspace); // enum all the types defined in the interop assembly System.Reflection.Assembly objAssembly = System.Reflection.Assembly.GetAssembly(typeof(IWorkspace)); Type[] objTypes = objAssembly.GetTypes(); // find the first implemented interop type foreach (Type currType in objTypes) { // get the iid of the current type Guid iid = currType.GUID; if (!currType.IsInterface || iid == Guid.Empty) { // com interop type must be an interface with valid iid continue; } // query supportability of current interface on object IntPtr ipointer = IntPtr.Zero; Marshal.QueryInterface(iunkwn, ref iid, out ipointer); if (ipointer != IntPtr.Zero) { string str =currType.FullName; } }
IWorkspace pWorkspace = EsriDatabase.FileGdbWorkspaceFromPath("WhatEver.gdb"); Console.WriteLine(pWorkspace.GetType().FullName);
If TypeOf IFeature Is IComplexEdgeFeature Then End If
Dim layer As IFeatureLayer = New FeatureLayer Dim s As String = layer.GetType.FullName
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.