From 94c3f6e027c3020d64c57c9bc6ba3f6ea8240dd7 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 28 Dec 2015 12:44:49 -0800 Subject: [PATCH] Fix parameter propagation in helper method --- src/SetupApi.Desktop/SetupApi.Helpers.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/SetupApi.Desktop/SetupApi.Helpers.cs b/src/SetupApi.Desktop/SetupApi.Helpers.cs index 8ce2d1d4..0b450339 100644 --- a/src/SetupApi.Desktop/SetupApi.Helpers.cs +++ b/src/SetupApi.Desktop/SetupApi.Helpers.cs @@ -79,20 +79,20 @@ public static IEnumerable SetupDiEnumDeviceInterfaces( } public static string SetupDiGetDeviceInterfaceDetail( - SafeDeviceInfoSetHandle lpDeviceInfoSet, - DeviceInterfaceData oInterfaceData, - IntPtr lpDeviceInfoData) + SafeDeviceInfoSetHandle deviceInfoSet, + DeviceInterfaceData interfaceData, + DeviceInfoData deviceInfoData) { var requiredSize = new NullableUInt32(); // First call to get the size to allocate SetupDiGetDeviceInterfaceDetail( - lpDeviceInfoSet, - ref oInterfaceData, + deviceInfoSet, + ref interfaceData, IntPtr.Zero, 0, requiredSize, - null); + deviceInfoData); // As we passed an empty buffer we know that the function will fail, not need to check the result. var lastError = GetLastError(); @@ -109,8 +109,8 @@ public static string SetupDiGetDeviceInterfaceDetail( // Second call to get the value var success = SetupDiGetDeviceInterfaceDetail( - lpDeviceInfoSet, - ref oInterfaceData, + deviceInfoSet, + ref interfaceData, buffer, (int)requiredSize.Value, null,