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
da98b1cb
Commit
da98b1cb
authored
Jun 22, 2007
by
Huw Davies
Committed by
Alexandre Julliard
Jun 25, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Handle marshaling of VARTYPE-less FADF_VARIANT safearrays.
parent
3c8534f0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
usrmarshal.c
dlls/oleaut32/tests/usrmarshal.c
+25
-0
usrmarshal.c
dlls/oleaut32/usrmarshal.c
+2
-0
No files found.
dlls/oleaut32/tests/usrmarshal.c
View file @
da98b1cb
...
...
@@ -49,6 +49,8 @@ static inline SF_TYPE get_union_type(SAFEARRAY *psa)
hr
=
SafeArrayGetVartype
(
psa
,
&
vt
);
if
(
FAILED
(
hr
))
{
if
(
psa
->
fFeatures
&
FADF_VARIANT
)
return
SF_VARIANT
;
switch
(
psa
->
cbElements
)
{
case
1
:
vt
=
VT_I1
;
break
;
...
...
@@ -264,6 +266,29 @@ static void test_marshal_LPSAFEARRAY(void)
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
SafeArrayDestroyData
(
lpsa
);
SafeArrayDestroyDescriptor
(
lpsa
);
/* VARTYPE-less arrays with FADF_VARIANT */
hr
=
SafeArrayAllocDescriptor
(
1
,
&
lpsa
);
ok
(
hr
==
S_OK
,
"saad failed %08x
\n
"
,
hr
);
lpsa
->
cbElements
=
16
;
lpsa
->
fFeatures
=
FADF_VARIANT
;
lpsa
->
rgsabound
[
0
].
lLbound
=
2
;
lpsa
->
rgsabound
[
0
].
cElements
=
48
;
hr
=
SafeArrayAllocData
(
lpsa
);
ok
(
hr
==
S_OK
,
"saad failed %08x
\n
"
,
hr
);
hr
=
SafeArrayGetVartype
(
lpsa
,
&
vt
);
ok
(
hr
==
E_INVALIDARG
,
"ret %08x
\n
"
,
hr
);
size
=
LPSAFEARRAY_UserSize
(
&
umcb
.
Flags
,
0
,
&
lpsa
);
todo_wine
ok
(
size
==
1388
,
"size %ld
\n
"
,
size
);
buffer
=
(
unsigned
char
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
LPSAFEARRAY_UserMarshal
(
&
umcb
.
Flags
,
buffer
,
&
lpsa
);
check_safearray
(
buffer
,
lpsa
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
SafeArrayDestroyData
(
lpsa
);
SafeArrayDestroyDescriptor
(
lpsa
);
}
static
void
check_bstr
(
void
*
buffer
,
BSTR
b
)
...
...
dlls/oleaut32/usrmarshal.c
View file @
da98b1cb
...
...
@@ -711,6 +711,8 @@ static inline SF_TYPE SAFEARRAY_GetUnionType(SAFEARRAY *psa)
hr
=
SafeArrayGetVartype
(
psa
,
&
vt
);
if
(
FAILED
(
hr
))
{
if
(
psa
->
fFeatures
&
FADF_VARIANT
)
return
SF_VARIANT
;
switch
(
psa
->
cbElements
)
{
case
1
:
vt
=
VT_I1
;
break
;
...
...
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