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
d8467aee
Commit
d8467aee
authored
May 03, 2014
by
Piotr Caban
Committed by
Alexandre Julliard
May 05, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleacc: Add GetProcessHandleFromHwnd implementation.
parent
8192f549
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
0 deletions
+40
-0
main.c
dlls/oleacc/main.c
+12
-0
oleacc.spec
dlls/oleacc/oleacc.spec
+1
-0
main.c
dlls/oleacc/tests/main.c
+27
-0
No files found.
dlls/oleacc/main.c
View file @
d8467aee
...
...
@@ -332,6 +332,18 @@ void WINAPI GetOleaccVersionInfo(DWORD* pVersion, DWORD* pBuild)
*
pBuild
=
MAKELONG
(
0
,
0
);
}
HANDLE
WINAPI
GetProcessHandleFromHwnd
(
HWND
hwnd
)
{
DWORD
proc_id
;
TRACE
(
"%p
\n
"
,
hwnd
);
if
(
!
GetWindowThreadProcessId
(
hwnd
,
&
proc_id
))
return
NULL
;
return
OpenProcess
(
PROCESS_DUP_HANDLE
|
PROCESS_VM_OPERATION
|
PROCESS_VM_READ
|
PROCESS_VM_WRITE
|
SYNCHRONIZE
,
TRUE
,
proc_id
);
}
UINT
WINAPI
GetRoleTextW
(
DWORD
role
,
LPWSTR
lpRole
,
UINT
rolemax
)
{
INT
ret
;
...
...
dlls/oleacc/oleacc.spec
View file @
d8467aee
...
...
@@ -9,6 +9,7 @@
@ stdcall -private DllRegisterServer()
@ stdcall -private DllUnregisterServer()
@ stdcall GetOleaccVersionInfo(ptr ptr)
@ stdcall GetProcessHandleFromHwnd(ptr)
@ stdcall GetRoleTextA(long ptr long)
@ stdcall GetRoleTextW(long ptr long)
@ stub GetStateTextA
...
...
dlls/oleacc/tests/main.c
View file @
d8467aee
...
...
@@ -279,6 +279,32 @@ static void test_AccessibleObjectFromWindow(void)
DestroyWindow
(
hwnd
);
}
static
void
test_GetProcessHandleFromHwnd
(
void
)
{
HANDLE
(
WINAPI
*
pGetProcessHandleFromHwnd
)(
HWND
);
HANDLE
proc
;
HWND
hwnd
;
pGetProcessHandleFromHwnd
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"oleacc.dll"
),
"GetProcessHandleFromHwnd"
);
if
(
!
pGetProcessHandleFromHwnd
)
{
win_skip
(
"GetProcessHandleFromHwnd not available
\n
"
);
return
;
}
proc
=
pGetProcessHandleFromHwnd
(
NULL
);
ok
(
!
proc
,
"proc = %p
\n
"
,
proc
);
hwnd
=
CreateWindowA
(
"static"
,
""
,
0
,
0
,
0
,
0
,
0
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
hwnd
!=
NULL
,
"CreateWindow failed
\n
"
);
proc
=
pGetProcessHandleFromHwnd
(
hwnd
);
ok
(
proc
!=
NULL
,
"proc == NULL
\n
"
);
CloseHandle
(
proc
);
DestroyWindow
(
hwnd
);
}
static
void
test_default_client_accessible_object
(
void
)
{
static
const
WCHAR
testW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
' '
,
't'
,
' '
,
'&'
,
'j'
,
'u'
,
'n'
,
'k'
,
0
};
...
...
@@ -417,6 +443,7 @@ START_TEST(main)
test_getroletext
();
test_LresultFromObject
(
argv
[
0
]);
test_AccessibleObjectFromWindow
();
test_GetProcessHandleFromHwnd
();
test_default_client_accessible_object
();
unregister_window_class
();
...
...
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