Initial
This commit is contained in:
BIN
java/RemoteProcess/CoRemoteProcess.class
Normal file
BIN
java/RemoteProcess/CoRemoteProcess.class
Normal file
Binary file not shown.
48
java/RemoteProcess/CoRemoteProcess.java
Normal file
48
java/RemoteProcess/CoRemoteProcess.java
Normal file
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// Auto-generated using JActiveX.EXE 5.00.2748
|
||||
// (..\jactivex /l foo remoteps.tlb)
|
||||
//
|
||||
// WARNING: Do not remove the comments that include "@com" directives.
|
||||
// This source file must be compiled by a @com-aware compiler.
|
||||
// If you are using the Microsoft Visual J++ compiler, you must use
|
||||
// version 1.02.3920 or later. Previous versions will not issue an error
|
||||
// but will not generate COM-enabled class files.
|
||||
//
|
||||
|
||||
//package remoteps;
|
||||
|
||||
import com.ms.com.*;
|
||||
import com.ms.com.IUnknown;
|
||||
import com.ms.com.Variant;
|
||||
|
||||
/** @com.class(classid=BD20693F-8D8A-11D3-B2F0-0050043ED4DB,DynamicCasts)
|
||||
*/
|
||||
public class CoRemoteProcess implements IUnknown,com.ms.com.NoAutoScripting,IRemoteProcess
|
||||
{
|
||||
/** @com.method() */
|
||||
public native Variant Snapshot();
|
||||
|
||||
/** @com.method() */
|
||||
public native Variant GetProcessFirst();
|
||||
|
||||
/** @com.method() */
|
||||
public native Variant GetProcessNext();
|
||||
|
||||
/** @com.method() */
|
||||
public native Variant GetModuleFirst();
|
||||
|
||||
/** @com.method() */
|
||||
public native Variant GetModuleNext();
|
||||
|
||||
/** @com.method() */
|
||||
public native Variant GetDesktopWindow();
|
||||
|
||||
/** @com.method() */
|
||||
public native void GetProcessTimes(Variant pVariant, double[] pCreationTime, double[] pExitTime, double[] pKernelTime, double[] pUserTime);
|
||||
|
||||
/** @com.method() */
|
||||
public native Variant Kill();
|
||||
|
||||
|
||||
public static final com.ms.com._Guid clsid = new com.ms.com._Guid((int)0xbd20693f, (short)0x8d8a, (short)0x11d3, (byte)0xb2, (byte)0xf0, (byte)0x0, (byte)0x50, (byte)0x4, (byte)0x3e, (byte)0xd4, (byte)0xdb);
|
||||
}
|
||||
BIN
java/RemoteProcess/IRemoteProcess.class
Normal file
BIN
java/RemoteProcess/IRemoteProcess.class
Normal file
Binary file not shown.
56
java/RemoteProcess/IRemoteProcess.java
Normal file
56
java/RemoteProcess/IRemoteProcess.java
Normal file
@@ -0,0 +1,56 @@
|
||||
//
|
||||
// Auto-generated using JActiveX.EXE 5.00.2748
|
||||
// (..\jactivex /l foo remoteps.tlb)
|
||||
//
|
||||
// WARNING: Do not remove the comments that include "@com" directives.
|
||||
// This source file must be compiled by a @com-aware compiler.
|
||||
// If you are using the Microsoft Visual J++ compiler, you must use
|
||||
// version 1.02.3920 or later. Previous versions will not issue an error
|
||||
// but will not generate COM-enabled class files.
|
||||
//
|
||||
|
||||
//package remoteps;
|
||||
|
||||
import com.ms.com.*;
|
||||
import com.ms.com.IUnknown;
|
||||
import com.ms.com.Variant;
|
||||
|
||||
// VTable-only interface IRemoteProcess
|
||||
/** @com.interface(iid=BD20693E-8D8A-11D3-B2F0-0050043ED4DB, thread=AUTO) */
|
||||
public interface IRemoteProcess extends IUnknown
|
||||
{
|
||||
/** @com.method(vtoffset=0, addFlagsVtable=4)
|
||||
@com.parameters([type=VARIANT] return) */
|
||||
public Variant Snapshot();
|
||||
|
||||
/** @com.method(vtoffset=1, addFlagsVtable=4)
|
||||
@com.parameters([type=VARIANT] return) */
|
||||
public Variant GetProcessFirst();
|
||||
|
||||
/** @com.method(vtoffset=2, addFlagsVtable=4)
|
||||
@com.parameters([type=VARIANT] return) */
|
||||
public Variant GetProcessNext();
|
||||
|
||||
/** @com.method(vtoffset=3, addFlagsVtable=4)
|
||||
@com.parameters([type=VARIANT] return) */
|
||||
public Variant GetModuleFirst();
|
||||
|
||||
/** @com.method(vtoffset=4, addFlagsVtable=4)
|
||||
@com.parameters([type=VARIANT] return) */
|
||||
public Variant GetModuleNext();
|
||||
|
||||
/** @com.method(vtoffset=5, addFlagsVtable=4)
|
||||
@com.parameters([type=VARIANT] return) */
|
||||
public Variant GetDesktopWindow();
|
||||
|
||||
/** @com.method(vtoffset=6, addFlagsVtable=4)
|
||||
@com.parameters([in,type=PTR] pVariant, [out,size=1,type=ARRAY] pCreationTime, [out,size=1,type=ARRAY] pExitTime, [out,size=1,type=ARRAY] pKernelTime, [out,size=1,type=ARRAY] pUserTime) */
|
||||
public void GetProcessTimes(Variant pVariant, double[] pCreationTime, double[] pExitTime, double[] pKernelTime, double[] pUserTime);
|
||||
|
||||
/** @com.method(vtoffset=7, addFlagsVtable=4)
|
||||
@com.parameters([type=VARIANT] return) */
|
||||
public Variant Kill();
|
||||
|
||||
|
||||
public static final com.ms.com._Guid iid = new com.ms.com._Guid((int)0xbd20693e, (short)0x8d8a, (short)0x11d3, (byte)0xb2, (byte)0xf0, (byte)0x0, (byte)0x50, (byte)0x4, (byte)0x3e, (byte)0xd4, (byte)0xdb);
|
||||
}
|
||||
BIN
java/RemoteProcess/ListListener.class
Normal file
BIN
java/RemoteProcess/ListListener.class
Normal file
Binary file not shown.
25
java/RemoteProcess/ListListener.java
Normal file
25
java/RemoteProcess/ListListener.java
Normal file
@@ -0,0 +1,25 @@
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
|
||||
class ListListener implements ActionListener
|
||||
{
|
||||
RemoteProcess mApplet;
|
||||
ListListener(RemoteProcess applet)
|
||||
{
|
||||
mApplet=applet;
|
||||
}
|
||||
public void actionPerformed(ActionEvent event)
|
||||
{
|
||||
String strSelText=null;
|
||||
String strSymbol;
|
||||
int strLength;
|
||||
int index;
|
||||
|
||||
strSelText=mApplet.mProcessList.getSelectedItem();
|
||||
if(null==strSelText||0==(strLength=strSelText.length()))return;
|
||||
strSymbol=new String();
|
||||
for(index=0;index<strLength;index++)if(strSelText.charAt(index)==';')break;
|
||||
for(++index;index<strLength;index++)strSymbol+=strSelText.charAt(index);
|
||||
// mApplet.mTextSymbol.setText(strSymbol);
|
||||
}
|
||||
}
|
||||
BIN
java/RemoteProcess/RemoteProcess.class
Normal file
BIN
java/RemoteProcess/RemoteProcess.class
Normal file
Binary file not shown.
118
java/RemoteProcess/RemoteProcess.java
Normal file
118
java/RemoteProcess/RemoteProcess.java
Normal file
@@ -0,0 +1,118 @@
|
||||
import java.awt.*;
|
||||
import java.applet.*;
|
||||
import java.net.*;
|
||||
import java.io.*;
|
||||
import java.awt.event.*;
|
||||
import java.lang.reflect.*;
|
||||
import com.ms.security.*;
|
||||
import com.ms.com.*;
|
||||
|
||||
public class RemoteProcess extends Applet
|
||||
{
|
||||
private TextField mTextSymbol;
|
||||
public List mProcessList;
|
||||
private ListListener mListListener;
|
||||
|
||||
|
||||
public void init()
|
||||
{
|
||||
setFont(new Font("Courier New",Font.BOLD,12));
|
||||
setBackground(Color.lightGray);
|
||||
try{if(Class.forName("com.ms.security.PolicyEngine") != null)PolicyEngine.assertPermission(PermissionID.NETIO);}
|
||||
catch(Throwable cnfe){;}
|
||||
mListListener=new ListListener(this);
|
||||
performLayout();
|
||||
getProcessList();
|
||||
|
||||
}
|
||||
public void stop()
|
||||
{
|
||||
}
|
||||
public void destroy()
|
||||
{
|
||||
}
|
||||
public void paint(Graphics graphics)
|
||||
{
|
||||
}
|
||||
public boolean action(Event event,Object object)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public void performLayout()
|
||||
{
|
||||
GridBagLayout layout=new GridBagLayout();
|
||||
GridBagConstraints constraints=new GridBagConstraints();
|
||||
setFont(new Font("Fixed",Font.BOLD,12));
|
||||
setLayout(layout);
|
||||
|
||||
constraints.gridwidth=1;
|
||||
constraints.fill=GridBagConstraints.BOTH;
|
||||
constraints.weightx=0.25;
|
||||
|
||||
|
||||
mProcessList=new List(20,false);
|
||||
mProcessList.addActionListener(mListListener);
|
||||
constraints.gridwidth=GridBagConstraints.RELATIVE;
|
||||
layout.setConstraints(mProcessList,constraints);
|
||||
add(mProcessList);
|
||||
|
||||
|
||||
// Label symLabel=new Label("Symbol/Name",Label.LEFT);
|
||||
// layout.setConstraints(symLabel,constraints);
|
||||
// add(symLabel);
|
||||
// mTextSymbol=new TextField("");
|
||||
// constraints.gridwidth=GridBagConstraints.RELATIVE;
|
||||
// layout.setConstraints(mTextSymbol,constraints);
|
||||
// add(mTextSymbol);
|
||||
// mButtonGetPrices=new Button("Get Prices");
|
||||
// constraints.gridwidth=GridBagConstraints.REMAINDER;
|
||||
// layout.setConstraints(mButtonGetPrices,constraints);
|
||||
// add(mButtonGetPrices);
|
||||
|
||||
// Label nameLabel=new Label("Matching Funds",Label.LEFT);
|
||||
// constraints.gridwidth=1;
|
||||
// layout.setConstraints(nameLabel,constraints);
|
||||
// add(nameLabel);
|
||||
|
||||
// mFundList=new List(7,false);
|
||||
// mFundList.addActionListener(mListListener);
|
||||
// constraints.gridwidth=GridBagConstraints.RELATIVE;
|
||||
// layout.setConstraints(mFundList,constraints);
|
||||
// add(mFundList);
|
||||
// mButtonLookupByName=new Button("Lookup By Name");
|
||||
// constraints.gridwidth=GridBagConstraints.REMAINDER;
|
||||
// layout.setConstraints(mButtonLookupByName,constraints);
|
||||
// add(mButtonLookupByName);
|
||||
|
||||
// mLabelMessage=new Label("Ready.",Label.LEFT);
|
||||
// constraints.gridwidth=GridBagConstraints.REMAINDER;
|
||||
// layout.setConstraints(mLabelMessage,constraints);
|
||||
// add(mLabelMessage);
|
||||
|
||||
// mLabelMessage.setText("Service located at "+mStrServerIP);
|
||||
}
|
||||
|
||||
private void getProcessList()
|
||||
{
|
||||
IRemoteProcess remoteProcess=(IRemoteProcess)new CoRemoteProcess();
|
||||
int moduleCount=0;
|
||||
remoteProcess.Snapshot();
|
||||
Variant processID=new Variant();
|
||||
processID=remoteProcess.GetProcessFirst();
|
||||
mProcessList.removeAll();
|
||||
while(-1!=processID.toInt())
|
||||
{
|
||||
String strString=new String(remoteProcess.GetModuleFirst().toString());
|
||||
while(0!=strString.compareTo("-1"))
|
||||
{
|
||||
if(0!=moduleCount)mProcessList.addItem(new String(" ")+strString);
|
||||
else mProcessList.addItem(strString);
|
||||
moduleCount++;
|
||||
strString=new String(remoteProcess.GetModuleNext().toString());
|
||||
}
|
||||
processID=remoteProcess.GetProcessNext();
|
||||
moduleCount=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
5
java/RemoteProcess/VJPROJS.SRG
Normal file
5
java/RemoteProcess/VJPROJS.SRG
Normal file
@@ -0,0 +1,5 @@
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\6.0]
|
||||
"DefaultProjectTreeSelection"="Applications"
|
||||
"DefaultProjectListSelection"="Windows Application"
|
||||
"DefaultProjItemTreeSelection"="Form"
|
||||
"DefaultProjItemListSelection"="Form"
|
||||
1
java/RemoteProcess/codebase.dat
Normal file
1
java/RemoteProcess/codebase.dat
Normal file
@@ -0,0 +1 @@
|
||||
file:/e:\work\java\remoteprocess
|
||||
27
java/RemoteProcess/index.html
Normal file
27
java/RemoteProcess/index.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type"
|
||||
content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body background="paper.gif">
|
||||
|
||||
<h2 align="center">Remote Process Applet</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>
|
||||
<applet code="RemoteProcess.class" codebase="./" align="middle"
|
||||
width="835" height="480" archive="fund.zip" name="Fund"><param
|
||||
name="cabbase" value="remoteprocess.cab"><param name="background"
|
||||
value="008080"><param
|
||||
name="port" value="8251"><paramname="foreground" value="FFFFFF"></applet>
|
||||
</p>
|
||||
<hr>
|
||||
<p><br>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
BIN
java/RemoteProcess/remoteprocess.CAB
Normal file
BIN
java/RemoteProcess/remoteprocess.CAB
Normal file
Binary file not shown.
13
java/RemoteProcess/remoteprocess.sln
Normal file
13
java/RemoteProcess/remoteprocess.sln
Normal file
@@ -0,0 +1,13 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 1.00
|
||||
Project("{66355F20-A65B-11D0-BFB5-00A0C91EBFA0}") = "remoteprocess", "remoteprocess.vjp", "{7389B3D0-A04A-11D3-B309-0050043ED4DB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(LocalDeployment) = postSolution
|
||||
StartupProject = {7389B3D0-A04A-11D3-B309-0050043ED4DB}
|
||||
EndGlobalSection
|
||||
GlobalSection(BuildOrder) = postSolution
|
||||
0 = {7389B3D0-A04A-11D3-B309-0050043ED4DB}
|
||||
EndGlobalSection
|
||||
GlobalSection(DeploymentRoot) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
BIN
java/RemoteProcess/remoteprocess.suo
Normal file
BIN
java/RemoteProcess/remoteprocess.suo
Normal file
Binary file not shown.
BIN
java/RemoteProcess/remoteprocess.vjp
Normal file
BIN
java/RemoteProcess/remoteprocess.vjp
Normal file
Binary file not shown.
BIN
java/RemoteProcess/remoteps/CoRemoteProcess.class
Normal file
BIN
java/RemoteProcess/remoteps/CoRemoteProcess.class
Normal file
Binary file not shown.
BIN
java/RemoteProcess/remoteps/IRemoteProcess.class
Normal file
BIN
java/RemoteProcess/remoteps/IRemoteProcess.class
Normal file
Binary file not shown.
Reference in New Issue
Block a user