mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added code to detect if running on 64bit Windows to the Win32NetBIOS static initializer method and load the appropriate DLL.
Added the X64 utility class, currently just has a method for detecting 64bit Windows. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2627 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -25,6 +25,7 @@ import java.util.Hashtable;
|
||||
import org.alfresco.filesys.netbios.NetBIOSName;
|
||||
import org.alfresco.filesys.util.DataBuffer;
|
||||
import org.alfresco.filesys.util.IPAddress;
|
||||
import org.alfresco.filesys.util.X64;
|
||||
|
||||
/**
|
||||
* Win32 NetBIOS Native Call Wrapper Class
|
||||
@@ -696,15 +697,23 @@ public class Win32NetBIOS
|
||||
*/
|
||||
static
|
||||
{
|
||||
|
||||
// Check if we are running under 64 bit Windows
|
||||
|
||||
String dllName = "Win32NetBIOS";
|
||||
|
||||
if ( X64.isWindows64())
|
||||
dllName = "Win32NetBIOSx64";
|
||||
|
||||
// Load the Win32 NetBIOS interface library
|
||||
|
||||
try
|
||||
{
|
||||
System.loadLibrary("Win32NetBIOS");
|
||||
System.loadLibrary( dllName);
|
||||
}
|
||||
catch (Throwable ex)
|
||||
{
|
||||
ex.printStackTrace();
|
||||
|
||||
// Save the native code load exception
|
||||
|
||||
m_loadDLLException = ex;
|
||||
|
Reference in New Issue
Block a user