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
f9f59d10
Commit
f9f59d10
authored
Sep 21, 2023
by
Connor McAdams
Committed by
Alexandre Julliard
Oct 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uiautomationcore: Implement IUIAutomationElement::get_CachedName.
Signed-off-by:
Connor McAdams
<
cmcadams@codeweavers.com
>
parent
e9e009b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
10 deletions
+25
-10
uiautomation.c
dlls/uiautomationcore/tests/uiautomation.c
+6
-8
uia_com_client.c
dlls/uiautomationcore/uia_com_client.c
+19
-2
No files found.
dlls/uiautomationcore/tests/uiautomation.c
View file @
f9f59d10
...
...
@@ -13635,25 +13635,23 @@ static void test_Element_cache_methods(IUIAutomation *uia_iface)
/* Cached UIA_NamePropertyId helper. */
hr
=
IUIAutomationElement_get_CachedName
(
element
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#lx.
\n
"
,
hr
);
tmp_bstr
=
(
void
*
)
0xdeadbeef
;
hr
=
IUIAutomationElement_get_CachedName
(
element
,
&
tmp_bstr
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
tmp_bstr
==
(
void
*
)
0xdeadbeef
,
"Unexpected BSTR ptr %p
\n
"
,
tmp_bstr
);
tmp_bstr
=
NULL
;
hr
=
IUIAutomationElement_get_CachedName
(
element2
,
&
tmp_bstr
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
ok
(
!
lstrcmpW
(
tmp_bstr
,
L""
),
"Unexpected BSTR %s
\n
"
,
wine_dbgstr_w
(
tmp_bstr
));
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
tmp_bstr
,
L""
),
"Unexpected BSTR %s
\n
"
,
wine_dbgstr_w
(
tmp_bstr
));
SysFreeString
(
tmp_bstr
);
tmp_bstr
=
NULL
;
hr
=
IUIAutomationElement_get_CachedName
(
element3
,
&
tmp_bstr
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
ok
(
!
lstrcmpW
(
tmp_bstr
,
uia_bstr_prop_str
),
"Unexpected BSTR %s
\n
"
,
wine_dbgstr_w
(
tmp_bstr
));
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
tmp_bstr
,
uia_bstr_prop_str
),
"Unexpected BSTR %s
\n
"
,
wine_dbgstr_w
(
tmp_bstr
));
SysFreeString
(
tmp_bstr
);
/* Cached UIA_ControlTypePropertyId. */
...
...
dlls/uiautomationcore/uia_com_client.c
View file @
f9f59d10
...
...
@@ -2424,8 +2424,25 @@ static HRESULT WINAPI uia_element_get_CachedLocalizedControlType(IUIAutomationEl
static
HRESULT
WINAPI
uia_element_get_CachedName
(
IUIAutomationElement9
*
iface
,
BSTR
*
ret_val
)
{
FIXME
(
"%p: stub
\n
"
,
iface
);
return
E_NOTIMPL
;
struct
uia_element
*
element
=
impl_from_IUIAutomationElement9
(
iface
);
struct
uia_cache_property
*
cache_prop
=
NULL
;
const
int
prop_id
=
UIA_NamePropertyId
;
TRACE
(
"%p, %p
\n
"
,
iface
,
ret_val
);
if
(
!
ret_val
)
return
E_POINTER
;
if
(
!
(
cache_prop
=
bsearch
(
&
prop_id
,
element
->
cached_props
,
element
->
cached_props_count
,
sizeof
(
*
cache_prop
),
uia_cached_property_id_compare
)))
return
E_INVALIDARG
;
if
((
V_VT
(
&
cache_prop
->
prop_val
)
==
VT_BSTR
)
&&
V_BSTR
(
&
cache_prop
->
prop_val
))
*
ret_val
=
SysAllocString
(
V_BSTR
(
&
cache_prop
->
prop_val
));
else
*
ret_val
=
SysAllocString
(
L""
);
return
S_OK
;
}
static
HRESULT
WINAPI
uia_element_get_CachedAcceleratorKey
(
IUIAutomationElement9
*
iface
,
BSTR
*
ret_val
)
...
...
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