ReactOS  0.4.15-dev-1177-g6cb3b62
oleacc.idl File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

interface  IAccessible
 
interface  IAccessibleHandler
 
interface  IAccIdentity
 
interface  IAccPropServer
 
interface  IAccPropServices
 
class  Accessibility::CAccPropServices
 

Modules

library  Accessibility
 

Macros

#define threading(model)
 

Typedefs

typedef enum AnnoScope AnnoScope
 

Enumerations

enum  AnnoScope { ANNO_THIS, ANNO_CONTAINER }
 

Functions

 Accessibility::importlib ("stdole2.tlb")
 
 DEFINE_GUID (CLSID_AccPropServices, 0xb5f8350b, 0x0548, 0x48b1, 0xa6, 0xee, 0x88, 0xbd, 0x00, 0xb4, 0xa5, 0xe7)
 
 DEFINE_GUID (IIS_IsOleaccProxy, 0x902697fa, 0x80e4, 0x4560, 0x80, 0x2a, 0xa1, 0x3f, 0x22, 0xa6, 0x47, 0x09)
 
LRESULT WINAPI LresultFromObject (REFIID, WPARAM, LPUNKNOWN)
 
HRESULT WINAPI ObjectFromLresult (LRESULT, REFIID, WPARAM, void **)
 
HRESULT WINAPI WindowFromAccessibleObject (IAccessible *, HWND *)
 
HRESULT WINAPI AccessibleObjectFromWindow (HWND, DWORD, REFIID, void **)
 
HRESULT WINAPI AccessibleObjectFromEvent (HWND, DWORD, DWORD, IAccessible **, VARIANT *)
 
HRESULT WINAPI AccessibleObjectFromPoint (POINT, IAccessible **, VARIANT *)
 
HRESULT WINAPI AccessibleChildren (IAccessible *, LONG, LONG, VARIANT *, LONG *)
 
void WINAPI GetOleaccVersionInfo (DWORD *, DWORD *)
 
HRESULT WINAPI CreateStdAccessibleObject (HWND, LONG, REFIID, void **)
 
HRESULT WINAPI CreateStdAccessibleProxyA (HWND, LPCSTR, LONG, REFIID, void **)
 
HRESULT WINAPI CreateStdAccessibleProxyW (HWND, LPCWSTR, LONG, REFIID, void **)
 
CreateStdAccessibleProxy UINT WINAPI GetRoleTextA (DWORD, LPSTR, UINT)
 
UINT WINAPI GetRoleTextW (DWORD, LPWSTR, UINT)
 
GetRoleText UINT WINAPI GetStateTextA (DWORD, LPSTR, UINT)
 
UINT WINAPI GetStateTextW (DWORD, LPWSTR, UINT)
 

Variables

STATE_SYSTEM_HASPOPUP typedef GUID MSAAPROPID
 

Macro Definition Documentation

◆ threading

#define threading (   model)

Definition at line 22 of file oleacc.idl.

Typedef Documentation

◆ AnnoScope

Enumeration Type Documentation

◆ AnnoScope

Enumerator
ANNO_THIS 
ANNO_CONTAINER 

Definition at line 150 of file oleacc.idl.

151 {
152  ANNO_THIS,
154 } AnnoScope;
AnnoScope
Definition: oleacc.idl:150

Function Documentation

◆ AccessibleChildren()

HRESULT WINAPI AccessibleChildren ( IAccessible ,
LONG  ,
LONG  ,
VARIANT ,
LONG  
)

Definition at line 601 of file main.c.

