mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-05 19:09:27 +00:00
ole32: Call IRunnableObject_Run and IOleCache_Cache from OleCreate if the render option is specified as draw or format.
This is documented on MSDN and is confirmed by tests.
This commit is contained in:
parent
6da80a8898
commit
53be8cc861
|
@ -2341,7 +2341,30 @@ HRESULT WINAPI OleCreate(
|
|||
|
||||
if (pOleObject)
|
||||
IOleObject_Release(pOleObject);
|
||||
|
||||
|
||||
if (((renderopt == OLERENDER_DRAW) || (renderopt == OLERENDER_FORMAT)) &&
|
||||
SUCCEEDED(hres))
|
||||
{
|
||||
IRunnableObject *pRunnable;
|
||||
IOleCache *pOleCache;
|
||||
|
||||
hres = IUnknown_QueryInterface(pUnk, &IID_IRunnableObject, (void **)&pRunnable);
|
||||
if (SUCCEEDED(hres))
|
||||
{
|
||||
hres = IRunnableObject_Run(pRunnable, NULL);
|
||||
IRunnableObject_Release(pRunnable);
|
||||
}
|
||||
|
||||
if (SUCCEEDED(hres))
|
||||
hres = IUnknown_QueryInterface(pUnk, &IID_IOleCache, (void **)&pOleCache);
|
||||
if (SUCCEEDED(hres))
|
||||
{
|
||||
DWORD dwConnection;
|
||||
hres = IOleCache_Cache(pOleCache, pFormatEtc, ADVF_PRIMEFIRST, &dwConnection);
|
||||
IOleCache_Release(pOleCache);
|
||||
}
|
||||
}
|
||||
|
||||
if (FAILED(hres))
|
||||
{
|
||||
IUnknown_Release(pUnk);
|
||||
|
|
Loading…
Reference in a new issue