Add check to SetMenuItemInfo

Mike Hearn m.hearn at signal.qinetiq.com
Wed Jan 15 08:37:57 CST 2003


> I would suggest to revert your patch until we will find what exactly causes
> IE6 and QuickTime to fail.

Well, in the case of IE6 it's a crash caused by it attempting to destroy
the wrong menu (it does stuff with cloning menus passed in by the html
renderer it seems). That's a secondary reaction to this function
failing, seemingly because the first check returns false when actually
it shouldn't. Unfortunately Marcus (who put the check in) can't remember
why he chose that test, it was back in 2001, so I decided to leave the
warning in as it might prove useful in future. Having the function
succeed here doesn't stop IE from working properly, everything seems to
be fine.

So the second bit of code (that I got wrong) was the check to stop
QuickTime corrupting its menus by passing in bad data (otherwise the
menus are set to garbage characters). This check only returns false for
QuickTime, not IE.

if (((lpmii->fMask & MIIM_FTYPE) == MIIM_FTYPE) && ((lpmii->fType & (MFT_BITMAP | MFT_SEPARATOR)) == (MFT_BITMAP | MFT_SEPARATOR))) {
      WARN("fType contains MFT_BITMAP and MFT_SEPARATOR, API
violation\n");
      return FALSE;
    }

Does that look any better? It checks that if the type is being set,
those two flags aren't both present, which appears to fix IE and
QuickTime, and is a check that should probably be in there anyway.

Well, you know a lot more about this than me, so if you think the check
shouldn't be added then that's fine.

-- 
Mike Hearn <m.hearn at signal.qinetiq.com>
QinetiQ - Malvern Technology Center




More information about the wine-devel mailing list