In an ArcMap addin I have the code:
Dim gxCat As IGxCatalog
Dim pObj As IGxObject
Dim x As Long
gxCat = New GxCatalogClass
pObj = pObj = gxCat.GetObjectFromFullName(sPath, x)
But the last line trips the error - Cannot convert to 'Interface IGxObject', but that's exactly what the function is documented to do. I know the path is good (tried a few) and I think I am getting a valid catalog object, I mean, I can do things with it like make a folder connection.Furthermore, on my previous computer, this same addin and this same chunk of code never threw an error.BTW, what I am trying to do is, from a full path to an object, determine first if the path leads to a valid ArcCatalog object and then what the datase type of that object is, so if there is another way beside getting to IGxDataset.Dataset.Type I would appreciate it.Thanks