com.jniwrapper.win32.system
Class DllVersionInfo

java.lang.Object
  extended by com.jniwrapper.Parameter
      extended by com.jniwrapper.Structure
          extended by com.jniwrapper.win32.system.DllVersionInfo
All Implemented Interfaces:
com.jniwrapper.AlignmentAwareParameter, com.jniwrapper.CompositeParameter

public class DllVersionInfo
extends com.jniwrapper.Structure

This class represents the DLLVERSIONINFO structure and provides the ability to load this structure from a specified library.

Note: Not all libraries have the DllGetVersion function, which is used by this class. Therefore, loading of version information from such a library will fail with NoSuchFunctionException thrown.


Field Summary
static int DLLVER_PLATFORM_NT
          The DLL was built specifically for Microsoft Windows NT®.
static int DLLVER_PLATFORM_WINDOWS
          The DLL was built for all Microsoft® Windows® platforms.
 
Fields inherited from class com.jniwrapper.Structure
i
 
Fields inherited from class com.jniwrapper.Parameter
LICENSE_TYPE, V
 
Constructor Summary
DllVersionInfo(java.lang.String libraryName)
          Creates a new instance and automatically tries to load DLL version information from the specified library.
 
Method Summary
 java.lang.Object clone()
           
 int getBuildNumber()
          Returns the build number of the DLL.
 int getMajorVersion()
          Returns the major version of the DLL.
 int getMinorVersion()
          Returns the minor version of the DLL.
 int getPlatformID()
          Returns the platform identifier for which the DLL was built.
 java.lang.String toString()
           
 
Methods inherited from class com.jniwrapper.Structure
a, a, acceptIOPerformer, addMembers, computeLength, equals, getAlignmentRequirement, getDebugInfo, getFirstMemberSize, getLength, getMember, getMembers, getOffsets, init, init, initFrom, pop, push, read, setDataBuffer, write
 
Methods inherited from class com.jniwrapper.Parameter
, a, asReturnValue, b, dataBufferAssigned, getAlignedLength, getDataBuffer, getDataBufferOffset, hashCode, indent, read, read, toByteArray, write
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DLLVER_PLATFORM_WINDOWS

public static final int DLLVER_PLATFORM_WINDOWS
The DLL was built for all Microsoft® Windows® platforms.

See Also:
Constant Field Values

DLLVER_PLATFORM_NT

public static final int DLLVER_PLATFORM_NT
The DLL was built specifically for Microsoft Windows NT®.

See Also:
Constant Field Values
Constructor Detail

DllVersionInfo

public DllVersionInfo(java.lang.String libraryName)
               throws com.jniwrapper.NoSuchFunctionException
Creates a new instance and automatically tries to load DLL version information from the specified library.

Parameters:
libraryName - the library name to load version info from.
Throws:
com.jniwrapper.NoSuchFunctionException - if the specified library does not export DllGetVersion.
Method Detail

getMajorVersion

public int getMajorVersion()
Returns the major version of the DLL. If the DLL version is 4.0.950, this value will be 4.

Returns:
the major version of the DLL.

getMinorVersion

public int getMinorVersion()
Returns the minor version of the DLL. If the DLL version is 4.0.950, this value will be 0.

Returns:
the minor version of the DLL.

getBuildNumber

public int getBuildNumber()
Returns the build number of the DLL. If the DLL version is 4.0.950, this value will be 950.

Returns:
the build number of the DLL.

getPlatformID

public int getPlatformID()
Returns the platform identifier for which the DLL was built. This can be one of the following values:

DLLVER_PLATFORM_WINDOWS
DLLVER_PLATFORM_NT

Returns:
the platform identifier for which the DLL was built.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clone

public java.lang.Object clone()
Overrides:
clone in class com.jniwrapper.Structure