mirror of
https://github.com/vxunderground/VX-API
synced 2026-06-06 16:54:55 +00:00
Create IsNvidiaGraphicsCardPresent.cpp
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
BOOL IsNvidiaGraphicsCardPresentA(VOID)
|
||||
{
|
||||
DISPLAY_DEVICEA DisplayDevice; RtlZeroMemory(&DisplayDevice, sizeof(DISPLAY_DEVICEA));
|
||||
DisplayDevice.cb = sizeof(DISPLAY_DEVICEW);
|
||||
|
||||
DWORD dwDeviceId = ERROR_SUCCESS;
|
||||
|
||||
while (EnumDisplayDevicesA(NULL, dwDeviceId, &DisplayDevice, 0))
|
||||
{
|
||||
if (StringFindSubstringA(DisplayDevice.DeviceString, (PCHAR)"NVIDIA") != NULL)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
BOOL IsNvidiaGraphicsCardPresentW(VOID)
|
||||
{
|
||||
DISPLAY_DEVICEW DisplayDevice; RtlZeroMemory(&DisplayDevice, sizeof(DISPLAY_DEVICEW));
|
||||
DisplayDevice.cb = sizeof(DISPLAY_DEVICEW);
|
||||
|
||||
DWORD dwDeviceId = ERROR_SUCCESS;
|
||||
|
||||
while (EnumDisplayDevicesW(NULL, dwDeviceId, &DisplayDevice, 0))
|
||||
{
|
||||
if (StringFindSubstringW(DisplayDevice.DeviceString, (PWCHAR)L"NVIDIA") != NULL)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
Reference in New Issue
Block a user