|
Hi,
I am trying to use the function GetAllDifferences() & GetDifferences() from the interface IMMVersioningUtils.
But when I try to create an object (as shown below), Visual Studio 2005 informs that such a class in not defined and recommends to use "MMVersionDiffClass" instead.
Code Snippet:
***************************
Dim verDiffList As ID8List
Dim listItem As ID8ListItem
Dim pMMVersionObj As IMMVersioningUtils 'IMMVersionDiff
Dim pVersion As IVersion
Dim pDS As IDataset
Dim pObjectClass As IObjectClass
Dim parentVersion, childVersion As String
pMMVersionObj = New MMVersionDiffClass 'MMVersioningUtils
verDiffList = pMMVersionObj.GetAllDifferences(pWorkspace, childVersion, parentVersion, False, False)
verDiffList.Reset()
listItem = verDiffList.Next
While Not (IsDBNull(listItem))
MsgBox("List Item Value: " + listItem.DisplayName)
End While
***************************
Now the problem is, when use the recommended class to instantiate the object, I get the following runtime error:
Error : System.InvalidCastException: Unable to cast COM object of type 'Miner.Interop.MMVersionDiffClass' to interface type 'Miner.Interop.IMMVersioningUtils'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{EC79BBA3-301E-11D4-AC32-00500462E2B6}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
I've also tried using IMMVersionDiff, but then I cannot access the GetAllDifferences() method, as they are not defined in that class.
The ArcFM documentation shows MMVersioningUtils as the CO-CLASS for IMMVersioningUtils, but when used, it doesnt work.
Can anyone help me with this, as this is quite urgent for us and I am unable to find a co-class for this in the documentation. Or is there a different way to achieve the same.
Regards
Ujjwal
[/b]
|