Arun Kumar M
Arun Kumar M

Reputation: 37

IServiceProvider::QueryService fails with error -2147024809 on Windows server 2008 R2 having IE11

  1. Acquiring the IAccessible pointer to an element within the page or the accessible window of the document for Window class Internet Explorer_Server is successfully using the code (where hwnd is the handle of Internet_Explorer_server) AccessibleObjectFromWindow(hwnd, OBJID_WINDOW, IID_IAccessible, (void**)&pAcc)
  2. Getting an IServiceProvider interface pointer for the accessible object obtained from Step 1 is also successfully using the code HRESULT hr; hr = pAcc->QueryInterface(IID_IServiceProvider, (void **)&pSP).

However when tried to use the QueryService call on the obtained IServiceProvider using the code HRESULT hr = pServiceProvider->QueryService(IID_IHTMLWindow2, IID_IHTMLWindow2, (void**)&pWindow)it fails with a return -2147024809, which is 0x80070057. Not sure as to why this is happening, just wondering if there are any specific setting on the server machine (Windows Server 2008 R2) which is preventing this call from being successfully.

Also, the above step which I have described is successfully in Windows 7 environment.
To Note : Version of Internet Explorer installed is 10

Upvotes: 0

Views: 759

Answers (0)

Related Questions