com.exceljava.jinx.IUnknown Maven / Gradle / Ivy
package com.exceljava.jinx;
/**
* IUnknown is a wrapper around a COM IUnknown pointer.
*
* Generally this will be used in conjunction with a Java/COM
* bridge, such as jinx-com4j.
*/
public interface IUnknown {
/**
* Convert an IUnknown to another COM interface.
*
* This requires a Java-COM bridge, such as jinx-com4j.
* See https://github.com/exceljava/jinx-com4j.
*
* @param cls COM wrapper class to cast to.
* @param COM wrapper class to cast to.
* @return COM object cast to 'cls'.
* @since 2.0
*/
T queryInterface(Class cls);
/**
* The returned long is a reference to an IUnknown C pointer.
*
* This is a low level call only intended for supporting libraries
* and shouldn't need to be called by user code.
*
* @param addRef If true, IUnknown::AddRef will be called
* before returning the pointer.
* @return Pointer to reference of an IUnknown COM object.
* @since 2.0
*/
long getPointer(boolean addRef);
/**
* Release the reference to the IUnknown pointer.
*
* Calls to getPointer and queryInterface made after the object
* has been closed will fail.
*
* @since 2.0
*/
void close();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy