Servertec
Jenie
1.0.1 09/04/2005

stec.jenie
Class Dll

java.lang.Object
  extended by stec.jenie.Dll

public class Dll
extends java.lang.Object

Represents a reference to a native dynamic link library.

Since:
1.0.0 12/05/2004

Constructor Summary
Dll(long pointer)
          Constructs a new native dynamic link library.
Dll(java.lang.String name)
          Constructs a new native dynamic link library.
Dll(java.lang.String name, boolean managed)
          Constructs a new native dynamic link library.
 
Method Summary
 boolean equals(java.lang.Object object)
          Returns whether this dynamic link library equals the specified dynamic link library.
 Function getFunction(java.lang.String name)
          Returns a reference to a native function.
 Function getFunction(java.lang.String name, int calling_convention)
          Returns a reference to a native function.
 long getNativeAddress()
          Returns the native address of this dll.
 int hashCode()
          Returns the hash code of this dynamic link library.
 boolean isManaged()
          Returns whether this dll is managed.
 void release()
          Releases the native reference to this dll.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dll

public Dll(java.lang.String name)
    throws NativeException
Constructs a new native dynamic link library.

Parameters:
name - the name of the native dynamic link library to load.
Throws:
NativeException - if any exception occurs.

Dll

public Dll(java.lang.String name,
           boolean managed)
    throws NativeException
Constructs a new native dynamic link library.

Parameters:
name - the name of the native dynamic link library to load.
managed - whether the native dynamiclink library will be released when nolonger referenced.
Throws:
NativeException - if any exception occurs.

Dll

public Dll(long pointer)
Constructs a new native dynamic link library.

Parameters:
pointer - the pointer the the native dynamic link library.
Method Detail

getFunction

public Function getFunction(java.lang.String name)
                     throws NativeException
Returns a reference to a native function.

Uses the default calling convention.

Parameters:
name - the name of the native function.
Throws:
NativeException - if any exception occurs.

getFunction

public Function getFunction(java.lang.String name,
                            int calling_convention)
                     throws NativeException,
                            java.lang.IllegalArgumentException
Returns a reference to a native function.

Uses the default calling convention.

Parameters:
name - the name of the native function.
calling_convention - the calling convetion. -1 for the default calling convention.
Throws:
NativeException - if any exception occurs.
java.lang.IllegalArgumentException - if the calling convention specified is not valid.

getNativeAddress

public long getNativeAddress()
Returns the native address of this dll.

Returns:
the native address of this dll.

equals

public boolean equals(java.lang.Object object)
Returns whether this dynamic link library equals the specified dynamic link library.

Overrides:
equals in class java.lang.Object
Parameters:
object - the dynamic link library to compare against.
Returns:
whether this dynamic link library equals the specified dynamic link library.

hashCode

public int hashCode()
Returns the hash code of this dynamic link library.

Overrides:
hashCode in class java.lang.Object
Returns:
the hash code of this dynamic link library.

release

public void release()
Releases the native reference to this dll.


isManaged

public boolean isManaged()
Returns whether this dll is managed.

Returns:
whether this dll is managed.

Servertec
Jenie
1.0.1 09/04/2005

Copyright © 2004-2005 Servertec. All rights reserved.