Forum Discussion

Michael_St_Pete's avatar
Michael_St_Pete
Contributor
14 years ago

Switched computers and cannot get ole object calls to work

I switched computers that had a sys.oleobject call that was working.  Copied the project over and now that line is throwing an exception.  Looked through the help and was having a difficult time.  The coder that helped me with this no longer works here and I don't know if there was other items that needed to be configured in TC.  Running TC 8.0.  Do not have a good C++ background to know what the dll was doing.  I know from the Object Browser we were able to put in the ole object and see what calls I could use, but I cannot see that either.



Thanks,



Mike

7 Replies


  • Hi Mike,





    Please reproduce the problem, pack the entire project suite folder and post it here or send to us directly via the Contact Support form. We will look into this case.
  • The last computer had this line of code (and it worked):

    InternalP3Call = Sys.OleObject("P3Query.QueryUtils", "");



    When we loaded up a new computer and tried to use this, the only thing that happened was an exception was thrown listed as:

    Type Message Time Priority Has Picture Link

    Exception 8:33:27 Normal  

    and the remark listed was:

    Invalid class string: cannot obtain ClassID.



    Is there more setup stuff that needs to be done for the ole object to work properly?
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Michael,



    Most probably, you need to register the module (P3Query.dll ?) that implements the P3Query object. Depending on the implementation, the command line might be either

    regsvr32 P3Query.dll

    or

    P3Query.exe /regserver



    Consult with your developers as for exact details.
  • Two problems now.

    1.) When attempting to register the dll I received an error with the error code 0x80070005.

    2.) After a restart now TC is asking for a license again.



    What is causing these two issues?

  • Hi Michael,





    I am guessing that you try to register the object on a system with the UAC enabled. In this case, you need to register the object as an administrator. To do this, run a CMD window as an administrator and then execute the registration command in it.





    2.) After a restart now TC is asking for a license again.


    It seems that you restarted the machine and TestComplete was closed incorrectly. In this case, the license was not released by this instance of the tool and it will be released automatically in some time. You can also restart the Sentinel HASP License Manager service on the machine where the license is activated to release the license instantly.
  • The first item worked.  I tried what you suggested for the second item, however it is still asking for a license.  Both computers that use the floating license had the required service restarted and the problem still exists.