From 443cfda4a6c98a43ad039187448f8835d14ab657 Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Fri, 21 Sep 2007 17:06:46 -0700 Subject: [PATCH] setupapi: Return the interface's device from SetupDiGetDeviceInterfaceDetailA/W. --- dlls/setupapi/devinst.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index 57c142b483e..9593b1cdf65 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -2401,6 +2401,8 @@ BOOL WINAPI SetupDiGetDeviceInterfaceDetailA( NULL, NULL); else DeviceInterfaceDetailData->DevicePath[0] = '\0'; + if (DeviceInfoData && DeviceInfoData->cbSize == sizeof(SP_DEVINFO_DATA)) + memcpy(DeviceInfoData, info->device, sizeof(SP_DEVINFO_DATA)); ret = TRUE; } else @@ -2467,6 +2469,8 @@ BOOL WINAPI SetupDiGetDeviceInterfaceDetailW( lstrcpyW(DeviceInterfaceDetailData->DevicePath, info->symbolicLink); else DeviceInterfaceDetailData->DevicePath[0] = '\0'; + if (DeviceInfoData && DeviceInfoData->cbSize == sizeof(SP_DEVINFO_DATA)) + memcpy(DeviceInfoData, info->device, sizeof(SP_DEVINFO_DATA)); ret = TRUE; } else