none
HAT Test Harness Utility Tool Throwing Exception RRS feed

  • Question

  •  

    Hi,

    I am trying to use HAT Test Harness tool to test my initialization string for a windows application. But it is throwing an uncaught exception saying "Unable to acquire top-level window handle".

     

     

    KIndly reply back ASAP. It is really urgent......

    Wednesday, January 23, 2008 12:18 PM

All replies

  • Hi Debangshu, what kind of application is it? Maybe you shold configure an alternate top-level window. For example, for a Visual Basic app it may be:

    <
    UseTopLevelWindow class="ThunderRT6Form" />


    Wednesday, January 23, 2008 1:35 PM
  • It is a .NET exe. (.NET 1.1)

    Wednesday, January 23, 2008 1:44 PM
  • Have you tried increasing the acquisition timeout?
    Wednesday, January 23, 2008 1:53 PM
  • Ya I did that. The fun part is that the application is getting loaded and after that the error is being thrown.....

     

    Kindly help me out........

    Wednesday, January 23, 2008 2:05 PM
  • One more thing, sometimes (though not always), the parent window is coming out of CCF though not always. I have selected the option Host Inside UI. Is it part of the same problem?

     

    Wednesday, January 23, 2008 2:10 PM
  • I don't know what is causing this behavior, it is difficult to know without having the application. Don't you have the exception stack trace at least?
    Maybe it is a drastic solution, but, as a workaround, you can develop a hosted control that listens for the external application to be shown and then set its parent to the control's form. This is what an ExternalApplication does, but by doing it yourself you have more control and can see what the problem is. You can find sample code in Microsoft.Ccf.Samples\QuickStarts\QsHatHostedControl.
    Wednesday, January 23, 2008 8:54 PM