File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1919
2020static constexpr DWORD SystemConsoleInformation = 132 ;
2121
22- typedef struct _SYSTEM_CONSOLE_INFORMATION {
22+ typedef struct _SYSTEM_CONSOLE_INFORMATION
23+ {
2324 ULONG DriverLoaded : 1 ;
2425 ULONG Spare : 31 ;
2526} SYSTEM_CONSOLE_INFORMATION;
@@ -97,15 +98,15 @@ static wchar_t* _ConsoleHostPath()
9798 return consoleHostPath.get ();
9899}
99100
100- static void _EnsureDriverIsLoaded ()
101+ static void _EnsureDriverIsLoaded () noexcept
101102{
102103#ifndef __INSIDE_WINDOWS
103104 static HMODULE ntdll{ LoadLibraryExW (L" ntdll.dll" , nullptr , LOAD_LIBRARY_SEARCH_SYSTEM32) };
104105 if (auto setSystemInformation{ GetProcAddressByFunctionDeclaration (ntdll, NtSetSystemInformation) })
105106 {
106107 SYSTEM_CONSOLE_INFORMATION ConsoleInformation{};
107108 ConsoleInformation.DriverLoaded = TRUE ;
108- ( void ) setSystemInformation (static_cast <SYSTEM_INFORMATION_CLASS>(SystemConsoleInformation), &ConsoleInformation, sizeof (ConsoleInformation));
109+ std::ignore = setSystemInformation (static_cast <SYSTEM_INFORMATION_CLASS>(SystemConsoleInformation), &ConsoleInformation, sizeof (ConsoleInformation));
109110 }
110111#endif // !__INSIDE_WINDOWS
111112}
You can’t perform that action at this time.
0 commit comments