Skip to content

Commit

Permalink
GetVersionExを使わない
Browse files Browse the repository at this point in the history
  • Loading branch information
xtne6f committed Aug 18, 2015
1 parent b00bef1 commit 25e07e1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions EpgTimerSrv/EpgTimerSrv/EpgTimerSrvMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ bool CEpgTimerSrvMain::Main(bool serviceFlag_)
this->residentFlag = serviceFlag_;

DWORD awayMode;
OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
awayMode = GetVersionEx(&osvi) && osvi.dwMajorVersion >= 6 ? ES_AWAYMODE_REQUIRED : 0;
OSVERSIONINFOEX osvi;
osvi.dwOSVersionInfoSize = sizeof(osvi);
osvi.dwMajorVersion = 6;
awayMode = VerifyVersionInfo(&osvi, VER_MAJORVERSION, VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL)) ? ES_AWAYMODE_REQUIRED : 0;

wstring settingPath;
GetSettingPath(settingPath);
Expand Down

0 comments on commit 25e07e1

Please sign in to comment.