mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-02 13:27:35 +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
1 changed files with 24 additions and 1 deletions
|
@ -2342,6 +2342,29 @@ 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