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
47ae95cc
Commit
47ae95cc
authored
Apr 07, 2009
by
Rob Shearman
Committed by
Alexandre Julliard
Apr 07, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Fix the SAFEARRAY marshalling on 64-bit platforms.
The pointers should be written as NDR 4-byte fields instead of a platform-dependent size.
parent
ce747f3f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
usrmarshal.c
dlls/oleaut32/tests/usrmarshal.c
+2
-2
usrmarshal.c
dlls/oleaut32/usrmarshal.c
+11
-11
No files found.
dlls/oleaut32/tests/usrmarshal.c
View file @
47ae95cc
...
...
@@ -146,8 +146,8 @@ static void check_safearray(void *buffer, LPSAFEARRAY lpsa)
wiresa
+=
sizeof
(
DWORD
);
ok
(
*
(
DWORD
*
)
wiresa
==
cell_count
,
"wiresa + 0x1c should be %u instead of %u
\n
"
,
cell_count
,
*
(
DWORD
*
)
wiresa
);
wiresa
+=
sizeof
(
DWORD
);
ok
(
*
(
DWORD
_PTR
*
)
wiresa
==
(
DWORD_PTR
)
lpsa
->
pvData
,
"wiresa + 0x20 should be lpsa->pvData instead of 0x%08lx
\n
"
,
*
(
DWORD_PTR
*
)
wiresa
);
wiresa
+=
sizeof
(
DWORD
_PTR
);
ok
(
*
(
DWORD
*
)
wiresa
,
"wiresa + 0x20 should be non-zero instead of 0x%08x
\n
"
,
*
(
DWORD
*
)
wiresa
);
wiresa
+=
sizeof
(
DWORD
);
if
(
sftype
==
SF_HAVEIID
)
{
GUID
guid
;
...
...
dlls/oleaut32/usrmarshal.c
View file @
47ae95cc
...
...
@@ -755,7 +755,7 @@ ULONG WINAPI LPSAFEARRAY_UserSize(ULONG *pFlags, ULONG StartingSize, LPSAFEARRAY
TRACE
(
"("
);
dump_user_flags
(
pFlags
);
TRACE
(
", %d, %p
\n
"
,
StartingSize
,
*
ppsa
);
ALIGN_LENGTH
(
size
,
3
);
size
+=
sizeof
(
ULONG
_PTR
);
size
+=
sizeof
(
ULONG
);
if
(
*
ppsa
)
{
SAFEARRAY
*
psa
=
*
ppsa
;
...
...
@@ -770,7 +770,7 @@ ULONG WINAPI LPSAFEARRAY_UserSize(ULONG *pFlags, ULONG StartingSize, LPSAFEARRAY
size
+=
sizeof
(
ULONG
);
size
+=
sizeof
(
ULONG
);
size
+=
sizeof
(
ULONG
_PTR
);
size
+=
sizeof
(
ULONG
);
if
(
sftype
==
SF_HAVEIID
)
size
+=
sizeof
(
IID
);
...
...
@@ -843,8 +843,8 @@ unsigned char * WINAPI LPSAFEARRAY_UserMarshal(ULONG *pFlags, unsigned char *Buf
TRACE
(
"("
);
dump_user_flags
(
pFlags
);
TRACE
(
", %p, &%p
\n
"
,
Buffer
,
*
ppsa
);
ALIGN_POINTER
(
Buffer
,
3
);
*
(
ULONG
_PTR
*
)
Buffer
=
*
ppsa
?
TRUE
:
FALSE
;
Buffer
+=
sizeof
(
ULONG
_PTR
);
*
(
ULONG
*
)
Buffer
=
*
ppsa
?
0x1
:
0x0
;
Buffer
+=
sizeof
(
ULONG
);
if
(
*
ppsa
)
{
VARTYPE
vt
;
...
...
@@ -874,8 +874,8 @@ unsigned char * WINAPI LPSAFEARRAY_UserMarshal(ULONG *pFlags, unsigned char *Buf
*
(
ULONG
*
)
Buffer
=
ulCellCount
;
Buffer
+=
sizeof
(
ULONG
);
*
(
ULONG
_PTR
*
)
Buffer
=
(
ULONG_PTR
)
psa
->
pvData
;
Buffer
+=
sizeof
(
ULONG
_PTR
);
*
(
ULONG
*
)
Buffer
=
psa
->
pvData
?
0x2
:
0x0
;
Buffer
+=
sizeof
(
ULONG
);
if
(
sftype
==
SF_HAVEIID
)
{
SafeArrayGetIID
(
psa
,
&
guid
);
...
...
@@ -958,7 +958,7 @@ unsigned char * WINAPI LPSAFEARRAY_UserMarshal(ULONG *pFlags, unsigned char *Buf
unsigned
char
*
WINAPI
LPSAFEARRAY_UserUnmarshal
(
ULONG
*
pFlags
,
unsigned
char
*
Buffer
,
LPSAFEARRAY
*
ppsa
)
{
ULONG
_PTR
ptr
;
ULONG
ptr
;
wireSAFEARRAY
wiresa
;
ULONG
cDims
;
HRESULT
hr
;
...
...
@@ -971,8 +971,8 @@ unsigned char * WINAPI LPSAFEARRAY_UserUnmarshal(ULONG *pFlags, unsigned char *B
TRACE
(
"("
);
dump_user_flags
(
pFlags
);
TRACE
(
", %p, %p
\n
"
,
Buffer
,
ppsa
);
ALIGN_POINTER
(
Buffer
,
3
);
ptr
=
*
(
ULONG
_PTR
*
)
Buffer
;
Buffer
+=
sizeof
(
ULONG
_PTR
);
ptr
=
*
(
ULONG
*
)
Buffer
;
Buffer
+=
sizeof
(
ULONG
);
if
(
!
ptr
)
{
...
...
@@ -1001,8 +1001,8 @@ unsigned char * WINAPI LPSAFEARRAY_UserUnmarshal(ULONG *pFlags, unsigned char *B
cell_count
=
*
(
ULONG
*
)
Buffer
;
Buffer
+=
sizeof
(
ULONG
);
ptr
=
*
(
ULONG
_PTR
*
)
Buffer
;
Buffer
+=
sizeof
(
ULONG
_PTR
);
ptr
=
*
(
ULONG
*
)
Buffer
;
Buffer
+=
sizeof
(
ULONG
);
if
(
sftype
==
SF_HAVEIID
)
{
memcpy
(
&
guid
,
Buffer
,
sizeof
(
guid
));
...
...
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