Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
c31e5313
Commit
c31e5313
authored
Feb 03, 2023
by
Connor McAdams
Committed by
Alexandre Julliard
Feb 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uiautomationcore: Implement IUIAutomationElement::get_CurrentName.
Signed-off-by:
Connor McAdams
<
cmcadams@codeweavers.com
>
parent
0b487338
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
2 deletions
+35
-2
uiautomation.c
dlls/uiautomationcore/tests/uiautomation.c
+20
-0
uia_com_client.c
dlls/uiautomationcore/uia_com_client.c
+15
-2
No files found.
dlls/uiautomationcore/tests/uiautomation.c
View file @
c31e5313
...
...
@@ -9796,6 +9796,7 @@ static void test_Element_GetPropertyValue(IUIAutomation *uia_iface)
IUIAutomationElement
*
element
;
int
i
,
prop_id
,
tmp_int
;
IUnknown
*
unk_ns
;
BSTR
tmp_bstr
;
HRESULT
hr
;
VARIANT
v
;
...
...
@@ -9885,6 +9886,25 @@ static void test_Element_GetPropertyValue(IUIAutomation *uia_iface)
set_provider_prop_override
(
&
Provider
,
NULL
,
0
);
ok_method_sequence
(
get_prop_seq
,
NULL
);
/*
* IUIAutomationElement_get_CurrentName tests.
*/
tmp_bstr
=
NULL
;
hr
=
IUIAutomationElement_get_CurrentName
(
element
,
&
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
);
ok_method_sequence
(
get_prop_seq
,
NULL
);
tmp_bstr
=
NULL
;
Provider
.
ret_invalid_prop_type
=
TRUE
;
hr
=
IUIAutomationElement_get_CurrentName
(
element
,
&
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
);
Provider
.
ret_invalid_prop_type
=
FALSE
;
ok_method_sequence
(
get_prop_invalid_type_seq
,
NULL
);
IUIAutomationElement_Release
(
element
);
ok
(
Provider
.
ref
==
1
,
"Unexpected refcnt %ld
\n
"
,
Provider
.
ref
);
...
...
dlls/uiautomationcore/uia_com_client.c
View file @
c31e5313
...
...
@@ -269,8 +269,21 @@ static HRESULT WINAPI uia_element_get_CurrentLocalizedControlType(IUIAutomationE
static
HRESULT
WINAPI
uia_element_get_CurrentName
(
IUIAutomationElement9
*
iface
,
BSTR
*
ret_val
)
{
FIXME
(
"%p: stub
\n
"
,
iface
);
return
E_NOTIMPL
;
struct
uia_element
*
element
=
impl_from_IUIAutomationElement9
(
iface
);
HRESULT
hr
;
VARIANT
v
;
TRACE
(
"%p, %p
\n
"
,
iface
,
ret_val
);
VariantInit
(
&
v
);
hr
=
UiaGetPropertyValue
(
element
->
node
,
UIA_NamePropertyId
,
&
v
);
if
(
SUCCEEDED
(
hr
)
&&
V_VT
(
&
v
)
==
VT_BSTR
&&
V_BSTR
(
&
v
))
*
ret_val
=
SysAllocString
(
V_BSTR
(
&
v
));
else
*
ret_val
=
SysAllocString
(
L""
);
VariantClear
(
&
v
);
return
hr
;
}
static
HRESULT
WINAPI
uia_element_get_CurrentAcceleratorKey
(
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