mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
no need to cast
This commit is contained in:
parent
307c8f3ffc
commit
839dfedde6
@ -19,10 +19,10 @@ public interface WinIpHlpDll extends Library {
|
||||
class Loader {
|
||||
public static WinIpHlpDll load() {
|
||||
try {
|
||||
return (WinIpHlpDll) Native.loadLibrary("iphlpapi", WinIpHlpDll.class);
|
||||
return Native.loadLibrary("iphlpapi", WinIpHlpDll.class);
|
||||
}
|
||||
catch (UnsatisfiedLinkError e) {
|
||||
return (WinIpHlpDll) Native.loadLibrary("icmp", WinIpHlpDll.class);
|
||||
return Native.loadLibrary("icmp", WinIpHlpDll.class);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ public interface WinKernel32 extends Library {
|
||||
WinKernel32 dll = Loader.load();
|
||||
class Loader {
|
||||
public static WinKernel32 load() {
|
||||
return (WinKernel32) Native.loadLibrary("kernel32", WinKernel32.class);
|
||||
return Native.loadLibrary("kernel32", WinKernel32.class);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user