603 {
604  IEnumVARIANT *ev;
605  LONG i, child_no;
606  HRESULT hr;
607 
608  TRACE("%p %d %d %p %p\n", container, start, count, children, children_cnt);
609 
610  if(!container || !children || !children_cnt)
611  return E_INVALIDARG;
612 
613  for(i=0; i<count; i++)
614  VariantInit(children+i);
615 
616  hr = IAccessible_QueryInterface(container, &IID_IEnumVARIANT, (void**)&ev);
617  if(SUCCEEDED(hr)) {
618  hr = IEnumVARIANT_Reset(ev);
619  if(SUCCEEDED(hr))
620  hr = IEnumVARIANT_Skip(ev, start);
621  if(SUCCEEDED(hr))
622  hr = IEnumVARIANT_Next(ev, count, children, (ULONG*)children_cnt);
623  IEnumVARIANT_Release(ev);
624  return hr;
625  }
626 
627  hr = IAccessible_get_accChildCount(container, &child_no);
628  if(FAILED(hr))
629  return hr;
630 
631  for(i=0; i<count && start+i+1<=child_no; i++) {
632  IDispatch *disp;
633 
634  V_VT(children+i) = VT_I4;
635  V_I4(children+i) = start+i+1;
636 
637  hr = IAccessible_get_accChild(container, children[i], &disp);
638  if(SUCCEEDED(hr) && disp) {
639  V_VT(children+i) = VT_DISPATCH;
640  V_DISPATCH(children+i) = disp;
641  }
642  }
643 
644  *children_cnt = i;
645  return i==count ? S_OK : S_FALSE;
646 }
disp
Definition: i386-dis.c:3181
Definition: compat.h:2046
HRESULT hr
Definition: shlfolder.c:183
GLuint GLuint GLsizei count
Definition: gl.h:1545
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:568
#define V_I4(A)
Definition: oleauto.h:247
#define V_DISPATCH(A)
Definition: oleauto.h:239
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
long LONG
Definition: pedump.c:60
#define S_FALSE
Definition: winerror.h:2357
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
#define V_VT(A)
Definition: oleauto.h:211
#define S_OK
Definition: intsafe.h:51
GLuint start
Definition: gl.h:1545
unsigned int ULONG
Definition: retypes.h:1
#define SUCCEEDED(hr)
Definition: intsafe.h:49

Referenced by test_AccessibleChildren().

◆ AccessibleObjectFromEvent()

HRESULT WINAPI AccessibleObjectFromEvent ( HWND  ,
DWORD  ,
DWORD  ,
IAccessible **  ,
VARIANT  
)

◆ AccessibleObjectFromPoint()

HRESULT WINAPI AccessibleObjectFromPoint ( POINT  ,
IAccessible **  ,
VARIANT  
)

Definition at line 343 of file main.c.

