Skip to content

Commit

Permalink
feat: enhance admin privilege error message formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
aksueikava authored Dec 8, 2024
1 parent e7e73a0 commit a57fa04
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions TimerResolutionMeasure/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ typedef NTSTATUS(NTAPI* NtQueryTimerResolution_t)(PULONG MinimumResolution, PULO
int main() {
#ifndef _DEBUG
if (!IsAdmin()) {
std::cerr << "Administrator privileges are required. The program will not function correctly and will now exit.\n";
std::cout << "Press Enter to continue...\n";
std::cerr << "[ERROR] Administrator privileges are required.\n"
<< " The program will not function correctly and will now exit.\n\n";
std::cout << "Press Enter to continue and exit the program...";
std::cin.get();
return 0;
}
Expand Down

0 comments on commit a57fa04

Please sign in to comment.