diff --git a/win32ss/drivers/videoprt/resource.c b/win32ss/drivers/videoprt/resource.c index 25c5a89f62c..9f50c4bd5e7 100644 --- a/win32ss/drivers/videoprt/resource.c +++ b/win32ss/drivers/videoprt/resource.c @@ -24,8 +24,18 @@ #define NDEBUG #include +extern BOOLEAN VpBaseVideo; + /* PRIVATE FUNCTIONS **********************************************************/ +static BOOLEAN +IntIsVgaSaveDriver( + IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension) +{ + UNICODE_STRING VgaSave = RTL_CONSTANT_STRING(L"\\Driver\\VgaSave"); + return RtlEqualUnicodeString(&VgaSave, &DeviceExtension->DriverObject->DriverName, TRUE); +} + NTSTATUS NTAPI IntVideoPortGetLegacyResources( IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, @@ -994,6 +1004,16 @@ VideoPortVerifyAccessRanges( ExFreePoolWithTag(ResourceList, TAG_VIDEO_PORT); + /* If VgaSave driver is conflicting and we don't explicitely want + * to use it, ignore the problem (because win32k will try to use + * this driver only if all other ones are failing). */ + if (Status == STATUS_CONFLICTING_ADDRESSES && + IntIsVgaSaveDriver(DeviceExtension) && + !VpBaseVideo) + { + return NO_ERROR; + } + if (!NT_SUCCESS(Status) || ConflictDetected) return ERROR_INVALID_PARAMETER; else