Thanks for reviewing this, I will update the patch with these changes shortly.
On 9/17/21 16:34, Zhiyi Zhang wrote:
- SP_DEVICE_INTERFACE_DATA iface_data = {sizeof(iface_data)};
- SP_DEVICE_INTERFACE_DETAIL_DATA_W *iface_detail_data;
- SP_DEVINFO_DATA device_data = {sizeof(device_data)};
- NTSTATUS status = STATUS_INVALID_PARAMETER;
- D3DKMT_OPENADAPTERFROMLUID luid_desc;
- WCHAR iface_detail_buffer[256];
- BOOL found = FALSE;
- DEVPROPTYPE type;
- unsigned int i;
- HDEVINFO set;
- HANDLE mutex;
- TRACE( "device_name %p.\n", device_name );
- if (!device_name) return STATUS_INVALID_PARAMETER;
Please check and test NULL device_name->pDeviceName as well.
I think I am already testing it and it works as on Windows due to how lstrcmpiW(), but I agree it is more straightforward to add an explicit check.