com.jniwrapper.win32.process
Class CurrentProcess

java.lang.Object
  extended by com.jniwrapper.Parameter
      extended by com.jniwrapper.Pointer.Void
          extended by com.jniwrapper.win32.Handle
              extended by com.jniwrapper.win32.process.Process
                  extended by com.jniwrapper.win32.process.CurrentProcess
All Implemented Interfaces:
com.jniwrapper.AutoDeleteParameter, com.jniwrapper.IntegerParameter, com.jniwrapper.PointerParameter

public class CurrentProcess
extends Process

CurrentProcess class represents a current process and provides various information about it.


Nested Class Summary
static class CurrentProcess.ShutdownFlags
          ShutdownFlags class represents system shutdown flags.
 
Nested classes/interfaces inherited from class com.jniwrapper.win32.process.Process
Process.PriorityClass, Process.ProcessResource
 
Field Summary
 
Fields inherited from class com.jniwrapper.win32.Handle
INFINITE_TIMEOUT, INVALID_HANDLE_VALUE, STATUS_ABANDONED_WAIT_0, STATUS_TIMEOUT, STATUS_WAIT_0
 
Fields inherited from class com.jniwrapper.Parameter
LICENSE_TYPE, V
 
Constructor Summary
CurrentProcess()
          Creates an instance that corresponds to currently running process.
 
Method Summary
 java.lang.String getCommandLine()
          Returns the command-line string for the current process.
 long getProcessID()
          Returns the process identifier of the calling process.
 long getShutdownParameters(CurrentProcess.ShutdownFlags flags)
          Returns shutdown parameters for the currently calling process.
 StartupInfo getStartupInfo()
          Returns StartupInfo structure that was specified when the calling process was created.
 long getVersion()
          Returns the major and minor version numbers of the system on which the specified process is expected to run.
 void setShutdownParameters(long level, CurrentProcess.ShutdownFlags flags)
          Sets shutdown parameters for the currently calling process.
 
Methods inherited from class com.jniwrapper.win32.process.Process
close, getAffinityMask, getApplicationWindows, getExitCode, getGdiObjectsCount, getHandleCount, getIOCounters, getModuleFileName, getModules, getPriorityBoost, getPriorityClass, getProcesses, getProcesses, getProcessFileName, getProcessID, getProcessImageFileName, getProcessMemoryCounters, getProcessTimes, getSystemAffinityMask, getThread, getThreadID, getThreadID, getThreadProcessID, getUSERObjectsCount, getVersion, getWorkingSetSize, isAutoDelete, openProcess, registerResource, setAffinityMask, setAutoDelete, setPriorityBoost, setPriorityClass, setWorkingSetSize, terminate, waitFor, waitFor
 
Methods inherited from class com.jniwrapper.win32.Handle
clone, closeHandle, equals, waitFor, waitFor
 
Methods inherited from class com.jniwrapper.Pointer.Void
asFunction, asFunction, asTypedPointer, castTo, castTo, getDebugInfo, getLength, getValue, hashCode, isNull, read, setValue, toString, write
 
Methods inherited from class com.jniwrapper.Parameter
, a, a, acceptIOPerformer, asReturnValue, b, dataBufferAssigned, getAlignedLength, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, indent, pop, push, read, read, setDataBuffer, toByteArray, write
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CurrentProcess

public CurrentProcess()
Creates an instance that corresponds to currently running process.

Method Detail

getProcessID

public long getProcessID()
Returns the process identifier of the calling process.

Overrides:
getProcessID in class Process
Returns:
the process identifier of the calling process.

getVersion

public long getVersion()
Returns the major and minor version numbers of the system on which the specified process is expected to run.

Overrides:
getVersion in class Process
Returns:
version of the system on which the process is expected to run.

getCommandLine

public java.lang.String getCommandLine()
Returns the command-line string for the current process.

Returns:
the command-line string for the current process.

getShutdownParameters

public long getShutdownParameters(CurrentProcess.ShutdownFlags flags)
Returns shutdown parameters for the currently calling process.

Parameters:
flags - [out] shutdown flags.
Returns:
shutdown priority level.

setShutdownParameters

public void setShutdownParameters(long level,
                                  CurrentProcess.ShutdownFlags flags)
Sets shutdown parameters for the currently calling process.

Parameters:
level - shutdown priority level.
flags - shutdown flags.

getStartupInfo

public StartupInfo getStartupInfo()
Returns StartupInfo structure that was specified when the calling process was created.

Returns:
the StartupInfo structure that was specified when the calling process was created.