ReactOS 0.4.15-dev-7931-gfd331f1
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 GUID MSAAPROPID
 
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 **)
 
UINT WINAPI GetRoleTextA (DWORD, LPSTR, UINT)
 
UINT WINAPI GetRoleTextW (DWORD, LPWSTR, UINT)
 
UINT WINAPI GetStateTextA (DWORD, LPSTR, UINT)
 
UINT WINAPI GetStateTextW (DWORD, LPWSTR, UINT)
 

Macro Definition Documentation

◆ threading

#define threading (   model)

Definition at line 22 of file oleacc.idl.

Typedef Documentation

◆ AnnoScope

◆ MSAAPROPID

typedef GUID MSAAPROPID

Definition at line 148 of file oleacc.idl.

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:151
@ ANNO_CONTAINER
Definition: oleacc.idl:153
@ ANNO_THIS
Definition: oleacc.idl:152

Function Documentation

◆ AccessibleChildren()

HRESULT WINAPI AccessibleChildren ( IAccessible container,
LONG  start,
LONG  count,
VARIANT children,
LONG children_cnt 
)

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}
#define E_INVALIDARG
Definition: ddrawi.h:101
@ VT_I4
Definition: compat.h:2298
@ VT_DISPATCH
Definition: compat.h:2304
GLuint start
Definition: gl.h:1545
GLuint GLuint GLsizei count
Definition: gl.h:1545
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
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define V_VT(A)
Definition: oleauto.h:211
#define V_I4(A)
Definition: oleauto.h:247
#define V_DISPATCH(A)
Definition: oleauto.h:239
long LONG
Definition: pedump.c:60
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
uint32_t ULONG
Definition: typedefs.h:59
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:568
#define S_FALSE
Definition: winerror.h:2357

Referenced by test_AccessibleChildren().

◆ AccessibleObjectFromEvent()

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

◆ AccessibleObjectFromPoint()

HRESULT WINAPI AccessibleObjectFromPoint ( POINT  ptScreen,
IAccessible **  ppacc,
VARIANT pvarChild 
)

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
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48

◆ AccessibleObjectFromWindow()

HRESULT WINAPI AccessibleObjectFromWindow ( HWND  hwnd,
DWORD  dwObjectID,
REFIID  riid,
void **  ppvObject 
)

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}
#define NULL
Definition: types.h:112
HRESULT WINAPI ObjectFromLresult(LRESULT result, REFIID riid, WPARAM wParam, void **ppObject)
Definition: main.c:177
HRESULT WINAPI CreateStdAccessibleObject(HWND hwnd, LONG idObject, REFIID riidInterface, void **ppvObject)
Definition: main.c:154
REFIID riid
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LRESULT
Definition: windef.h:209
BOOL WINAPI IsWindow(_In_opt_ HWND)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

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

◆ CreateStdAccessibleObject()

HRESULT WINAPI CreateStdAccessibleObject ( HWND  hwnd,
LONG  idObject,
REFIID  riidInterface,
void **  ppvObject 
)

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}
HRESULT create_client_object(HWND hwnd, const IID *iid, void **obj)
Definition: client.c:625
HRESULT(WINAPI * accessible_create)(HWND, const IID *, void **)
Definition: main.c:54
static accessible_create get_builtin_accessible_obj(HWND hwnd, LONG objid)
Definition: main.c:111
static const struct access_res create[16]
Definition: package.c:7644
HRESULT create_window_object(HWND, const IID *, void **) DECLSPEC_HIDDEN
Definition: window.c:414
#define OBJID_CLIENT
Definition: winable.h:19
#define OBJID_WINDOW
Definition: winable.h:15

Referenced by AccessibleObjectFromWindow(), CTipbarAccessible::Initialize(), 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 pVersion,
DWORD pBuild 
)

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()

UINT WINAPI GetRoleTextA ( DWORD  role,
LPSTR  lpRole,
UINT  rolemax 
)

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 GetProcessHeap()
Definition: compat.h:736
#define CP_ACP
Definition: compat.h:109
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define WideCharToMultiByte
Definition: compat.h:111
UINT WINAPI GetRoleTextW(DWORD role, LPWSTR lpRole, UINT rolemax)
Definition: main.c:471
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
unsigned int UINT
Definition: ndis.h:50
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by test_getroletext().

