Forum Discussion

kashikar_harsh's avatar
kashikar_harsh
Contributor
14 years ago

How can I use the functions from Windows DLL

Hi,

      I want to use the "AccessibleObjectFromWindow()" from "Oleacc.dll" in "c:\windows\system32" to obtain the accessible object of my AUT's objects, as I am unable to do so usning TestComplete. Please refer http://www.automatedqa.com/forums/forum/post/?mode=singlethread&thread=a02fce04-90d2-4266-a675-2b5122a586bc for more detail. I can obtain the Accessibility object through c# for the same aplication. I have also tried to add clr bridge (Adding oleacc.dll), but unable to use the function "AccessibleObjectFromWindow()". Can anybody tell me how to do this?

3 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Harshad,



    According to http://msdn.microsoft.com/en-us/library/dd317978(VS.85).aspx, the mentioned function returns a pointer to the interface. As scripting languages do not provide functionality access interface functions via pointers, I am not sure that you will benefit from being able to call it from the script.



    You can have a look at the "Calling Routines Located in Dynamic Link Libraries From Scripts" help topic for the general information and samples of how to call functions from DLLs.
  • Hi Alex,

        Thanks for the reply. Can you please tell me how can I map the toolstrip control as custom control in TestComplete? I have tried mapping it but got the error (was mapping to Microsoft Controls --> Strip Toolbar)

        The selected object does not match the criteria of the "Microsoft Controls" group.

    Then I tried to map the same object to Toolbar of Win32 Controls and Window and the mapping was successful. But I don't know how to use the mapped class in script.



    Regards,

    Harshad
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Harshad,



    Can you let us know the vendor name,and toolstrip name and version?