Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
1518851b
Commit
1518851b
authored
May 17, 2023
by
Connor McAdams
Committed by
Alexandre Julliard
Jun 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uiautomationcore: Clone UiaCacheRequest structure passed to UiaAddEvent.
Signed-off-by:
Connor McAdams
<
cmcadams@codeweavers.com
>
parent
8c41311a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
0 deletions
+50
-0
uia_event.c
dlls/uiautomationcore/uia_event.c
+5
-0
uia_private.h
dlls/uiautomationcore/uia_private.h
+3
-0
uia_utils.c
dlls/uiautomationcore/uia_utils.c
+42
-0
No files found.
dlls/uiautomationcore/uia_event.c
View file @
1518851b
...
...
@@ -194,6 +194,7 @@ static ULONG WINAPI uia_event_Release(IWineUiaEvent *iface)
assert
(
!
event
->
event_map_entry
);
SafeArrayDestroy
(
event
->
runtime_id
);
uia_cache_request_destroy
(
&
event
->
cache_req
);
for
(
i
=
0
;
i
<
event
->
event_advisers_count
;
i
++
)
IWineUiaEventAdviser_Release
(
event
->
event_advisers
[
i
]);
heap_free
(
event
->
event_advisers
);
...
...
@@ -457,6 +458,10 @@ HRESULT WINAPI UiaAddEvent(HUIANODE huianode, EVENTID event_id, UiaEventCallback
return
hr
;
}
hr
=
uia_cache_request_clone
(
&
event
->
cache_req
,
cache_req
);
if
(
FAILED
(
hr
))
goto
exit
;
hr
=
attach_event_to_uia_node
(
huianode
,
event
);
if
(
FAILED
(
hr
))
goto
exit
;
...
...
dlls/uiautomationcore/uia_private.h
View file @
1518851b
...
...
@@ -110,6 +110,7 @@ struct uia_event
struct
uia_event_map_entry
*
event_map_entry
;
LONG
event_defunct
;
struct
UiaCacheRequest
cache_req
;
UiaEventCallback
*
cback
;
};
...
...
@@ -186,6 +187,8 @@ HRESULT create_msaa_provider(IAccessible *acc, long child_id, HWND hwnd, BOOL kn
HRESULT
register_interface_in_git
(
IUnknown
*
iface
,
REFIID
riid
,
DWORD
*
ret_cookie
)
DECLSPEC_HIDDEN
;
HRESULT
unregister_interface_in_git
(
DWORD
git_cookie
)
DECLSPEC_HIDDEN
;
HRESULT
get_interface_in_git
(
REFIID
riid
,
DWORD
git_cookie
,
IUnknown
**
ret_iface
)
DECLSPEC_HIDDEN
;
void
uia_cache_request_destroy
(
struct
UiaCacheRequest
*
cache_req
)
DECLSPEC_HIDDEN
;
HRESULT
uia_cache_request_clone
(
struct
UiaCacheRequest
*
dst
,
struct
UiaCacheRequest
*
src
)
DECLSPEC_HIDDEN
;
HRESULT
get_safearray_dim_bounds
(
SAFEARRAY
*
sa
,
UINT
dim
,
LONG
*
lbound
,
LONG
*
elems
)
DECLSPEC_HIDDEN
;
HRESULT
get_safearray_bounds
(
SAFEARRAY
*
sa
,
LONG
*
lbound
,
LONG
*
elems
)
DECLSPEC_HIDDEN
;
int
uia_compare_safearrays
(
SAFEARRAY
*
sa1
,
SAFEARRAY
*
sa2
,
int
prop_type
)
DECLSPEC_HIDDEN
;
dlls/uiautomationcore/uia_utils.c
View file @
1518851b
...
...
@@ -98,6 +98,48 @@ HRESULT get_interface_in_git(REFIID riid, DWORD git_cookie, IUnknown **ret_iface
return
S_OK
;
}
/*
* UiaCacheRequest cloning functions.
*/
void
uia_cache_request_destroy
(
struct
UiaCacheRequest
*
cache_req
)
{
heap_free
(
cache_req
->
pProperties
);
heap_free
(
cache_req
->
pPatterns
);
}
HRESULT
uia_cache_request_clone
(
struct
UiaCacheRequest
*
dst
,
struct
UiaCacheRequest
*
src
)
{
FIXME
(
"Cache request condition cloning currently unimplemented
\n
"
);
dst
->
Scope
=
src
->
Scope
;
dst
->
automationElementMode
=
src
->
automationElementMode
;
if
(
src
->
cProperties
)
{
if
(
!
(
dst
->
pProperties
=
heap_alloc_zero
(
sizeof
(
*
dst
->
pProperties
)
*
src
->
cProperties
)))
{
uia_cache_request_destroy
(
dst
);
return
E_OUTOFMEMORY
;
}
dst
->
cProperties
=
src
->
cProperties
;
memcpy
(
dst
->
pProperties
,
src
->
pProperties
,
sizeof
(
*
dst
->
pProperties
)
*
dst
->
cProperties
);
}
if
(
src
->
cPatterns
)
{
if
(
!
(
dst
->
pPatterns
=
heap_alloc_zero
(
sizeof
(
*
dst
->
pPatterns
)
*
src
->
cPatterns
)))
{
uia_cache_request_destroy
(
dst
);
return
E_OUTOFMEMORY
;
}
dst
->
cPatterns
=
src
->
cPatterns
;
memcpy
(
dst
->
pPatterns
,
src
->
pPatterns
,
sizeof
(
*
dst
->
pPatterns
)
*
dst
->
cPatterns
);
}
return
S_OK
;
}
HRESULT
get_safearray_dim_bounds
(
SAFEARRAY
*
sa
,
UINT
dim
,
LONG
*
lbound
,
LONG
*
elems
)
{
LONG
ubound
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment