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
2ce06e57
Commit
2ce06e57
authored
Feb 25, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Fix SafeArrayGetElement() for FADF_RECORD arrays.
parent
4c02dc86
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
8 deletions
+22
-8
safearray.c
dlls/oleaut32/safearray.c
+16
-8
safearray.c
dlls/oleaut32/tests/safearray.c
+6
-0
No files found.
dlls/oleaut32/safearray.c
View file @
2ce06e57
...
@@ -990,18 +990,26 @@ HRESULT WINAPI SafeArrayGetElement(SAFEARRAY *psa, LONG *rgIndices, void *pvData
...
@@ -990,18 +990,26 @@ HRESULT WINAPI SafeArrayGetElement(SAFEARRAY *psa, LONG *rgIndices, void *pvData
else
else
*
lpDest
=
NULL
;
*
lpDest
=
NULL
;
}
}
else
else
if
(
psa
->
fFeatures
&
(
FADF_UNKNOWN
|
FADF_DISPATCH
))
{
{
if
(
psa
->
fFeatures
&
(
FADF_UNKNOWN
|
FADF_DISPATCH
))
IUnknown
**
src_unk
=
lpvSrc
;
{
IUnknown
**
dest_unk
=
pvData
;
LPUNKNOWN
*
lpUnknown
=
lpvSrc
;
if
(
*
lpUnknown
)
if
(
*
src_unk
)
IUnknown_AddRef
(
*
lpUnknown
);
IUnknown_AddRef
(
*
src_unk
);
}
*
dest_unk
=
*
src_unk
;
}
else
if
(
psa
->
fFeatures
&
FADF_RECORD
)
{
IRecordInfo
*
record
;
SafeArrayGetRecordInfo
(
psa
,
&
record
);
hRet
=
IRecordInfo_RecordCopy
(
record
,
lpvSrc
,
pvData
);
IRecordInfo_Release
(
record
);
}
else
/* Copy the data over */
/* Copy the data over */
memcpy
(
pvData
,
lpvSrc
,
psa
->
cbElements
);
memcpy
(
pvData
,
lpvSrc
,
psa
->
cbElements
);
}
}
}
SafeArrayUnlock
(
psa
);
SafeArrayUnlock
(
psa
);
}
}
...
...
dlls/oleaut32/tests/safearray.c
View file @
2ce06e57
...
@@ -1203,6 +1203,12 @@ static void test_SafeArrayGetPutElement(void)
...
@@ -1203,6 +1203,12 @@ static void test_SafeArrayGetPutElement(void)
ok
(
hres
==
S_OK
,
"got 0x%08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"got 0x%08x
\n
"
,
hres
);
ok
(
irec
->
recordcopy
==
1
,
"got %d
\n
"
,
irec
->
recordcopy
);
ok
(
irec
->
recordcopy
==
1
,
"got %d
\n
"
,
irec
->
recordcopy
);
index
=
0
;
irec
->
recordcopy
=
0
;
hres
=
SafeArrayGetElement
(
sa
,
&
index
,
(
void
*
)
0xdeadbeef
);
ok
(
hres
==
S_OK
,
"got 0x%08x
\n
"
,
hres
);
ok
(
irec
->
recordcopy
==
1
,
"got %d
\n
"
,
irec
->
recordcopy
);
hres
=
SafeArrayDestroy
(
sa
);
hres
=
SafeArrayDestroy
(
sa
);
ok
(
hres
==
S_OK
,
"got 0x%08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"got 0x%08x
\n
"
,
hres
);
ok
(
irec
->
ref
==
1
,
"got %d
\n
"
,
irec
->
ref
);
ok
(
irec
->
ref
==
1
,
"got %d
\n
"
,
irec
->
ref
);
...
...
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