summaryrefslogtreecommitdiff
path: root/NET/worlds/console/IUnknown.java
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-05-03 16:38:41 -0700
committerFuwn <[email protected]>2021-05-03 16:38:41 -0700
commite1e781bb2135ef78592226f1a3eaba4925702f1f (patch)
tree8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/console/IUnknown.java
downloadworlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.tar.xz
worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.zip
:star:HEADmain
Diffstat (limited to 'NET/worlds/console/IUnknown.java')
-rw-r--r--NET/worlds/console/IUnknown.java250
1 files changed, 250 insertions, 0 deletions
diff --git a/NET/worlds/console/IUnknown.java b/NET/worlds/console/IUnknown.java
new file mode 100644
index 0000000..b352d0b
--- /dev/null
+++ b/NET/worlds/console/IUnknown.java
@@ -0,0 +1,250 @@
+/* */ package NET.worlds.console;
+/* */
+/* */ import java.io.IOException;
+/* */ import java.io.PrintStream;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public class IUnknown
+/* */ {
+/* 28 */ protected int _pInterface = 0;
+/* 29 */ protected int _refs = 0;
+/* */
+/* */
+/* */
+/* */ private static final String IID_IUnknown = "{00000000-0000-0000-c000-000000000046}";
+/* */
+/* */
+/* */
+/* */
+/* */ public IUnknown()
+/* */ throws IOException
+/* */ {}
+/* */
+/* */
+/* */
+/* */ protected synchronized void init(int pInterface)
+/* */ throws IOException
+/* */ {
+/* 47 */ assert (pInterface != 0);
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 54 */ ActiveX.init(this);
+/* */
+/* */
+/* */
+/* 58 */ this._pInterface = pInterface;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 64 */ this._refs = 1;
+/* */ }
+/* */
+/* */
+/* */
+/* */ public IUnknown(String svrID)
+/* */ throws IOException
+/* */ {
+/* 72 */ if ((ActiveX.getDebugLevel() & 0x2) > 0) {
+/* 73 */ System.out.println(this + ": constructor: svrID = " + svrID);
+/* */ }
+/* 75 */ ActiveX.init(this);
+/* */ try
+/* */ {
+/* */ try
+/* */ {
+/* 80 */ this._pInterface = ActiveX.getClassFClsID(svrID, "{00000000-0000-0000-c000-000000000046}");
+/* 81 */ this._refs += 1;
+/* */ } catch (IOException e) {
+/* 83 */ this._pInterface = ActiveX.getClassFProgID(svrID, "{00000000-0000-0000-c000-000000000046}");
+/* 84 */ this._refs += 1;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 95 */ if ((ActiveX.getDebugLevel() & 0x2) <= 0) {
+/* */ return;
+/* */ }
+/* */ }
+/* */ catch (IOException e)
+/* */ {
+/* 91 */ ActiveX.uninit(this);
+/* 92 */ throw e;
+/* */ }
+/* */
+/* */
+/* 96 */ System.out.println("IUnknown: constructed " + this);
+/* */ }
+/* */
+/* */ public IUnknown(String svrID, String intfID)
+/* */ throws IOException
+/* */ {
+/* 102 */ if ((ActiveX.getDebugLevel() & 0x2) > 0) {
+/* 103 */ System.out.println(this + ": constructor: svrID = " + svrID +
+/* 104 */ ", intfID = " + intfID);
+/* */ }
+/* 106 */ init(svrID, intfID);
+/* */
+/* 108 */ if ((ActiveX.getDebugLevel() & 0x2) > 0) {
+/* 109 */ System.out.println("IUnknown: constructed " + this);
+/* */ }
+/* */ }
+/* */
+/* */ protected synchronized void init(String svrID, String intfID) throws IOException
+/* */ {
+/* 115 */ ActiveX.init(this);
+/* */ try
+/* */ {
+/* */ try
+/* */ {
+/* 120 */ this._pInterface = ActiveX.getClassFClsID(svrID, intfID);
+/* 121 */ this._refs += 1;
+/* */ } catch (IOException e) {
+/* 123 */ this._pInterface = ActiveX.getClassFProgID(svrID, intfID);
+/* 124 */ this._refs += 1;
+/* */ }
+/* */ return;
+/* */ }
+/* */ catch (IOException e) {
+/* 129 */ ActiveX.uninit(this);
+/* 130 */ throw e;
+/* */ }
+/* */ }
+/* */
+/* */ public IUnknown(IUnknown parent, String intfID)
+/* */ throws IOException, OLEInvalidObjectException
+/* */ {
+/* 137 */ if ((ActiveX.getDebugLevel() & 0x2) > 0) {
+/* 138 */ System.out.println(this + ": constructor: parent = " + parent +
+/* 139 */ ", intfID = " + intfID);
+/* */ }
+/* 141 */ init(parent, intfID);
+/* */
+/* 143 */ if ((ActiveX.getDebugLevel() & 0x2) > 0) {
+/* 144 */ System.out.println("IUnknown: constructed " + this);
+/* */ }
+/* */ }
+/* */
+/* */ protected synchronized void init(IUnknown parent, String intfID) throws IOException, OLEInvalidObjectException
+/* */ {
+/* 150 */ assert (parent != null);
+/* 151 */ ActiveX.init(this);
+/* */ try {
+/* 153 */ this._pInterface = parent.QueryInterface(intfID);
+/* 154 */ this._refs = 1;
+/* */ }
+/* */ catch (IOException e) {
+/* 157 */ ActiveX.uninit(this);
+/* 158 */ throw e;
+/* */ } catch (OLEInvalidObjectException e) {
+/* 160 */ ActiveX.uninit(this);
+/* 161 */ throw e;
+/* */ }
+/* */ }
+/* */
+/* */ public synchronized void Release() throws OLEInvalidObjectException
+/* */ {
+/* 167 */ if ((ActiveX.getDebugLevel() & 0x4) > 0) {
+/* 168 */ System.out.println(this + ": Releasing");
+/* */ }
+/* 170 */ if (this._pInterface == 0)
+/* 171 */ throw new OLEInvalidObjectException();
+/* 172 */ if ((this._pInterface != 0) && (this._refs > 0))
+/* 173 */ true_Release();
+/* 174 */ this._refs -= 1;
+/* 175 */ if (this._refs == 0)
+/* */ {
+/* */
+/* */
+/* 179 */ this._pInterface = 0;
+/* 180 */ ActiveX.uninit(this);
+/* */ }
+/* */ }
+/* */
+/* */ public void finalize()
+/* */ {
+/* 186 */ if (this._pInterface != 0)
+/* */ {
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 195 */ while (this._refs > 0) {
+/* */ try {
+/* 197 */ Release();
+/* */ } catch (OLEInvalidObjectException e) {
+/* 199 */ System.out.println("DEBUG: " + this);
+/* 200 */ if (!$assertionsDisabled) throw new AssertionError();
+/* */ }
+/* */ }
+/* */ }
+/* */ }
+/* */
+/* */ public synchronized void AddRef() throws OLEInvalidObjectException
+/* */ {
+/* 208 */ if ((ActiveX.getDebugLevel() & 0x4) > 0) {
+/* 209 */ System.out.println(this + ": AddingRef");
+/* */ }
+/* 211 */ if (this._pInterface == 0)
+/* 212 */ throw new OLEInvalidObjectException();
+/* 213 */ this._refs += 1;
+/* 214 */ true_AddRef();
+/* */ }
+/* */
+/* */ public native void true_AddRef();
+/* */
+/* */ public native int QueryInterface(String paramString) throws IOException, OLEInvalidObjectException;
+/* */
+/* */ public native void true_Release() throws OLEInvalidObjectException;
+/* */
+/* */ protected native int getPtr() throws OLEInvalidObjectException;
+/* */
+/* */ public String internalData()
+/* */ {
+/* 227 */ return "_pInterface=" + this._pInterface + ", _refs=" + this._refs;
+/* */ }
+/* */
+/* */ public String toString()
+/* */ {
+/* 232 */ return "IUnknown(" + internalData() + ")";
+/* */ }
+/* */ }
+
+
+/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\IUnknown.class
+ * Java compiler version: 6 (50.0)
+ * JD-Core Version: 0.7.1
+ */ \ No newline at end of file