removed author tags

This commit is contained in:
clay_shooter
2005-01-08 17:11:15 +00:00
parent cf4a880668
commit 34a1852dd5
5 changed files with 925 additions and 926 deletions

View File

@@ -27,10 +27,7 @@
package com.jacob.com; package com.jacob.com;
/** /**
* @author joe * COM Fail Exception class raise dwhen there is a problem
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/ */
public class ComFailException extends ComException { public class ComFailException extends ComException {
/** /**

View File

@@ -27,10 +27,7 @@
package com.jacob.com; package com.jacob.com;
/** /**
* @author joe * represents a COM level thread
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/ */
public abstract class ComThread { public abstract class ComThread {
private static final int MTA = 0x0; private static final int MTA = 0x0;

File diff suppressed because it is too large Load Diff

View File

@@ -30,10 +30,7 @@
package com.jacob.com; package com.jacob.com;
/** /**
* @author joe * ???
*
* TODO To change the template for this generated type comment go to Window -
* Preferences - Java - Code Style - Code Templates
*/ */
public class DispatchEvents extends JacobObject { public class DispatchEvents extends JacobObject {
int m_pConnPtProxy = 0; int m_pConnPtProxy = 0;

View File

@@ -1,368 +1,372 @@
/* /*
* Copyright (c) 1999-2004 Sourceforge JACOB Project. * Copyright (c) 1999-2004 Sourceforge JACOB Project.
* All rights reserved. Originator: Dan Adler (http://danadler.com). * All rights reserved. Originator: Dan Adler (http://danadler.com).
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
* 1. Redistributions of source code must retain the above copyright * 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Redistributions in any form must be accompanied by information on * 3. Redistributions in any form must be accompanied by information on
* how to obtain complete source code for the JACOB software. * how to obtain complete source code for the JACOB software.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE. * OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package com.jacob.com; package com.jacob.com;
public class Variant extends JacobObject implements java.io.Serializable /**
{ * The multi-format data type used for all call backs and most
int m_pVariant = 0; * communications between Java and COM
*/
public static final short VariantEmpty = 0; public class Variant extends JacobObject implements java.io.Serializable
public static final short VariantNull = 1; {
public static final short VariantShort = 2; int m_pVariant = 0;
public static final short VariantInt = 3;
public static final short VariantFloat = 4; public static final short VariantEmpty = 0;
public static final short VariantDouble = 5; public static final short VariantNull = 1;
public static final short VariantCurrency = 6; public static final short VariantShort = 2;
public static final short VariantDate = 7; public static final short VariantInt = 3;
public static final short VariantString = 8; public static final short VariantFloat = 4;
public static final short VariantDispatch = 9; public static final short VariantDouble = 5;
public static final short VariantError = 10; public static final short VariantCurrency = 6;
public static final short VariantBoolean = 11; public static final short VariantDate = 7;
public static final short VariantVariant = 12; public static final short VariantString = 8;
public static final short VariantObject = 13; public static final short VariantDispatch = 9;
public static final short VariantByte = 17; public static final short VariantError = 10;
public static final short VariantTypeMask = 4095; public static final short VariantBoolean = 11;
public static final short VariantArray = 8192; public static final short VariantVariant = 12;
public static final short VariantByref = 16384; public static final short VariantObject = 13;
public static final short VariantByte = 17;
public native int toInt(); public static final short VariantTypeMask = 4095;
public native double toDate(); public static final short VariantArray = 8192;
public native boolean toBoolean(); public static final short VariantByref = 16384;
public native EnumVariant toEnumVariant();
public native int toInt();
public native void getNull(); public native double toDate();
public native void putNull(); public native boolean toBoolean();
public native EnumVariant toEnumVariant();
public native Variant cloneIndirect();
public native double toDouble(); public native void getNull();
public native long toCurrency(); public native void putNull();
// superceded by SafeArray public native Variant cloneIndirect();
public void putVariantArray(Variant[] in) public native double toDouble();
{ public native long toCurrency();
throw new ComFailException("Not implemented");
} // superceded by SafeArray
public void putVariantArray(Variant[] in)
// superceded by SafeArray {
public Variant[] getVariantArray() throw new ComFailException("Not implemented");
{ }
throw new ComFailException("Not implemented");
} // superceded by SafeArray
public Variant[] getVariantArray()
// superceded by SafeArray {
public void putByteArray(Object in) throw new ComFailException("Not implemented");
{ }
throw new ComFailException("Not implemented");
} // superceded by SafeArray
public void putByteArray(Object in)
public native void putShortRef(short in); {
public native void putIntRef(int in); throw new ComFailException("Not implemented");
public native void putDoubleRef(double in); }
public native void putDateRef(double in);
public native void putStringRef(String in); public native void putShortRef(short in);
public native short getShortRef(); public native void putIntRef(int in);
public native int getIntRef(); public native void putDoubleRef(double in);
public native void putShort(short in); public native void putDateRef(double in);
public native short getShort(); public native void putStringRef(String in);
public native double getDoubleRef(); public native short getShortRef();
public native double getDateRef(); public native int getIntRef();
public native String getStringRef(); public native void putShort(short in);
public native short getShort();
// superceded by SafeArray public native double getDoubleRef();
public Object toCharArray() public native double getDateRef();
{ public native String getStringRef();
throw new ComFailException("Not implemented");
} // superceded by SafeArray
public Object toCharArray()
public native void VariantClear(); {
public native Dispatch toDispatch(); throw new ComFailException("Not implemented");
public native Object clone(); }
public native String toString();
public native int getInt(); public native void VariantClear();
public native double getDate(); public native Dispatch toDispatch();
public native void putInt(int in); public native Object clone();
public native void putDate(double in); public native String toString();
public native byte toByte(); public native int getInt();
public native double getDate();
public Object getDispatch() { return toDispatch(); } public native void putInt(int in);
public void putDispatch(Object in) { putObject(in); } public native void putDate(double in);
public native byte toByte();
public native boolean getBoolean();
public native byte getByte(); public Object getDispatch() { return toDispatch(); }
public native void putBoolean(boolean in); public void putDispatch(Object in) { putObject(in); }
public native void putByte(byte in);
public native int toError(); public native boolean getBoolean();
public native byte getByte();
public Object toObject() public native void putBoolean(boolean in);
{ public native void putByte(byte in);
return toDispatch(); public native int toError();
}
public Object toObject()
public native void getEmpty(); {
public native void putEmpty(); return toDispatch();
public native int getError(); }
public native void putError(int in);
public native double getDouble(); public native void getEmpty();
public Object getObject() public native void putEmpty();
{ public native int getError();
return toDispatch(); public native void putError(int in);
} public native double getDouble();
public Object getObject()
public native void putCurrency(long in); {
return toDispatch();
public native void putObject(Object in); }
public native void putDouble(double in); public native void putCurrency(long in);
public native long getCurrency();
public native void putFloatRef(float in); public native void putObject(Object in);
public native void putCurrencyRef(long in);
public native void putErrorRef(int in); public native void putDouble(double in);
public native void putBooleanRef(boolean in); public native long getCurrency();
public native void putFloatRef(float in);
public void putObjectRef(Object in) public native void putCurrencyRef(long in);
{ public native void putErrorRef(int in);
putObject(in); public native void putBooleanRef(boolean in);
}
public void putObjectRef(Object in)
public native void putByteRef(byte in); {
public native String getString(); putObject(in);
public native void putString(String in); }
public native float getFloatRef();
public native long getCurrencyRef(); public native void putByteRef(byte in);
public native int getErrorRef(); public native String getString();
public native boolean getBooleanRef(); public native void putString(String in);
public native Object getObjectRef(); public native float getFloatRef();
public native byte getByteRef(); public native long getCurrencyRef();
public native float toFloat(); public native int getErrorRef();
public native boolean getBooleanRef();
/** public native Object getObjectRef();
* By default toSafeArray makes a deep copy due to the fact public native byte getByteRef();
* that this Variant owns the embedded SafeArray and will public native float toFloat();
* destroy it when it gc's
*/ /**
public SafeArray toSafeArray() * By default toSafeArray makes a deep copy due to the fact
{ * that this Variant owns the embedded SafeArray and will
return toSafeArray(true); * destroy it when it gc's
} */
public SafeArray toSafeArray()
public native SafeArray toSafeArray(boolean deepCopy); {
public native void putSafeArrayRef(SafeArray in); return toSafeArray(true);
public native void putSafeArray(SafeArray in); }
public native void noParam(); public native SafeArray toSafeArray(boolean deepCopy);
public native void putSafeArrayRef(SafeArray in);
// superceded by SafeArray public native void putSafeArray(SafeArray in);
public void putCharArray(Object in)
{ public native void noParam();
throw new ComFailException("Not implemented");
} // superceded by SafeArray
public void putCharArray(Object in)
public native float getFloat(); {
public native void putFloat(float in); throw new ComFailException("Not implemented");
}
public void putDispatchRef(Object in) { putDispatch(in); }
public Object getDispatchRef() { return getDispatch(); } public native float getFloat();
public native void putFloat(float in);
// superceded by SafeArray
public void putVariantArrayRef(Variant[] in) public void putDispatchRef(Object in) { putDispatch(in); }
{ public Object getDispatchRef() { return getDispatch(); }
throw new ClassCastException("Not implemented");
} // superceded by SafeArray
public void putVariantArrayRef(Variant[] in)
// superceded by SafeArray {
public Variant[] getVariantArrayRef() throw new ClassCastException("Not implemented");
{ }
throw new ClassCastException("Not implemented");
} // superceded by SafeArray
public Variant[] getVariantArrayRef()
public native void changeType(short in); {
throw new ClassCastException("Not implemented");
public void changeType(int in) }
{
changeType((short)in); public native void changeType(short in);
}
public void changeType(int in)
public Object toScriptObject() { return toDispatch(); } {
changeType((short)in);
public Variant() }
{
init(); public Object toScriptObject() { return toDispatch(); }
putEmpty();
} public Variant()
{
public Variant(int in) init();
{ putEmpty();
init(); }
putInt(in);
} public Variant(int in)
{
public Variant(double in) init();
{ putInt(in);
init(); }
putDouble(in);
} public Variant(double in)
{
public Variant(boolean in) init();
{ putDouble(in);
init(); }
putBoolean(in);
} public Variant(boolean in)
{
public Variant(String in) init();
{ putBoolean(in);
init(); }
putString(in);
} public Variant(String in)
{
public Variant(SafeArray in,boolean fByRef) init();
{ putString(in);
init(); }
if (fByRef) {
putSafeArrayRef(in); public Variant(SafeArray in,boolean fByRef)
} else { {
putSafeArray(in); init();
} if (fByRef) {
} putSafeArrayRef(in);
} else {
public Variant(Object in) putSafeArray(in);
{ }
this(in, false); }
}
public Variant(Object in)
public Variant(Object o,boolean fByRef) {
{ this(in, false);
init(); }
if (o == null) {
putEmpty(); public Variant(Object o,boolean fByRef)
} else if (o instanceof Integer) { {
if (fByRef) putIntRef(((Integer)o).intValue()); init();
else putInt(((Integer)o).intValue()); if (o == null) {
} else if (o instanceof String) { putEmpty();
if (fByRef) putStringRef((String)o); } else if (o instanceof Integer) {
else putString((String)o); if (fByRef) putIntRef(((Integer)o).intValue());
} else if (o instanceof Boolean) { else putInt(((Integer)o).intValue());
if (fByRef) putBooleanRef(((Boolean)o).booleanValue()); } else if (o instanceof String) {
else putBoolean(((Boolean)o).booleanValue()); if (fByRef) putStringRef((String)o);
} else if (o instanceof Double) { else putString((String)o);
if (fByRef) putDoubleRef(((Double)o).doubleValue()); } else if (o instanceof Boolean) {
else putDouble(((Double)o).doubleValue()); if (fByRef) putBooleanRef(((Boolean)o).booleanValue());
} else if (o instanceof Float) { else putBoolean(((Boolean)o).booleanValue());
if (fByRef) putFloatRef(((Float)o).floatValue()); } else if (o instanceof Double) {
else putFloat(((Float)o).floatValue()); if (fByRef) putDoubleRef(((Double)o).doubleValue());
} else if (o instanceof SafeArray) { else putDouble(((Double)o).doubleValue());
if (fByRef) putSafeArrayRef((SafeArray)o); } else if (o instanceof Float) {
else putSafeArray((SafeArray)o); if (fByRef) putFloatRef(((Float)o).floatValue());
} else { else putFloat(((Float)o).floatValue());
if (fByRef) putObjectRef(o); else putObject(o); } else if (o instanceof SafeArray) {
} if (fByRef) putSafeArrayRef((SafeArray)o);
} else putSafeArray((SafeArray)o);
} else {
//weird constructors if (fByRef) putObjectRef(o); else putObject(o);
public Variant(int in,int in1) }
{ }
throw new ComFailException("Not implemented");
} //weird constructors
public Variant(int in,int in1)
public Variant(int in,boolean in1) {
{ throw new ComFailException("Not implemented");
throw new ComFailException("Not implemented"); }
}
public Variant(int in,boolean in1)
public Variant(int in,double in1) {
{ throw new ComFailException("Not implemented");
throw new ComFailException("Not implemented"); }
}
public Variant(int in,double in1)
public Variant(int in,Object in1) {
{ throw new ComFailException("Not implemented");
throw new ComFailException("Not implemented"); }
}
public Variant(int in,Object in1)
public native short getvt(); {
public native short toShort(); throw new ComFailException("Not implemented");
}
// call this to explicitly release the com object before gc
public native void release(); public native short getvt();
public native short toShort();
protected native void init();
// call this to explicitly release the com object before gc
protected void finalize() public native void release();
{
//System.out.println("Variant finalize start:"+m_pVariant); protected native void init();
if (m_pVariant != 0) release();
//System.out.println("Variant finalize end"); protected void finalize()
} {
//System.out.println("Variant finalize start:"+m_pVariant);
if (m_pVariant != 0) release();
// superceded by SafeArray //System.out.println("Variant finalize end");
public Variant[] toVariantArray() }
{
throw new ClassCastException("Not implemented");
} // superceded by SafeArray
public Variant[] toVariantArray()
// superceded by SafeArray {
public Object toByteArray() throw new ClassCastException("Not implemented");
{ }
throw new ClassCastException("Not implemented");
} // superceded by SafeArray
public Object toByteArray()
static { {
System.loadLibrary("jacob"); throw new ClassCastException("Not implemented");
} }
// serialization support static {
private void writeObject(java.io.ObjectOutputStream oos) System.loadLibrary("jacob");
{ }
try {
Save(oos); // serialization support
} catch (Exception e) { private void writeObject(java.io.ObjectOutputStream oos)
e.printStackTrace(); {
} try {
} Save(oos);
} catch (Exception e) {
private void readObject(java.io.ObjectInputStream ois) e.printStackTrace();
{ }
try { }
Load(ois);
} catch (Exception e) { private void readObject(java.io.ObjectInputStream ois)
e.printStackTrace(); {
} try {
} Load(ois);
} catch (Exception e) {
// is the variant null or empty or error or null disp e.printStackTrace();
public native boolean isNull(); }
}
public native void Save(java.io.OutputStream os)
throws java.io.IOException; // is the variant null or empty or error or null disp
public native boolean isNull();
public native void Load(java.io.InputStream is)
throws java.io.IOException; public native void Save(java.io.OutputStream os)
throws java.io.IOException;
}
public native void Load(java.io.InputStream is)
throws java.io.IOException;
}