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
959f785c
Commit
959f785c
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 LresultFromObject implementation.
parent
5953fefa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
3 deletions
+95
-3
Makefile.in
dlls/oleacc/Makefile.in
+1
-1
main.c
dlls/oleacc/main.c
+94
-2
No files found.
dlls/oleacc/Makefile.in
View file @
959f785c
MODULE
=
oleacc.dll
MODULE
=
oleacc.dll
IMPORTLIB
=
oleacc
IMPORTLIB
=
oleacc
IMPORTS
=
user32
IMPORTS
=
ole32
user32
C_SRCS
=
\
C_SRCS
=
\
main.c
main.c
...
...
dlls/oleacc/main.c
View file @
959f785c
...
@@ -18,6 +18,8 @@
...
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#define COBJMACROS
#include <stdarg.h>
#include <stdarg.h>
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
...
@@ -30,6 +32,8 @@
...
@@ -30,6 +32,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
oleacc
);
WINE_DEFAULT_DEBUG_CHANNEL
(
oleacc
);
static
const
WCHAR
lresult_atom_prefix
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
'_'
,
'o'
,
'l'
,
'e'
,
'a'
,
'c'
,
'c'
,
':'
};
static
HINSTANCE
oleacc_handle
=
0
;
static
HINSTANCE
oleacc_handle
=
0
;
HRESULT
WINAPI
CreateStdAccessibleObject
(
HWND
hwnd
,
LONG
idObject
,
HRESULT
WINAPI
CreateStdAccessibleObject
(
HWND
hwnd
,
LONG
idObject
,
...
@@ -48,8 +52,96 @@ HRESULT WINAPI ObjectFromLresult( LRESULT result, REFIID riid, WPARAM wParam, vo
...
@@ -48,8 +52,96 @@ HRESULT WINAPI ObjectFromLresult( LRESULT result, REFIID riid, WPARAM wParam, vo
LRESULT
WINAPI
LresultFromObject
(
REFIID
riid
,
WPARAM
wParam
,
LPUNKNOWN
pAcc
)
LRESULT
WINAPI
LresultFromObject
(
REFIID
riid
,
WPARAM
wParam
,
LPUNKNOWN
pAcc
)
{
{
FIXME
(
"%s %ld %p
\n
"
,
debugstr_guid
(
riid
),
wParam
,
pAcc
);
static
const
WCHAR
atom_fmt
[]
=
{
'%'
,
'0'
,
'8'
,
'x'
,
':'
,
'%'
,
'0'
,
'8'
,
'x'
,
':'
,
'%'
,
'0'
,
'8'
,
'x'
,
0
};
return
E_NOTIMPL
;
static
const
LARGE_INTEGER
seek_zero
=
{{
0
}};
WCHAR
atom_str
[
sizeof
(
lresult_atom_prefix
)
/
sizeof
(
WCHAR
)
+
3
*
8
+
3
];
IStream
*
stream
;
HANDLE
mapping
;
STATSTG
stat
;
HRESULT
hr
;
ATOM
atom
;
void
*
view
;
TRACE
(
"%s %ld %p
\n
"
,
debugstr_guid
(
riid
),
wParam
,
pAcc
);
if
(
wParam
)
FIXME
(
"unsupported wParam = %lx
\n
"
,
wParam
);
if
(
!
pAcc
)
return
E_INVALIDARG
;
hr
=
CreateStreamOnHGlobal
(
NULL
,
TRUE
,
&
stream
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
CoMarshalInterface
(
stream
,
riid
,
pAcc
,
MSHCTX_LOCAL
,
NULL
,
MSHLFLAGS_NORMAL
);
if
(
FAILED
(
hr
))
{
IStream_Release
(
stream
);
return
hr
;
}
hr
=
IStream_Seek
(
stream
,
seek_zero
,
STREAM_SEEK_SET
,
NULL
);
if
(
FAILED
(
hr
))
{
IStream_Release
(
stream
);
return
hr
;
}
hr
=
IStream_Stat
(
stream
,
&
stat
,
STATFLAG_NONAME
);
if
(
FAILED
(
hr
))
{
CoReleaseMarshalData
(
stream
);
IStream_Release
(
stream
);
return
hr
;
}
else
if
(
stat
.
cbSize
.
u
.
HighPart
)
{
FIXME
(
"stream size to big
\n
"
);
CoReleaseMarshalData
(
stream
);
IStream_Release
(
stream
);
return
E_NOTIMPL
;
}
mapping
=
CreateFileMappingW
(
INVALID_HANDLE_VALUE
,
NULL
,
PAGE_READWRITE
,
stat
.
cbSize
.
u
.
HighPart
,
stat
.
cbSize
.
u
.
LowPart
,
NULL
);
if
(
!
mapping
)
{
CoReleaseMarshalData
(
stream
);
IStream_Release
(
stream
);
return
hr
;
}
view
=
MapViewOfFile
(
mapping
,
FILE_MAP_WRITE
,
0
,
0
,
0
);
if
(
!
view
)
{
CloseHandle
(
mapping
);
CoReleaseMarshalData
(
stream
);
IStream_Release
(
stream
);
return
E_FAIL
;
}
hr
=
IStream_Read
(
stream
,
view
,
stat
.
cbSize
.
u
.
LowPart
,
NULL
);
UnmapViewOfFile
(
view
);
if
(
FAILED
(
hr
))
{
CloseHandle
(
mapping
);
hr
=
IStream_Seek
(
stream
,
seek_zero
,
STREAM_SEEK_SET
,
NULL
);
if
(
SUCCEEDED
(
hr
))
CoReleaseMarshalData
(
stream
);
IStream_Release
(
stream
);
return
hr
;
}
memcpy
(
atom_str
,
lresult_atom_prefix
,
sizeof
(
lresult_atom_prefix
));
sprintfW
(
atom_str
+
sizeof
(
lresult_atom_prefix
)
/
sizeof
(
WCHAR
),
atom_fmt
,
GetCurrentProcessId
(),
HandleToUlong
(
mapping
),
stat
.
cbSize
.
u
.
LowPart
);
atom
=
GlobalAddAtomW
(
atom_str
);
if
(
!
atom
)
{
CloseHandle
(
mapping
);
hr
=
IStream_Seek
(
stream
,
seek_zero
,
STREAM_SEEK_SET
,
NULL
);
if
(
SUCCEEDED
(
hr
))
CoReleaseMarshalData
(
stream
);
IStream_Release
(
stream
);
return
E_FAIL
;
}
IStream_Release
(
stream
);
return
atom
;
}
}
HRESULT
WINAPI
AccessibleObjectFromPoint
(
POINT
ptScreen
,
IAccessible
**
ppacc
,
VARIANT
*
pvarChild
)
HRESULT
WINAPI
AccessibleObjectFromPoint
(
POINT
ptScreen
,
IAccessible
**
ppacc
,
VARIANT
*
pvarChild
)
...
...
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