Skip to content

Commit

Permalink
Unneeded variable, cast, and some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dbwiddis committed Sep 4, 2018
1 parent b256c76 commit bb0b15e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -213,7 +212,6 @@ public WmiResult<T> execute(int timeout) throws TimeoutException {
* @return An enumerator to receive the results of the query
*/
private static <T extends Enum<T>> IEnumWbemClassObject selectProperties(IWbemServices svc, WmiQuery<T> query) {
PointerByReference pEnumerator = new PointerByReference();
// Step 6: --------------------------------------------------
// Use the IWbemServices pointer to make requests of WMI ----
T[] props = query.getPropertyEnum().getEnumConstants();
Expand Down

0 comments on commit bb0b15e

Please sign in to comment.