Common: Move GetDeviceProperty() into its own header

Otherwise we include Windows headers in the entire codebase through CommonFuncs.h
This commit is contained in:
Admiral H. Curtiss
2025-07-19 14:02:43 +02:00
parent 5cc0a5a3be
commit 68713e08b4
8 changed files with 77 additions and 34 deletions

View File

@ -5,11 +5,6 @@
#include <optional>
#include <string>
#ifdef _WIN32
#include <SetupAPI.h>
#include <cfgmgr32.h>
#include <devpropdef.h>
#endif
#include "Common/CommonTypes.h"
@ -64,9 +59,5 @@ std::string GetWin32ErrorString(unsigned long error_code);
// Obtains a full path to the specified module.
std::optional<std::wstring> GetModuleName(void* hInstance);
// Obtains a device property and returns it as a wide string.
std::wstring GetDeviceProperty(const HANDLE& device_info, const PSP_DEVINFO_DATA device_data,
const DEVPROPKEY* requested_property);
#endif
} // namespace Common