Problem with WindowFromAccessibleObject returns error code 0x8001010D

61 views
Skip to first unread message

timberlake1865

unread,
Sep 15, 2010, 3:07:31 AM9/15/10
to
I am developing an automation client for a vc client
application[automation server]
I have a method in my automation client "getClassName"
This method takes in a IAccessible * ptr and calls
WindowFromAccessibleObject and returns the HWND.
[I am calling OleInitialize(0); before i call
WindowFromAccessibleObject and OleUninitialize(); after i call
WindowFromAccessibleObject]
This method is working fine.

But whenever i try to write an other method in my automation client
that calls WindowFromAccessibleObject internally [I am calling
OleInitialize(0); before i call WindowFromAccessibleObject and
OleUninitialize(); after i call WindowFromAccessibleObject] it fails
it returns NULL. the HRESULT is 0x8001010D [An outgoing call cannot be
made since the application is dispatching an input-synchronous call.]
[I have tried using CoInitialize(0); CoUninitialize(); but the issue
still occurs.]

Is it a mistake if a call OleInitialize and OleUninitialize more than
once from my automation client
I have a low profile on COM and OLE. Even if i google/ search in COM-
OLE books i am not able to fix this issue. Please help. I need a
solution urgently.

Reply all
Reply to author
Forward
0 new messages