diff options
-rw-r--r-- | Application/EfiDSEFix/src/EfiDSEFix.h | 8 | ||||
-rw-r--r-- | Application/EfiDSEFix/src/main.cpp | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/Application/EfiDSEFix/src/EfiDSEFix.h b/Application/EfiDSEFix/src/EfiDSEFix.h index b22336f..68dc238 100644 --- a/Application/EfiDSEFix/src/EfiDSEFix.h +++ b/Application/EfiDSEFix/src/EfiDSEFix.h @@ -111,10 +111,12 @@ _vsnwprintf( ); NTSYSAPI -int +ULONG __cdecl -_wtoi( - _In_ PCWCHAR Str +wcstoul( + _In_ PCWCHAR String, + _Out_opt_ PWCHAR* EndPtr, + _In_ LONG Radix ); // Console functions diff --git a/Application/EfiDSEFix/src/main.cpp b/Application/EfiDSEFix/src/main.cpp index 1c7e8da..8409ee3 100644 --- a/Application/EfiDSEFix/src/main.cpp +++ b/Application/EfiDSEFix/src/main.cpp @@ -21,7 +21,9 @@ PrintUsage( int wmain(int argc, wchar_t** argv) { NT_ASSERT(argc != 0); - if (argc == 1 || argc > 3 || (argc == 3 && _wtoi(argv[2]) == 0)) + + if (argc == 1 || argc > 3 || + (argc == 3 && wcstoul(argv[2], nullptr, 16) == 0)) { // Print help text PrintUsage(argv[0]); @@ -50,7 +52,7 @@ int wmain(int argc, wchar_t** argv) { if (NtCurrentPeb()->OSBuildNumber >= 9200) { - CiOptionsValue = argc == 3 ? static_cast<ULONG>(_wtoi(argv[2])) : CODEINTEGRITY_OPTION_ENABLED; + CiOptionsValue = argc == 3 ? wcstoul(argv[2], nullptr, 16) : CODEINTEGRITY_OPTION_ENABLED; Printf(L"(Re)enabling DSE [g_CiOptions value = 0x%X]...\n", CiOptionsValue); } else |