Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kingjinni
wine
Commits
f9f59d10
Commit
f9f59d10
authored
1 year ago
by
Connor McAdams
Committed by
Alexandre Julliard
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
uiautomationcore: Implement IUIAutomationElement::get_CachedName.
Signed-off-by:
Connor McAdams
<
cmcadams@codeweavers.com
>
parent
e9e009b7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/uiautomationcore/tests/uiautomation.c
+6
-8
6 additions, 8 deletions
dlls/uiautomationcore/tests/uiautomation.c
dlls/uiautomationcore/uia_com_client.c
+19
-2
19 additions, 2 deletions
dlls/uiautomationcore/uia_com_client.c
with
25 additions
and
10 deletions
dlls/uiautomationcore/tests/uiautomation.c
+
6
−
8
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. */
...
...
This diff is collapsed.
Click to expand it.
dlls/uiautomationcore/uia_com_client.c
+
19
−
2
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment