Micro Focus QTP (UFT) Forums
Pure virtual function calll - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Pure virtual function calll (/Thread-Pure-virtual-function-calll)



Pure virtual function calll - abidz05 - 03-07-2011

Hi All,
I'm trying to update the repository and I get the following error:

R6025
-Pure virtual function calll

My function is located in vbs file and called from the action
Code:
Dim  RepositoryFrom
Public Function RenameAllImages(Root)
  
   Set RepositoryFrom = CreateObject("Mercury.ObjectRepositoryUtil")
   RepositoryFrom.Load "H:\temp\test.tsr"
    Dim ImageObj, PageObj, RepositoryFrom, RepositoryTo
     Dim TOCollection, TestObject, PropertiesCollection', Property
    Set TOCollection = RepositoryFrom.GetAllObjects("Test Objects")
    For i = 0 To TOCollection.Count - 1
            Set TestObject = TOCollection.Item(i)
            RepositoryFrom.UpdateObject TestObject
            Set TestObject=nothing
            wait(3)
            If i>2 Then
                Exit for
            End If
    Next
Set TOCollection=nothing
'Set RepositoryFrom=nothing
End Function
I have also tried to place the following code out of the function, but i get the same results

Code:
Set RepositoryFrom = CreateObject("Mercury.ObjectRepositoryUtil")



RE: Pure virtual function calll - aardvax - 03-08-2011

I dont know which version of QTP you are using... I had the same problem when I tried working with ObjectRepositoryUtil inside QTP(9.5), Therefore I moved the code external to QTP...in a vbscript file...and removed a call inside QTP... Worked with ObjectRepositoryUtil independent of QTP
however it was working fine with QTP 9.1 inside QTP...