◆ GetRoleTextW()

UINT WINAPI GetRoleTextW ( DWORD  role,
LPWSTR  lpRole,
UINT  rolemax 
)

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}
static HINSTANCE oleacc_handle
Definition: main.c:98
int32_t INT
Definition: typedefs.h:58
int ret
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by GetRoleTextA(), and test_getroletext().

◆ GetStateTextA()

UINT WINAPI GetStateTextA ( DWORD  ,
LPSTR  ,
UINT   
)

◆ GetStateTextW()

UINT WINAPI GetStateTextW ( DWORD  ,
LPWSTR  ,
UINT   
)

◆ LresultFromObject()

LRESULT WINAPI LresultFromObject ( REFIID  riid,
WPARAM  wParam,
LPUNKNOWN  pAcc 
)

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];
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
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}
#define stat
Definition: acwin.h:99
#define ARRAY_SIZE(A)
Definition: main.h:33
#define HandleToUlong(h)
Definition: basetsd.h:79
WPARAM wParam
Definition: combotst.c:138
#define E_FAIL
Definition: ddrawi.h:102
WORD ATOM
Definition: dimm.idl:113
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:739
#define UnmapViewOfFile
Definition: compat.h:746
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CreateFileMappingW(a, b, c, d, e, f)
Definition: compat.h:744
#define MapViewOfFile
Definition: compat.h:745
ATOM WINAPI GlobalAddAtomW(LPCWSTR lpString)
Definition: atom.c:444
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
HRESULT WINAPI CoReleaseMarshalData(IStream *pStream)
Definition: marshal.c:2055
HRESULT WINAPI CoMarshalInterface(IStream *pStream, REFIID riid, IUnknown *pUnk, DWORD dwDestContext, void *pvDestContext, DWORD mshlFlags)
Definition: marshal.c:1876
static const WCHAR lresult_atom_prefix[]
Definition: main.c:43
#define swprintf
Definition: precomp.h:40
GLenum GLenum GLenum GLenum mapping
Definition: glext.h:9031
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define PAGE_READWRITE
Definition: nt_native.h:1304
Definition: stat.h:55
Definition: parse.h:23
#define FILE_MAP_WRITE
Definition: winbase.h:154
DWORD WINAPI GetCurrentProcessId(void)
Definition: proc.c:1158

Referenced by test_LresultFromObject(), and test_window_proc().

◆ ObjectFromLresult()

HRESULT WINAPI ObjectFromLresult ( LRESULT  result,
REFIID  riid,
WPARAM  wParam,
void **  ppObject 
)

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;
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)) {
241 return hr;
242 }
243
244 hr = CoUnmarshalInterface(stream, riid, ppObject);
245 IStream_Release(stream);
246 return hr;
247}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
#define ULongToHandle(h)
Definition: basetsd.h:81
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define FALSE
Definition: types.h:117
#define GetCurrentProcess()
Definition: compat.h:759
#define FILE_MAP_READ
Definition: compat.h:776
UINT WINAPI GlobalGetAtomNameW(ATOM nAtom, LPWSTR lpBuffer, int nSize)
Definition: atom.c:496
ATOM WINAPI GlobalDeleteAtom(ATOM nAtom)
Definition: atom.c:454
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
HANDLE WINAPI OpenProcess(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwProcessId)
Definition: proc.c:1227
HRESULT WINAPI CoUnmarshalInterface(IStream *pStream, REFIID riid, LPVOID *ppv)
Definition: marshal.c:1981
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
GLfloat GLfloat p
Definition: glext.h:8902
GLuint64EXT * result
Definition: glext.h:11304
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
Definition: heapmem.c:611
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
_Check_return_ unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
#define PROCESS_DUP_HANDLE
#define GMEM_FIXED
Definition: winbase.h:293
#define DUPLICATE_SAME_ACCESS
#define DUPLICATE_CLOSE_SOURCE

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

◆ WindowFromAccessibleObject()

HRESULT WINAPI WindowFromAccessibleObject ( IAccessible acc,
HWND phwnd 
)

Definition at line 372 of file main.c.

373{
375 IOleWindow *ow;
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}
r parent
Definition: btrfs.c:3010
HRESULT hres
Definition: protocol.c:465
const GUID IID_IOleWindow

Referenced by test_default_client_accessible_object().