diff --git a/contrib/platform/src/com/sun/jna/platform/win32/COM/Wbemcli.java b/contrib/platform/src/com/sun/jna/platform/win32/COM/Wbemcli.java index b008969c16..329691fca3 100644 --- a/contrib/platform/src/com/sun/jna/platform/win32/COM/Wbemcli.java +++ b/contrib/platform/src/com/sun/jna/platform/win32/COM/Wbemcli.java @@ -178,7 +178,7 @@ public IWbemServices ConnectServer(String strNetworkResource, String strUser, St PointerByReference pbr = new PointerByReference(); try { - HRESULT result = (HRESULT) ConnectServer(strNetworkResourceBSTR, strUserBSTR, + HRESULT result = ConnectServer(strNetworkResourceBSTR, strUserBSTR, strPasswordBSTR, strLocaleBSTR, lSecurityFlags, strAuthorityBSTR, pCtx, pbr); COMUtils.checkRC(result); diff --git a/contrib/platform/src/com/sun/jna/platform/win32/COM/WbemcliUtil.java b/contrib/platform/src/com/sun/jna/platform/win32/COM/WbemcliUtil.java index 2046cbb4e8..e1cded2df4 100644 --- a/contrib/platform/src/com/sun/jna/platform/win32/COM/WbemcliUtil.java +++ b/contrib/platform/src/com/sun/jna/platform/win32/COM/WbemcliUtil.java @@ -42,7 +42,6 @@ import com.sun.jna.platform.win32.COM.Wbemcli.IWbemLocator; import com.sun.jna.platform.win32.COM.Wbemcli.IWbemServices; import com.sun.jna.ptr.IntByReference; -import com.sun.jna.ptr.PointerByReference; /** * Utility class providing access to Windows Management Interface (WMI) via COM. @@ -213,7 +212,6 @@ public WmiResult execute(int timeout) throws TimeoutException { * @return An enumerator to receive the results of the query */ private static > IEnumWbemClassObject selectProperties(IWbemServices svc, WmiQuery query) { - PointerByReference pEnumerator = new PointerByReference(); // Step 6: -------------------------------------------------- // Use the IWbemServices pointer to make requests of WMI ---- T[] props = query.getPropertyEnum().getEnumConstants();