📄 unknownptr.java
字号:
/*
* UnknownPtr.java -
*
* This file is part of the Jawin Project: http://jawinproject.sourceforge.net/
*
* Please consult the LICENSE file in the project root directory,
* or at the project site before using this software.
*/
/* $Id: UnknownPtr.java,v 1.3 2004/07/02 18:43:22 arosii_moa Exp $ */
package org.jawin;
import org.jawin.constants.WellKnownGUIDs;
/**
* concrete implementation of IUnknown. This is needed in particular in Variant, when
* marshalOut is called with a Variant of type VT_UNKNOWN. A concrete class is needed in
* the identity manager at that point, and this is the class.
*
* @version $Revision: 1.3 $
* @author Ken Larson
*/
public class UnknownPtr extends COMPtr {
public static final GUID PROXY_IID = WellKnownGUIDs.IID_IUnknown;
public static final int IID_TOKEN;
static {
IID_TOKEN = IdentityManager.registerProxy(PROXY_IID, UnknownPtr.class);
}
/**
* call to initialize (work actually done in static initializer)
*/
static final void init() {}
public int getIIDToken() {
return IID_TOKEN;
}
/**
* The required public no arg constructor.
* <br><br>
* <b>Important:</b>Should never be used as this creates an uninitialized
* UnknownPtr (it is required by Jawin for some internal working though).
*/
public UnknownPtr() {
super();
}
/**
* For creating a new COM-object with the given progid and with
* the IUnknown interface.
*
* @param progid the progid of the COM-object to create.
*/
public UnknownPtr(String progid) throws COMException {
super(progid, PROXY_IID);
}
/**
* For creating a new COM-object with the given clsid and with
* the IUnknown interface.
*
* @param clsid the GUID of the COM-object to create.
*/
public UnknownPtr(GUID clsid) throws COMException {
super(clsid, PROXY_IID);
}
/**
* For getting the IUnknown interface on an existing COM-object.
* This is an alternative to calling {@link #queryInterface(Class)}
* on comObject.
*
* @param comObject the COM-object to get the IUnknown interface on.
*/
public UnknownPtr(COMPtr comObject) throws COMException {
super(comObject);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -