how about GetTempFilepath return a result for hres? I think if we work through a bit we could cut down on the amount of code quite a it. Hres = (!wcslen(tmpname) ? E_FAIL : S_OK) GetTempFilepath((fgdesc->fgd).cFileName, tmpname) LPFILEGROUPDESCRIPTOR fgdesc = (LPFILEGROUPDESCRIPTOR) GlobalLock(stm.hGlobal) |if (!wcslen(tmpname))| or actually, maybe tighten this up a bit: Generally could we switch to using success macros with these where it applies? If not, lets at least start getting this code better in line with mozilla coding standard and set the comparison order right, so |if (hres != S_OK)| good, |if (S_OK = hres)| bad.Īlso, in the default: block, could you try breaking that up into a set of functions or methods as much as possible? It's grown pretty wild and crazy. Patch to support Drag and Drop of E-Mails from Outlook