electron/brightray/common/application_info_win.cc

23 lines
639 B
C++
Raw Normal View History

2013-05-21 15:40:49 +00:00
#include "common/application_info.h"
#include "base/file_version_info.h"
#include "base/strings/utf_string_conversions.h"
2013-05-21 15:40:49 +00:00
namespace brightray {
std::string GetApplicationName() {
auto module = GetModuleHandle(nullptr);
auto info = make_std::unique_ptr(
FileVersionInfo::CreateFileVersionInfoForModule(module));
return base::UTF16ToUTF8(info->product_name());
2013-05-21 15:40:49 +00:00
}
std::string GetApplicationVersion() {
auto module = GetModuleHandle(nullptr);
auto info = make_std::unique_ptr(
FileVersionInfo::CreateFileVersionInfoForModule(module));
return base::UTF16ToUTF8(info->product_version());
2013-05-21 15:40:49 +00:00
}
} // namespace brightray