Main Page Cookbook/Overview ImageMeister the jcprops file Licensing Binary Installation & Configuration [ Win · Mac · Nix · OSX ] Changes Public API Source Code Main Page Java [ Common · Win · Mac · Nix ] Native Code [ Common · Win · Mac · Nix ] Manifest Native Code Overviews [ Common · Win · Mac · Nix · Strings ] Macros [ General · Native Macros ] Walkthroughs [ Java only · Java and native ] Building [ Win · Mac · Nix · OSX ] Distribution Issues

    All Packages  This Package  Class Hierarchy  Class Search  Index

Class com.jconfig.win.AppProcessMSVM

    java.lang.Object
       |
       +----com.jconfig.win.AppProcessMSVM

Summary

    class  AppProcessMSVM
         extends java.lang.Object
         implements com.jconfig.AppProcess
    {
              // Fields 9
         private int[] appData;
         private AppFileMSVM appFile;
         private boolean bIsRunning;
         private static final String copyrightString;
         private static final int kNumCommands;
         static final int kSizeofAppData;
         private int numCommands;
         private AppCommand[] theCommands;
         private AppCommandWatcher watcher;

              // Constructors 1
         AppProcessMSVM(AppFileMSVM, int[], AppCommandWatcher);

              // Methods 8
         public void dumpInfo(PrintStream, String);
         public AppCommand[] getAllCommands();
         public AppFile getAppFile();
         public AppCommand getCommand(String);
         public int[] getPlatformData();
         public boolean isRunning();
         public int move(AppProcess, int, int);
         public int performCommand(AppCommand, int);
    }

Represents a running process.

This object is created using a set of 12 ints: the HWND of the process and the information returned from the WinAPI CreateProcess() routine, as well as the contents of the PROCESSENTRY32 struct as applicable.

This set of 12 ints corresponds to the AppDataType struct, which is defined in AppData.h in the Windows native code:

    	typedef struct tagAppDataType {
    		HWND					hwnd;
    		PROCESS_INFORMATION		pi;
    		DWORD					pecntUsage;
    		DWORD					peth32DefaultHeapID;
    		DWORD					peth32ModuleID;
    		DWORD					pecntThreads;
    		DWORD					peth32ParentProcessID;
    		LONG					pepcPriClassBase;
    		DWORD					pedwFlags;
    	} AppDataType;

Java-side, this is referred to as 'AppData'.

In the WinAPI, PROCESS_INFORMATION is defined as:

    typedef struct _PROCESS_INFORMATION { // pi
        HANDLE hProcess;
        HANDLE hThread;
        DWORD dwProcessId;
        DWORD dwThreadId;
    } PROCESS_INFORMATION;

Author:
  Copyright (c) 1997-2002 Samizdat Productions. All Rights Reserved.

Fields

### · copyrightString | Summary | Top

       private static final String copyrightString

### · appFile | Summary | Top

       private AppFileMSVM appFile

### · theCommands | Summary | Top

       private AppCommand[] theCommands

### · watcher | Summary | Top

       private AppCommandWatcher watcher

### · appData | Summary | Top

       private int[] appData

### · numCommands | Summary | Top

       private int numCommands

### · bIsRunning | Summary | Top

       private boolean bIsRunning

### · kSizeofAppData | Summary | Top

       static final int kSizeofAppData

### · kNumCommands | Summary | Top

       private static final int kNumCommands

Constructors

### · AppProcessMSVM | Summary | Top

       AppProcessMSVM(AppFileMSVM af,
                      int[] data,
                      AppCommandWatcher acw)

> Construct using information on a running process.

> Parameter | Description
> af | the AppFileMSVM from which the process was created
> data | the process' AppData
> acw | an object which will be called when messages are sent to this process.

Methods

### · getAppFile | Summary | Top

       public AppFile getAppFile()

> Return the AppFile associated with this process.

> Implements:
>   getAppFile in interface AppProcess

### · getCommand | Summary | Top

       public AppCommand getCommand(String commandName)

> Searches the list of command for one with the given name, and returns it. If one couldn't be found, returns null.

> Implements:
>   getCommand in interface AppProcess

### · getAllCommands | Summary | Top

       public AppCommand[] getAllCommands()

> Return an array of all the commands.

> Implements:
>   getAllCommands in interface AppProcess

### · performCommand | Summary | Top

       public int performCommand(AppCommand command,
                                 int flags)

> Performs the given command. Presently, this must be a 'quit' command, no others are supported.

> Implements:
>   performCommand in interface AppProcess

### · move | Summary | Top

       public int move(AppProcess fromProcess,
                       int selector,
                       int flags)

> Move this process.

> Implements:
>   move in interface AppProcess

### · isRunning | Summary | Top

       public boolean isRunning()

> Indicates whether this process is still running.

> Implements:
>   isRunning in interface AppProcess

### · getPlatformData | Summary | Top

       public int[] getPlatformData()

> Returns the AppData for this process. See above for a description of AppData.

> Implements:
>   getPlatformData in interface AppProcess

### · dumpInfo | Summary | Top

       public void dumpInfo(PrintStream ps,
                            String indent)

    All Packages  This Package  Class Hierarchy  Class Search  Index

Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7