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
91d91afb
Commit
91d91afb
authored
Sep 24, 2010
by
Andrew Eikum
Committed by
Alexandre Julliard
Sep 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Create a FORMATETC if one is not given in OleCreate.
parent
7bba6234
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletion
+38
-1
ole2.c
dlls/ole32/ole2.c
+13
-1
ole2.c
dlls/ole32/tests/ole2.c
+25
-0
No files found.
dlls/ole32/ole2.c
View file @
91d91afb
...
...
@@ -2530,7 +2530,19 @@ HRESULT WINAPI OleCreate(
if
(
SUCCEEDED
(
hres2
))
{
DWORD
dwConnection
;
hres
=
IOleCache_Cache
(
pOleCache
,
pFormatEtc
,
ADVF_PRIMEFIRST
,
&
dwConnection
);
FORMATETC
*
pfe
;
if
(
renderopt
==
OLERENDER_DRAW
&&
!
pFormatEtc
)
{
pfe
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FORMATETC
));
pfe
->
cfFormat
=
0
;
pfe
->
ptd
=
NULL
;
pfe
->
dwAspect
=
DVASPECT_CONTENT
;
pfe
->
lindex
=
-
1
;
pfe
->
tymed
=
TYMED_NULL
;
}
else
pfe
=
pFormatEtc
;
hres
=
IOleCache_Cache
(
pOleCache
,
pfe
,
ADVF_PRIMEFIRST
,
&
dwConnection
);
if
(
!
pFormatEtc
&&
pfe
)
HeapFree
(
GetProcessHeap
(),
0
,
pfe
);
IOleCache_Release
(
pOleCache
);
}
}
...
...
dlls/ole32/tests/ole2.c
View file @
91d91afb
...
...
@@ -53,6 +53,7 @@ struct expected_method
};
static
const
struct
expected_method
*
expected_method_list
;
static
FORMATETC
*
g_expected_fetc
=
NULL
;
BOOL
g_showRunnable
=
TRUE
;
BOOL
g_isRunning
=
TRUE
;
...
...
@@ -496,6 +497,22 @@ static HRESULT WINAPI OleObjectCache_Cache
)
{
CHECK_EXPECTED_METHOD
(
"OleObjectCache_Cache"
);
if
(
g_expected_fetc
)
{
ok
(
pformatetc
!=
NULL
,
"pformatetc should not be NULL
\n
"
);
if
(
pformatetc
)
{
ok
(
pformatetc
->
cfFormat
==
g_expected_fetc
->
cfFormat
,
"cfFormat: %x
\n
"
,
pformatetc
->
cfFormat
);
ok
((
pformatetc
->
ptd
!=
NULL
)
==
(
g_expected_fetc
->
ptd
!=
NULL
),
"ptd: %p
\n
"
,
pformatetc
->
ptd
);
ok
(
pformatetc
->
dwAspect
==
g_expected_fetc
->
dwAspect
,
"dwAspect: %x
\n
"
,
pformatetc
->
dwAspect
);
ok
(
pformatetc
->
lindex
==
g_expected_fetc
->
lindex
,
"lindex: %x
\n
"
,
pformatetc
->
lindex
);
ok
(
pformatetc
->
tymed
==
g_expected_fetc
->
tymed
,
"tymed: %x
\n
"
,
pformatetc
->
tymed
);
}
}
else
ok
(
pformatetc
==
NULL
,
"pformatetc should be NULL
\n
"
);
return
S_OK
;
}
...
...
@@ -796,6 +813,12 @@ static void test_OleCreate(IStorage *pStorage)
{
NULL
,
0
}
};
g_expected_fetc
=
&
formatetc
;
formatetc
.
cfFormat
=
0
;
formatetc
.
ptd
=
NULL
;
formatetc
.
dwAspect
=
DVASPECT_CONTENT
;
formatetc
.
lindex
=
-
1
;
formatetc
.
tymed
=
TYMED_NULL
;
runnable
=
&
OleObjectRunnable
;
cache
=
&
OleObjectCache
;
expected_method_list
=
methods_olerender_none
;
...
...
@@ -836,6 +859,8 @@ static void test_OleCreate(IStorage *pStorage)
IOleObject_Release
(
pObject
);
CHECK_NO_EXTRA_METHODS
();
formatetc
.
cfFormat
=
0
;
formatetc
.
tymed
=
TYMED_NULL
;
runnable
=
NULL
;
expected_method_list
=
methods_olerender_draw_no_runnable
;
trace
(
"OleCreate with OLERENDER_DRAW (no IRunnableObject):
\n
"
);
...
...
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