SF3436102 convert 32 bit memory pointers to 64 bit where not already converted.
This commit is contained in:
@@ -50,7 +50,7 @@ public class Dispatch extends JacobObject {
|
||||
* directly to get the dispatch id. You really can't rename it or make it
|
||||
* private
|
||||
*/
|
||||
public int m_pDispatch;
|
||||
public long m_pDispatch;
|
||||
|
||||
/** program Id passed in by ActiveX components in their constructor */
|
||||
private String programId = null;
|
||||
@@ -198,7 +198,7 @@ public class Dispatch extends JacobObject {
|
||||
*
|
||||
* @param pDisp
|
||||
*/
|
||||
protected Dispatch(int pDisp) {
|
||||
protected Dispatch(long pDisp) {
|
||||
m_pDispatch = pDisp;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public class DispatchProxy extends JacobObject {
|
||||
/**
|
||||
* Comment for <code>m_pStream</code>
|
||||
*/
|
||||
public int m_pStream;
|
||||
public long m_pStream;
|
||||
|
||||
/**
|
||||
* Marshals the passed in dispatch into the stream
|
||||
@@ -67,6 +67,7 @@ public class DispatchProxy extends JacobObject {
|
||||
*
|
||||
* @see java.lang.Object#finalize()
|
||||
*/
|
||||
@Override
|
||||
public void finalize() {
|
||||
safeRelease();
|
||||
}
|
||||
@@ -76,6 +77,7 @@ public class DispatchProxy extends JacobObject {
|
||||
*
|
||||
* @see com.jacob.com.JacobObject#safeRelease()
|
||||
*/
|
||||
@Override
|
||||
public void safeRelease() {
|
||||
super.safeRelease();
|
||||
if (m_pStream != 0) {
|
||||
|
||||
@@ -25,13 +25,14 @@ package com.jacob.com;
|
||||
*/
|
||||
public class EnumVariant extends JacobObject implements
|
||||
java.util.Enumeration<Variant> {
|
||||
private int m_pIEnumVARIANT;
|
||||
/** pointer to windows memory */
|
||||
private long m_pIEnumVARIANT;
|
||||
|
||||
private final Variant[] m_recBuf = new Variant[1];
|
||||
|
||||
// this only gets called from JNI
|
||||
//
|
||||
protected EnumVariant(int pIEnumVARIANT) {
|
||||
protected EnumVariant(long pIEnumVARIANT) {
|
||||
m_pIEnumVARIANT = pIEnumVARIANT;
|
||||
}
|
||||
|
||||
@@ -41,10 +42,12 @@ public class EnumVariant extends JacobObject implements
|
||||
public EnumVariant(Dispatch disp) {
|
||||
int[] hres = new int[1];
|
||||
// SF 3377279
|
||||
// Added Dispatch.Method to the invoke flags to call _NewEnum. There are some
|
||||
// non-conforming legacy implementations that expose _NewEnum as a method.
|
||||
// Added Dispatch.Method to the invoke flags to call _NewEnum. There are
|
||||
// some
|
||||
// non-conforming legacy implementations that expose _NewEnum as a
|
||||
// method.
|
||||
Variant evv = Dispatch.invokev(disp, DispatchIdentifier.DISPID_NEWENUM,
|
||||
Dispatch.Get | Dispatch.Method, new Variant[0], hres);
|
||||
Dispatch.Get | Dispatch.Method, new Variant[0], hres);
|
||||
if (evv.getvt() != Variant.VariantObject)
|
||||
// The DISPID_NEWENUM did not result in a valid object
|
||||
throw new ComFailException("Can't obtain EnumVARIANT");
|
||||
@@ -132,6 +135,7 @@ public class EnumVariant extends JacobObject implements
|
||||
*
|
||||
* @see java.lang.Object#finalize()
|
||||
*/
|
||||
@Override
|
||||
protected void finalize() {
|
||||
safeRelease();
|
||||
}
|
||||
@@ -141,6 +145,7 @@ public class EnumVariant extends JacobObject implements
|
||||
*
|
||||
* @see com.jacob.com.JacobObject#safeRelease()
|
||||
*/
|
||||
@Override
|
||||
public void safeRelease() {
|
||||
super.safeRelease();
|
||||
if (m_pIEnumVARIANT != 0) {
|
||||
|
||||
@@ -25,8 +25,8 @@ package com.jacob.com;
|
||||
* were a later addition.
|
||||
*/
|
||||
public class SafeArray extends JacobObject {
|
||||
/** The super secret int that is actually the pointer to windows memory */
|
||||
int m_pV = 0;
|
||||
/** The super secret long that is actually the pointer to windows memory */
|
||||
long m_pV = 0;
|
||||
|
||||
/**
|
||||
* Constructor. Why does this exist? Yeah, someone will post on sourceforge
|
||||
@@ -114,6 +114,7 @@ public class SafeArray extends JacobObject {
|
||||
return new String(ja);
|
||||
}
|
||||
|
||||
@Override
|
||||
public native Object clone();
|
||||
|
||||
/**
|
||||
@@ -126,6 +127,7 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected void finalize() {
|
||||
safeRelease();
|
||||
}
|
||||
@@ -211,8 +213,8 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* get boolean value from N-dimensional array
|
||||
*
|
||||
* @param indices -
|
||||
* length must equal Dimension of SafeArray
|
||||
* @param indices
|
||||
* - length must equal Dimension of SafeArray
|
||||
* @return the value at the specified location
|
||||
*/
|
||||
public native boolean getBoolean(int indices[]);
|
||||
@@ -248,8 +250,8 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* get byte value from N-dimensional array
|
||||
*
|
||||
* @param indices -
|
||||
* length must equal Dimension of SafeArray
|
||||
* @param indices
|
||||
* - length must equal Dimension of SafeArray
|
||||
* @return the value at the specified location
|
||||
*/
|
||||
public native byte getByte(int indices[]);
|
||||
@@ -284,8 +286,8 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* get char value from N-dimensional array
|
||||
*
|
||||
* @param indices -
|
||||
* length must equal Dimension of SafeArray
|
||||
* @param indices
|
||||
* - length must equal Dimension of SafeArray
|
||||
* @return the value at the specified location
|
||||
*/
|
||||
public native char getChar(int indices[]);
|
||||
@@ -320,8 +322,8 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* get double value from N-dimensional array
|
||||
*
|
||||
* @param indices -
|
||||
* length must equal Dimension of SafeArray
|
||||
* @param indices
|
||||
* - length must equal Dimension of SafeArray
|
||||
* @return the value at the specified location
|
||||
*/
|
||||
public native double getDouble(int indices[]);
|
||||
@@ -367,8 +369,8 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* get float value from N-dimensional array
|
||||
*
|
||||
* @param indices -
|
||||
* length must equal Dimension of SafeArray
|
||||
* @param indices
|
||||
* - length must equal Dimension of SafeArray
|
||||
* @return the value at the specified location
|
||||
*/
|
||||
public native float getFloat(int indices[]);
|
||||
@@ -405,8 +407,8 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* get int value from N-dimensional array
|
||||
*
|
||||
* @param indices -
|
||||
* length must equal Dimension of SafeArray
|
||||
* @param indices
|
||||
* - length must equal Dimension of SafeArray
|
||||
* @return the value at the specified location
|
||||
*/
|
||||
public native int getInt(int indices[]);
|
||||
@@ -448,8 +450,8 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* get long value from N-dimensional array
|
||||
*
|
||||
* @param indices -
|
||||
* length must equal Dimension of SafeArray
|
||||
* @param indices
|
||||
* - length must equal Dimension of SafeArray
|
||||
* @return the value at the specified location
|
||||
*/
|
||||
public native long getLong(int indices[]);
|
||||
@@ -516,8 +518,8 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* get short value from N-dimensional array
|
||||
*
|
||||
* @param indices -
|
||||
* length must equal Dimension of SafeArray
|
||||
* @param indices
|
||||
* - length must equal Dimension of SafeArray
|
||||
* @return the value at the specified location
|
||||
*/
|
||||
public native short getShort(int indices[]);
|
||||
@@ -554,8 +556,8 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* get String value from N-dimensional array
|
||||
*
|
||||
* @param indices -
|
||||
* length must equal Dimension of SafeArray
|
||||
* @param indices
|
||||
* - length must equal Dimension of SafeArray
|
||||
* @return the value at the specified location
|
||||
*/
|
||||
public native String getString(int indices[]);
|
||||
@@ -603,8 +605,8 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* get Variant value from N-dimensional array
|
||||
*
|
||||
* @param indices -
|
||||
* length must equal Dimension of SafeArray
|
||||
* @param indices
|
||||
* - length must equal Dimension of SafeArray
|
||||
* @return the value at the specified location
|
||||
*/
|
||||
public native Variant getVariant(int indices[]);
|
||||
@@ -654,6 +656,7 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void safeRelease() {
|
||||
super.safeRelease();
|
||||
if (m_pV != 0) {
|
||||
@@ -679,8 +682,8 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* set boolean value in N-dimensional array
|
||||
*
|
||||
* @param indices -
|
||||
* length must equal Dimension of SafeArray
|
||||
* @param indices
|
||||
* - length must equal Dimension of SafeArray
|
||||
* @param c
|
||||
*/
|
||||
public native void setBoolean(int indices[], boolean c);
|
||||
@@ -716,8 +719,8 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* set byte value in N-dimensional array
|
||||
*
|
||||
* @param indices -
|
||||
* length must equal Dimension of SafeArray
|
||||
* @param indices
|
||||
* - length must equal Dimension of SafeArray
|
||||
* @param c
|
||||
*/
|
||||
public native void setByte(int indices[], byte c);
|
||||
@@ -752,8 +755,8 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* set char value in N-dimensional array
|
||||
*
|
||||
* @param indices -
|
||||
* length must equal Dimension of SafeArray
|
||||
* @param indices
|
||||
* - length must equal Dimension of SafeArray
|
||||
* @param c
|
||||
*/
|
||||
public native void setChar(int indices[], char c);
|
||||
@@ -788,8 +791,8 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* set double value in N-dimensional array
|
||||
*
|
||||
* @param indices -
|
||||
* length must equal Dimension of SafeArray
|
||||
* @param indices
|
||||
* - length must equal Dimension of SafeArray
|
||||
* @param c
|
||||
*/
|
||||
public native void setDouble(int indices[], double c);
|
||||
@@ -825,8 +828,8 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* set float value in N-dimensional array
|
||||
*
|
||||
* @param indices -
|
||||
* length must equal Dimension of SafeArray
|
||||
* @param indices
|
||||
* - length must equal Dimension of SafeArray
|
||||
* @param c
|
||||
*/
|
||||
public native void setFloat(int indices[], float c);
|
||||
@@ -864,8 +867,8 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* set int value in N-dimensional array
|
||||
*
|
||||
* @param indices -
|
||||
* length must equal Dimension of SafeArray
|
||||
* @param indices
|
||||
* - length must equal Dimension of SafeArray
|
||||
* @param c
|
||||
*/
|
||||
public native void setInt(int indices[], int c);
|
||||
@@ -910,8 +913,8 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* set long value in N-dimensional array
|
||||
*
|
||||
* @param indices -
|
||||
* length must equal Dimension of SafeArray
|
||||
* @param indices
|
||||
* - length must equal Dimension of SafeArray
|
||||
* @param c
|
||||
*/
|
||||
public native void setLong(int indices[], long c);
|
||||
@@ -963,8 +966,8 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* set short value in N-dimensional array
|
||||
*
|
||||
* @param indices -
|
||||
* length must equal Dimension of SafeArray
|
||||
* @param indices
|
||||
* - length must equal Dimension of SafeArray
|
||||
* @param c
|
||||
*/
|
||||
public native void setShort(int indices[], short c);
|
||||
@@ -1006,8 +1009,8 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* set Stringvalue in N-dimensional array
|
||||
*
|
||||
* @param indices -
|
||||
* length must equal Dimension of SafeArray
|
||||
* @param indices
|
||||
* - length must equal Dimension of SafeArray
|
||||
* @param c
|
||||
*/
|
||||
public native void setString(int indices[], String c);
|
||||
@@ -1043,8 +1046,8 @@ public class SafeArray extends JacobObject {
|
||||
/**
|
||||
* set Variant value in N-dimensional array
|
||||
*
|
||||
* @param indices -
|
||||
* length must equal Dimension of SafeArray
|
||||
* @param indices
|
||||
* - length must equal Dimension of SafeArray
|
||||
* @param v
|
||||
*/
|
||||
public native void setVariant(int indices[], Variant v);
|
||||
@@ -1121,6 +1124,7 @@ public class SafeArray extends JacobObject {
|
||||
*
|
||||
* @return String contents of variant
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
String s = "";
|
||||
int ndim = getNumDim();
|
||||
|
||||
@@ -161,7 +161,7 @@ public class Variant extends JacobObject {
|
||||
/**
|
||||
* Pointer to MS struct.
|
||||
*/
|
||||
int m_pVariant = 0;
|
||||
long m_pVariant = 0;
|
||||
|
||||
/**
|
||||
* public constructor, initializes and sets type to VariantEmpty
|
||||
@@ -846,7 +846,7 @@ public class Variant extends JacobObject {
|
||||
JacobObject.debug("About to call getVariantVariant()");
|
||||
}
|
||||
Variant enclosedVariant = new Variant();
|
||||
int enclosedVariantMemory = getVariantVariant();
|
||||
long enclosedVariantMemory = getVariantVariant();
|
||||
enclosedVariant.m_pVariant = enclosedVariantMemory;
|
||||
Object enclosedVariantAsJava = enclosedVariant.toJavaObject();
|
||||
// zero out the reference to the underlying windows memory so that
|
||||
@@ -1020,7 +1020,7 @@ public class Variant extends JacobObject {
|
||||
*
|
||||
* @return Variant one of the VT_Variant types
|
||||
*/
|
||||
private native int getVariantVariant();
|
||||
private native long getVariantVariant();
|
||||
|
||||
/**
|
||||
* Reports the type of the underlying Variant object
|
||||
|
||||
Reference in New Issue
Block a user