LM (Windows): adds support

This commit is contained in:
Carter Li
2026-08-26 15:21:22 +08:00
committed by 李通洲
parent c5598d2361
commit 32757b0e43
2 changed files with 20 additions and 1 deletions
+1 -1
View File
@@ -1144,7 +1144,7 @@ elseif(WIN32)
src/detection/initsystem/initsystem_windows.c
src/detection/keyboard/keyboard_windows.c
src/detection/libc/libc_windows.cpp
src/detection/lm/lm_nosupport.c
src/detection/lm/lm_windows.c
src/detection/loadavg/loadavg_nosupport.c
src/detection/locale/locale_windows.c
src/detection/localip/localip_windows.c
+19
View File
@@ -0,0 +1,19 @@
#include "lm.h"
#include "common/windows/version.h"
#include "common/windows/nt.h"
#include <wchar.h>
const char* ffDetectLM(FFLMResult* result) {
ffStrbufSetStatic(&result->service, "LogonUI");
ffStrbufSetStatic(&result->prettyName, "Logon User Interface");
if (instance.config.general.detectVersion) {
wchar_t exePath[MAX_PATH];
_snwprintf(exePath, ARRAY_SIZE(exePath), L"%ls\\system32\\%ls", (const wchar_t*) SharedUserData->NtSystemRoot, L"LogonUI.exe");
ffGetFileVersion(exePath, nullptr, &result->version);
}
return nullptr;
}