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
d7000d70
Commit
d7000d70
authored
Apr 25, 2014
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleacc: Add ObjectFromLresult implementation.
parent
959f785c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
2 deletions
+66
-2
main.c
dlls/oleacc/main.c
+66
-2
No files found.
dlls/oleacc/main.c
View file @
d7000d70
...
...
@@ -46,8 +46,72 @@ HRESULT WINAPI CreateStdAccessibleObject( HWND hwnd, LONG idObject,
HRESULT
WINAPI
ObjectFromLresult
(
LRESULT
result
,
REFIID
riid
,
WPARAM
wParam
,
void
**
ppObject
)
{
FIXME
(
"%ld %s %ld %p
\n
"
,
result
,
debugstr_guid
(
riid
),
wParam
,
ppObject
);
return
E_NOTIMPL
;
WCHAR
atom_str
[
sizeof
(
lresult_atom_prefix
)
/
sizeof
(
WCHAR
)
+
3
*
8
+
3
];
HANDLE
server_proc
,
server_mapping
,
mapping
;
DWORD
proc_id
,
size
;
IStream
*
stream
;
HGLOBAL
data
;
void
*
view
;
HRESULT
hr
;
WCHAR
*
p
;
TRACE
(
"%ld %s %ld %p
\n
"
,
result
,
debugstr_guid
(
riid
),
wParam
,
ppObject
);
if
(
wParam
)
FIXME
(
"unsupported wParam = %lx
\n
"
,
wParam
);
if
(
!
ppObject
)
return
E_INVALIDARG
;
*
ppObject
=
NULL
;
if
(
result
!=
(
ATOM
)
result
)
return
E_FAIL
;
if
(
!
GlobalGetAtomNameW
(
result
,
atom_str
,
sizeof
(
atom_str
)
/
sizeof
(
WCHAR
)))
return
E_FAIL
;
if
(
memcmp
(
atom_str
,
lresult_atom_prefix
,
sizeof
(
lresult_atom_prefix
)))
return
E_FAIL
;
p
=
atom_str
+
sizeof
(
lresult_atom_prefix
)
/
sizeof
(
WCHAR
);
proc_id
=
strtoulW
(
p
,
&
p
,
16
);
if
(
*
p
!=
':'
)
return
E_FAIL
;
server_mapping
=
ULongToHandle
(
strtoulW
(
p
+
1
,
&
p
,
16
)
);
if
(
*
p
!=
':'
)
return
E_FAIL
;
size
=
strtoulW
(
p
+
1
,
&
p
,
16
);
if
(
*
p
!=
0
)
return
E_FAIL
;
server_proc
=
OpenProcess
(
PROCESS_DUP_HANDLE
,
FALSE
,
proc_id
);
if
(
!
server_proc
)
return
E_FAIL
;
if
(
!
DuplicateHandle
(
server_proc
,
server_mapping
,
GetCurrentProcess
(),
&
mapping
,
0
,
FALSE
,
DUPLICATE_CLOSE_SOURCE
|
DUPLICATE_SAME_ACCESS
))
return
E_FAIL
;
CloseHandle
(
server_proc
);
GlobalDeleteAtom
(
result
);
view
=
MapViewOfFile
(
mapping
,
FILE_MAP_READ
,
0
,
0
,
0
);
CloseHandle
(
mapping
);
if
(
!
view
)
return
E_FAIL
;
data
=
GlobalAlloc
(
GMEM_FIXED
,
size
);
memcpy
(
data
,
view
,
size
);
UnmapViewOfFile
(
view
);
if
(
!
data
)
return
E_OUTOFMEMORY
;
hr
=
CreateStreamOnHGlobal
(
data
,
TRUE
,
&
stream
);
if
(
FAILED
(
hr
))
{
GlobalFree
(
data
);
return
hr
;
}
hr
=
CoUnmarshalInterface
(
stream
,
riid
,
ppObject
);
IStream_Release
(
stream
);
return
hr
;
}
LRESULT
WINAPI
LresultFromObject
(
REFIID
riid
,
WPARAM
wParam
,
LPUNKNOWN
pAcc
)
...
...
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