Take control over ActiveX by hwnd.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mierzej
    New Member
    • Apr 2008
    • 1

    Take control over ActiveX by hwnd.

    Hi everybody.

    My problem is - I want to take control over an ActiveX control of another running process. All I can obtain is a hwnd of the mentioned control. I can explore the control (coclass?) interfaces using OLE/COM viewer.

    I tried to get the IUnknown interface of the control through IAccessibleFrom Window and it seems possible. But when I query IUnknown interface for another (coclass?) interfaces (for instance IGrid for MSDataGrid) it usually returns NoInterfaceSupp orted or something like that (but it works for IAccessible).

    My question is - is it just possible to take control over another proccess' ActiveX control (just like I was developing an application using this control, for example check a ColumnCount property for some kind of data grid) knowing only its hwnd (obtained from Spy++ or much the same software)? I haven't found an application which could list all supported ActiveX interfaces using just its hwnd (there is Inspect32 from Microsoft Accessability Package but shows only most popular interfaces; or maybe I am wrong and it shows all available interfaces which can be accessed from another process? Maybe coclass of running ActiveX control cann't be accessed from another process and those all interfaces I'm talking about are implemented by the coclass itself and not by the visible ActiveX control? I'm not a COM specialist, unfortunatelly) .
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    Do some reasearch on "dll injection" and "API interception".

    Comment

    Working...