Skip to content

Comment on COM+ Revisitedparent

Comments

Or:

      if (SUCCEEDED(pfd->Advise(pfde, &dwCookie))
      && SUCCEEDED(pfd->GetOptions(&dwFlags))
      && SUCCEEDED(pfd->SetOptions(dwFlags | FOS_FORCEFILESYSTEM))
      && SUCCEEDED(pfd->SetFileTypes(ARRAYSIZE(c_rgSaveTypes), c_rgSaveTypes))
      && ...
      )

The point is that all those function calls aren't necessary, nor could the majority of them ever fail. Assigning to a field in a structure doesn't fail nor result in a function call.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.