344 {
345  FIXME("{%d,%d} %p %p: stub\n", ptScreen.x, ptScreen.y, ppacc, pvarChild );
346  return E_NOTIMPL;
347 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ AccessibleObjectFromWindow()

HRESULT WINAPI AccessibleObjectFromWindow ( HWND  ,
DWORD  ,
REFIID  ,
void **   
)

Definition at line 349 of file main.c.

351 {
352  TRACE("%p %d %s %p\n", hwnd, dwObjectID,
354 
355  if(!ppvObject)
356  return E_INVALIDARG;
357  *ppvObject = NULL;
358 
359  if(IsWindow(hwnd)) {
360  LRESULT lres;
361 
362  lres = SendMessageW(hwnd, WM_GETOBJECT, 0xffffffff, dwObjectID);
363  if(FAILED(lres))
364  return lres;
365  else if(lres)
366  return ObjectFromLresult(lres, riid, 0, ppvObject);
367  }
368 
369  return CreateStdAccessibleObject(hwnd, dwObjectID, riid, ppvObject);
370 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
BOOL WINAPI IsWindow(_In_opt_ HWND)
REFIID riid
Definition: precomp.h:44
HRESULT WINAPI CreateStdAccessibleObject(HWND hwnd, LONG idObject, REFIID riidInterface, void **ppvObject)
Definition: main.c:154
HRESULT WINAPI ObjectFromLresult(LRESULT result, REFIID riid, WPARAM wParam, void **ppObject)
Definition: main.c:177
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
REFIID LPVOID * ppvObject
Definition: precomp.h:44
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LONG_PTR LRESULT
Definition: windef.h:209

Referenced by Client_accHitTest(), Client_EnumVARIANT_Next(), Client_get_accParent(), and test_AccessibleObjectFromWindow().

◆ CreateStdAccessibleObject()

HRESULT WINAPI CreateStdAccessibleObject ( HWND  ,
LONG  ,
REFIID  ,
void **   
)

Definition at line 154 of file main.c.

156 {
158 
159  TRACE("%p %d %s %p\n", hwnd, idObject,
160  debugstr_guid( riidInterface ), ppvObject );
161 
162  switch(idObject) {
163  case OBJID_CLIENT:
165  if(create) return create(hwnd, riidInterface, ppvObject);
166  return create_client_object(hwnd, riidInterface, ppvObject);
167  case OBJID_WINDOW:
169  if(create) return create(hwnd, riidInterface, ppvObject);
170  return create_window_object(hwnd, riidInterface, ppvObject);
171  default:
172  FIXME("unhandled object id: %d\n", idObject);
173  return E_NOTIMPL;
174  }
175 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
HRESULT(WINAPI * accessible_create)(HWND, const IID *, void **)
Definition: main.c:54
#define OBJID_WINDOW
Definition: winable.h:15
static accessible_create get_builtin_accessible_obj(HWND hwnd, LONG objid)
Definition: main.c:111
HRESULT create_window_object(HWND, const IID *, void **) DECLSPEC_HIDDEN
Definition: window.c:414
HRESULT create_client_object(HWND hwnd, const IID *iid, void **obj)
Definition: client.c:625
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_guid
Definition: kernel32.h:35
#define OBJID_CLIENT
Definition: winable.h:19
#define TRACE(s)
Definition: solgame.cpp:4
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define E_NOTIMPL
Definition: ddrawi.h:99
static const struct access_res create[16]
Definition: package.c:7720

Referenced by AccessibleObjectFromWindow(), and test_default_client_accessible_object().

◆ CreateStdAccessibleProxyA()

HRESULT WINAPI CreateStdAccessibleProxyA ( HWND  ,
LPCSTR  ,
LONG  ,
REFIID  ,
void **   
)

◆ CreateStdAccessibleProxyW()

HRESULT WINAPI CreateStdAccessibleProxyW ( HWND  ,
LPCWSTR  ,
LONG  ,
REFIID  ,
void **   
)

◆ DEFINE_GUID() [1/2]

DEFINE_GUID ( CLSID_AccPropServices  ,
0xb5f8350b  ,
0x0548  ,
0x48b1  ,
0xa6  ,
0xee  ,
0x88  ,
0xbd  ,
0x00  ,
0xb4  ,
0xa5  ,
0xe7   
)

◆ DEFINE_GUID() [2/2]

DEFINE_GUID ( IIS_IsOleaccProxy  ,
0x902697fa  ,
0x80e4  ,
0x4560  ,
0x80  ,
0x2a  ,
0xa1  ,
0x3f  ,
0x22  ,
0xa6  ,
0x47  ,
0x09   
)

◆ GetOleaccVersionInfo()

void WINAPI GetOleaccVersionInfo ( DWORD ,
DWORD  
)

Definition at line 448 of file main.c.

449 {
450 #ifdef __REACTOS__
451  *pVersion = MAKELONG(2,4); /* Windows XP version of oleacc: 4.2.5406.0 */
452  *pBuild = MAKELONG(0,5406);
453 #else
454  *pVersion = MAKELONG(0,7); /* Windows 7 version of oleacc: 7.0.0.0 */
455  *pBuild = MAKELONG(0,0);
456 #endif
457 }
#define MAKELONG(a, b)
Definition: typedefs.h:249

◆ GetRoleTextA()

CreateStdAccessibleProxy UINT WINAPI GetRoleTextA ( DWORD  ,
LPSTR  ,
UINT   
)

Definition at line 491 of file main.c.

492 {
493  UINT length;
494  WCHAR *roletextW;
495 
496  TRACE("%u %p %u\n", role, lpRole, rolemax);
497 
498  if(lpRole && !rolemax)
499  return 0;
500 
501  length = GetRoleTextW(role, NULL, 0);
502  if(!length) {
503  if(lpRole && rolemax)
504  lpRole[0] = 0;
505  return 0;
506  }
507 
508  roletextW = HeapAlloc(GetProcessHeap(), 0, (length + 1)*sizeof(WCHAR));
509  if(!roletextW)
510  return 0;
511 
512  GetRoleTextW(role, roletextW, length + 1);
513 
514  length = WideCharToMultiByte( CP_ACP, 0, roletextW, -1, NULL, 0, NULL, NULL );
515 
516  if(!lpRole){
517  HeapFree(GetProcessHeap(), 0, roletextW);
518  return length - 1;
519  }
520 
521  if(rolemax < length) {
522  HeapFree(GetProcessHeap(), 0, roletextW);
523  lpRole[0] = 0;
524  return 0;
525  }
526 
527  WideCharToMultiByte( CP_ACP, 0, roletextW, -1, lpRole, rolemax, NULL, NULL );
528 
529  if(rolemax < length){
530  lpRole[rolemax-1] = '\0';
531  length = rolemax;
532  }
533 
534  HeapFree(GetProcessHeap(), 0, roletextW);
535 
536  return length - 1;
537 }
#define WideCharToMultiByte
Definition: compat.h:111
#define CP_ACP
Definition: compat.h:109
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:484
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
unsigned int UINT
Definition: ndis.h:50
UINT WINAPI GetRoleTextW(DWORD role, LPWSTR lpRole, UINT rolemax)
Definition: main.c:471
#define HeapFree(x, y, z)
Definition: compat.h:483

Referenced by test_getroletext().

◆ GetRoleTextW()

UINT WINAPI GetRoleTextW ( DWORD  ,
LPWSTR  ,
UINT   
)

Definition at line 471 of file main.c.

472 {
473  INT ret;
474  WCHAR *resptr;
475 
476  TRACE("%u %p %u\n", role, lpRole, rolemax);
477 
478  /* return role text length */
479  if(!lpRole)
480  return LoadStringW(oleacc_handle, role, (LPWSTR)&resptr, 0);
481 
482  ret = LoadStringW(oleacc_handle, role, lpRole, rolemax);
483  if(!(ret > 0)){
484  if(rolemax > 0) lpRole[0] = '\0';
485  return 0;
486  }
487 
488  return ret;
489 }
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
int32_t INT
Definition: typedefs.h:58
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
int ret
static HINSTANCE oleacc_handle
Definition: main.c:98
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by GetRoleTextA(), and test_getroletext().

◆ GetStateTextA()

GetRoleText UINT WINAPI GetStateTextA ( DWORD  ,
LPSTR  ,
UINT   
)

◆ GetStateTextW()

UINT WINAPI GetStateTextW ( DWORD  ,
LPWSTR  ,
UINT   
)

◆ LresultFromObject()

LRESULT WINAPI LresultFromObject ( REFIID  ,
WPARAM  ,
LPUNKNOWN   
)

Definition at line 249 of file main.c.

250 {
251  static const WCHAR atom_fmt[] = {'%','0','8','x',':','%','0','8','x',':','%','0','8','x',0};
252  static const LARGE_INTEGER seek_zero = {{0}};
253 
254  WCHAR atom_str[ARRAY_SIZE(lresult_atom_prefix)+3*8+3];
255  IStream *stream;
256  HANDLE mapping;
257  STATSTG stat;
258  HRESULT hr;
259  ATOM atom;
260  void *view;
261 
262  TRACE("%s %ld %p\n", debugstr_guid(riid), wParam, pAcc);
263 
264  if(wParam)
265  FIXME("unsupported wParam = %lx\n", wParam);
266 
267  if(!pAcc)
268  return E_INVALIDARG;
269 
271  if(FAILED(hr))
272  return hr;
273 
274  hr = CoMarshalInterface(stream, riid, pAcc, MSHCTX_LOCAL, NULL, MSHLFLAGS_NORMAL);
275  if(FAILED(hr)) {
276  IStream_Release(stream);
277  return hr;
278  }
279 
280  hr = IStream_Seek(stream, seek_zero, STREAM_SEEK_SET, NULL);
281  if(FAILED(hr)) {
282  IStream_Release(stream);
283  return hr;
284  }
285 
286  hr = IStream_Stat(stream, &stat, STATFLAG_NONAME);
287  if(FAILED(hr)) {
289  IStream_Release(stream);
290  return hr;
291  }else if(stat.cbSize.u.HighPart) {
292  FIXME("stream size to big\n");
294  IStream_Release(stream);
295  return E_NOTIMPL;
296  }
297 
299  stat.cbSize.u.HighPart, stat.cbSize.u.LowPart, NULL);
300  if(!mapping) {
302  IStream_Release(stream);
303  return hr;
304  }
305 
307  if(!view) {
310  IStream_Release(stream);
311  return E_FAIL;
312  }
313 
314  hr = IStream_Read(stream, view, stat.cbSize.u.LowPart, NULL);
316  if(FAILED(hr)) {
318  hr = IStream_Seek(stream, seek_zero, STREAM_SEEK_SET, NULL);
319  if(SUCCEEDED(hr))
321  IStream_Release(stream);
322  return hr;
323 
324  }
325 
326  memcpy(atom_str, lresult_atom_prefix, sizeof(lresult_atom_prefix));
328  HandleToUlong(mapping), stat.cbSize.u.LowPart);
329  atom = GlobalAddAtomW(atom_str);
330  if(!atom) {
332  hr = IStream_Seek(stream, seek_zero, STREAM_SEEK_SET, NULL);
333  if(SUCCEEDED(hr))
335  IStream_Release(stream);
336  return E_FAIL;
337  }
338 
339  IStream_Release(stream);
340  return atom;
341 }
HRESULT WINAPI CoReleaseMarshalData(IStream *pStream)
Definition: marshal.c:2055
#define CloseHandle
Definition: compat.h:487
#define MapViewOfFile
Definition: compat.h:493
HRESULT hr
Definition: shlfolder.c:183
WORD ATOM
Definition: dimm.idl:113
#define TRUE
Definition: types.h:120
REFIID riid
Definition: precomp.h:44
#define HandleToUlong(h)
Definition: basetsd.h:79
#define INVALID_HANDLE_VALUE
Definition: compat.h:479
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
#define E_FAIL
Definition: ddrawi.h:102
WPARAM wParam
Definition: combotst.c:138
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
#define CreateFileMappingW(a, b, c, d, e, f)
Definition: compat.h:492
#define FILE_MAP_WRITE
Definition: winbase.h:154
#define swprintf(buf, format,...)
Definition: sprintf.c:56
GLenum GLenum GLenum GLenum mapping
Definition: glext.h:9031
Definition: parse.h:22
GLuint GLuint stream
Definition: glext.h:7522
Definition: stat.h:55
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
_CRTIMP int __cdecl stat(const char *_Filename, struct stat *_Stat)
Definition: stat.h:345
#define ARRAY_SIZE(a)
Definition: main.h:24
#define E_NOTIMPL
Definition: ddrawi.h:99
ATOM WINAPI GlobalAddAtomW(LPCWSTR lpString)
Definition: atom.c:444
static IOleDocumentView * view
Definition: activex.c:1749
HRESULT WINAPI CoMarshalInterface(IStream *pStream, REFIID riid, IUnknown *pUnk, DWORD dwDestContext, void *pvDestContext, DWORD mshlFlags)
Definition: marshal.c:1876
#define UnmapViewOfFile
Definition: compat.h:494
DWORD WINAPI GetCurrentProcessId(VOID)
Definition: proc.c:1158
#define SUCCEEDED(hr)
Definition: intsafe.h:49
#define PAGE_READWRITE
Definition: nt_native.h:1304
static const WCHAR lresult_atom_prefix[]
Definition: main.c:43

Referenced by test_LresultFromObject(), and test_window_proc().

◆ ObjectFromLresult()

HRESULT WINAPI ObjectFromLresult ( LRESULT  ,
REFIID  ,
WPARAM  ,
void **   
)

Definition at line 177 of file main.c.

178 {
179  WCHAR atom_str[ARRAY_SIZE(lresult_atom_prefix)+3*8+3];
180  HANDLE server_proc, server_mapping, mapping;
181  DWORD proc_id, size;
182  IStream *stream;
183  HGLOBAL data;
184  void *view;
185  HRESULT hr;
186  WCHAR *p;
187 
188  TRACE("%ld %s %ld %p\n", result, debugstr_guid(riid), wParam, ppObject );
189 
190  if(wParam)
191  FIXME("unsupported wParam = %lx\n", wParam);
192 
193  if(!ppObject)
194  return E_INVALIDARG;
195  *ppObject = NULL;
196 
197  if(result != (ATOM)result)
198  return E_FAIL;
199 
200  if(!GlobalGetAtomNameW(result, atom_str, ARRAY_SIZE(atom_str)))
201  return E_FAIL;
202  if(memcmp(atom_str, lresult_atom_prefix, sizeof(lresult_atom_prefix)))
203  return E_FAIL;
204  p = atom_str + ARRAY_SIZE(lresult_atom_prefix);
205  proc_id = wcstoul(p, &p, 16);
206  if(*p != ':')
207  return E_FAIL;
208  server_mapping = ULongToHandle( wcstoul(p+1, &p, 16) );
209  if(*p != ':')
210  return E_FAIL;
211  size = wcstoul(p+1, &p, 16);
212  if(*p != 0)
213  return E_FAIL;
214 
215  server_proc = OpenProcess(PROCESS_DUP_HANDLE, FALSE, proc_id);
216  if(!server_proc)
217  return E_FAIL;
218 
219  if(!DuplicateHandle(server_proc, server_mapping, GetCurrentProcess(), &mapping,
221  return E_FAIL;
222  CloseHandle(server_proc);
224 
227  if(!view)
228  return E_FAIL;
229 
231  if(!data) {
233  return E_OUTOFMEMORY;
234  }
235  memcpy(data, view, size);
237 
239  if(FAILED(hr)) {
240  GlobalFree(data);
241  return hr;
242  }
243 
244  hr = CoUnmarshalInterface(stream, riid, ppObject);
245  IStream_Release(stream);
246  return hr;
247 }
ATOM WINAPI GlobalDeleteAtom(ATOM nAtom)
Definition: atom.c:454
HRESULT WINAPI CoUnmarshalInterface(IStream *pStream, REFIID riid, LPVOID *ppv)
Definition: marshal.c:1981
#define DUPLICATE_CLOSE_SOURCE
#define ULongToHandle(h)
Definition: basetsd.h:81
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
#define CloseHandle
Definition: compat.h:487
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
#define MapViewOfFile
Definition: compat.h:493
HRESULT hr
Definition: shlfolder.c:183
WORD ATOM
Definition: dimm.idl:113
#define TRUE
Definition: types.h:120
REFIID riid
Definition: precomp.h:44
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
_Check_return_ unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
#define E_FAIL
Definition: ddrawi.h:102
WPARAM wParam
Definition: combotst.c:138
#define DUPLICATE_SAME_ACCESS
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define FALSE
Definition: types.h:117
#define PROCESS_DUP_HANDLE
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define FILE_MAP_READ
Definition: compat.h:524
#define debugstr_guid
Definition: kernel32.h:35
UINT WINAPI GlobalGetAtomNameW(ATOM nAtom, LPWSTR lpBuffer, int nSize)
Definition: atom.c:496
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLenum GLenum GLenum mapping
Definition: glext.h:9031
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
Definition: heapmem.c:611
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
Definition: parse.h:22
#define GMEM_FIXED
Definition: winbase.h:290
GLuint GLuint stream
Definition: glext.h:7522
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define GetCurrentProcess()
Definition: compat.h:507
HANDLE WINAPI OpenProcess(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwProcessId)
Definition: proc.c:1227
#define ARRAY_SIZE(a)
Definition: main.h:24
static IOleDocumentView * view
Definition: activex.c:1749
GLfloat GLfloat p
Definition: glext.h:8902
#define UnmapViewOfFile
Definition: compat.h:494
GLuint64EXT * result
Definition: glext.h:11304
BOOL WINAPI DuplicateHandle(IN HANDLE hSourceProcessHandle, IN HANDLE hSourceHandle, IN HANDLE hTargetProcessHandle, OUT LPHANDLE lpTargetHandle, IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwOptions)
Definition: handle.c:149
static const WCHAR lresult_atom_prefix[]
Definition: main.c:43

Referenced by AccessibleObjectFromWindow(), START_TEST(), and test_LresultFromObject().

◆ WindowFromAccessibleObject()

HRESULT WINAPI WindowFromAccessibleObject ( IAccessible ,
HWND  
)

Definition at line 372 of file main.c.

373 {
374  IDispatch *parent;
375  IOleWindow *ow;
376  HRESULT hres;
377 
378  TRACE("%p %p\n", acc, phwnd);
379 
380  IAccessible_AddRef(acc);
381  while(1) {
382  hres = IAccessible_QueryInterface(acc, &IID_IOleWindow, (void**)&ow);
383  if(SUCCEEDED(hres)) {
384  hres = IOleWindow_GetWindow(ow, phwnd);
385  IOleWindow_Release(ow);
386  IAccessible_Release(acc);
387  return hres;
388  }
389 
390  hres = IAccessible_get_accParent(acc, &parent);
391  IAccessible_Release(acc);
392  if(FAILED(hres))
393  return hres;
394  if(hres!=S_OK || !parent) {
395  *phwnd = NULL;
396  return hres;
397  }
398 
399  hres = IDispatch_QueryInterface(parent, &IID_IAccessible, (void**)&acc);
400  IDispatch_Release(parent);
401  if(FAILED(hres))
402  return hres;
403  }
404 }
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
r parent
Definition: btrfs.c:2944
LONG HRESULT
Definition: typedefs.h:79
#define S_OK
Definition: intsafe.h:51
const GUID IID_IOleWindow
#define SUCCEEDED(hr)
Definition: intsafe.h:49

Referenced by test_default_client_accessible_object().

Variable Documentation

◆ MSAAPROPID

STATE_SYSTEM_HASPOPUP typedef GUID MSAAPROPID

Definition at line 145 of file oleacc.idl.