MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / IsRestartAsAdminArg

Function IsRestartAsAdminArg

PresentMon/Privilege.cpp:70–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70static bool IsRestartAsAdminArg(wchar_t const* s)
71{
72 size_t n = wcslen(s);
73 if (n == 0) {
74 return false;
75 }
76 switch (*s) {
77 case L'/':
78 s++;
79 n--;
80 break;
81 case L'-':
82 s++;
83 n--;
84 if (n > 0 && *s == L'-') {
85 s++;
86 n--;
87 }
88 break;
89 default:
90 return false;
91 }
92
93 return _wcsicmp(s, L"restart_as_admin") == 0;
94}
95
96int RestartAsAdministrator(
97 int argc,

Callers 1

RestartAsAdministratorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected