// Copyright 2019 The Chromium Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license that can be | |
// found in the LICENSE file. | |
#include "chrome/updater/win/util.h" | |
#include <windows.h> | |
namespace updater { | |
HRESULT HRESULTFromLastError() { | |
const auto error_code = ::GetLastError(); | |
return (error_code != NO_ERROR) ? HRESULT_FROM_WIN32(error_code) : E_FAIL; | |
} | |
} // namespace updater |