oleaut32: Corrected registration flag inversion in RegisterActiveObject.

This commit is contained in:
Peter Schellenbach 2011-03-03 17:03:40 -08:00 committed by Alexandre Julliard
parent 7879b8e349
commit 99af2f56ba
1 changed files with 4 additions and 1 deletions

View File

@ -471,6 +471,7 @@ HRESULT WINAPI RegisterActiveObject(
HRESULT ret; HRESULT ret;
LPRUNNINGOBJECTTABLE runobtable; LPRUNNINGOBJECTTABLE runobtable;
LPMONIKER moniker; LPMONIKER moniker;
DWORD rot_flags = ROTFLAGS_REGISTRATIONKEEPSALIVE; /* default registration is strong */
StringFromGUID2(rcid,guidbuf,39); StringFromGUID2(rcid,guidbuf,39);
ret = CreateItemMoniker(pdelimiter,guidbuf,&moniker); ret = CreateItemMoniker(pdelimiter,guidbuf,&moniker);
@ -481,7 +482,9 @@ HRESULT WINAPI RegisterActiveObject(
IMoniker_Release(moniker); IMoniker_Release(moniker);
return ret; return ret;
} }
ret = IRunningObjectTable_Register(runobtable,dwFlags,punk,moniker,pdwRegister); if(dwFlags == ACTIVEOBJECT_WEAK)
rot_flags = 0;
ret = IRunningObjectTable_Register(runobtable,rot_flags,punk,moniker,pdwRegister);
IRunningObjectTable_Release(runobtable); IRunningObjectTable_Release(runobtable);
IMoniker_Release(moniker); IMoniker_Release(moniker);
return ret; return ret;