[VIDEOPRT] Write correct MaxObjectNumber to registry

VideoPortMaxObjectNumber variable will be updated later in the function, if everything went fine.
This commit is contained in:
Hervé Poussineau 2021-07-10 19:01:11 +02:00
parent 9e6b0b16e9
commit 8379c87b0b

View file

@ -86,8 +86,8 @@ IntVideoPortAddDeviceMapLink(
L"VIDEO",
L"MaxObjectNumber",
REG_DWORD,
&VideoPortMaxObjectNumber,
sizeof(VideoPortMaxObjectNumber));
&DeviceNumber,
sizeof(DeviceNumber));
if (!NT_SUCCESS(Status))
{
ERR_(VIDEOPRT, "Failed to write MaxObjectNumber: 0x%X\n", Status);
@ -101,7 +101,7 @@ IntVideoPortAddDeviceMapLink(
Status = IoCreateSymbolicLink(&SymlinkName, &DeviceName);
if (!NT_SUCCESS(Status))
{
ERR_(VIDEOPRT, "Failed to write MaxObjectNumber: 0x%X\n", Status);
ERR_(VIDEOPRT, "Failed to create symbolic link: 0x%X\n", Status);
return Status;
}