ole32: ROTFLAGS_REGISTRATIONKEEPSALIVE and ROTFLAGS_ALLOWANYCLIENT are legal to be used together in RunningObjectTable_Register.

This commit is contained in:
Rob Shearman 2006-12-28 02:41:34 +00:00 committed by Alexandre Julliard
parent 588e423bde
commit 83da7dde2a
1 changed files with 2 additions and 8 deletions

View File

@ -282,15 +282,9 @@ RunningObjectTableImpl_Register(IRunningObjectTable* iface, DWORD grfFlags,
TRACE("(%p,%d,%p,%p,%p)\n",This,grfFlags,punkObject,pmkObjectName,pdwRegister);
/*
* there's only two types of register : strong and or weak registration
* (only one must be passed on parameter)
*/
if ( ( (grfFlags & ROTFLAGS_REGISTRATIONKEEPSALIVE) || !(grfFlags & ROTFLAGS_ALLOWANYCLIENT)) &&
(!(grfFlags & ROTFLAGS_REGISTRATIONKEEPSALIVE) || (grfFlags & ROTFLAGS_ALLOWANYCLIENT)) &&
(grfFlags) )
if (grfFlags & ~(ROTFLAGS_REGISTRATIONKEEPSALIVE|ROTFLAGS_ALLOWANYCLIENT))
{
ERR("Invalid combination of ROTFLAGS: %x\n", grfFlags);
ERR("Invalid grfFlags: 0x%08x\n", grfFlags & ~(ROTFLAGS_REGISTRATIONKEEPSALIVE|ROTFLAGS_ALLOWANYCLIENT));
return E_INVALIDARG;
}