use of com.sun.jna.platform.win32.OaIdl.HREFTYPE in project jna by java-native-access.
the class TlbAbstractMethod method getType.
protected String getType(TYPEDESC typeDesc) {
VARTYPE vt = typeDesc.vt;
String type = "not_defined";
if (vt.intValue() == Variant.VT_PTR) {
TYPEDESC lptdesc = typeDesc._typedesc.getLptdesc();
type = this.getType(lptdesc);
} else if (vt.intValue() == Variant.VT_SAFEARRAY || vt.intValue() == Variant.VT_CARRAY) {
TYPEDESC tdescElem = typeDesc._typedesc.getLpadesc().tdescElem;
type = this.getType(tdescElem);
} else if (vt.intValue() == Variant.VT_USERDEFINED) {
HREFTYPE hreftype = typeDesc._typedesc.hreftype;
type = this.getUserdefinedType(hreftype);
} else {
type = this.getVarType(vt);
}
return type;
}
use of com.sun.jna.platform.win32.OaIdl.HREFTYPE in project jna by java-native-access.
the class TypeInfoUtil method getRefTypeOfImplType.
/**
* Gets the ref type of impl type.
*
* @param index
* the index
* @return the ref type of impl type
*/
public HREFTYPE getRefTypeOfImplType(int index) {
HREFTYPEByReference ppTInfo = new HREFTYPEByReference();
HRESULT hr = this.typeInfo.GetRefTypeOfImplType(new UINT(index), ppTInfo);
COMUtils.checkRC(hr);
return ppTInfo.getValue();
}
use of com.sun.jna.platform.win32.OaIdl.HREFTYPE in project jna by java-native-access.
the class TypeInfoUtil method getRefTypeInfo.
/**
* Gets the ref type info.
*
* @param hreftype
* the hreftype
* @return the ref type info
*/
public ITypeInfo getRefTypeInfo(HREFTYPE hreftype) {
PointerByReference ppTInfo = new PointerByReference();
HRESULT hr = this.typeInfo.GetRefTypeInfo(hreftype, ppTInfo);
COMUtils.checkRC(hr);
return new TypeInfo(ppTInfo.getValue());
}
use of com.sun.jna.platform.win32.OaIdl.HREFTYPE in project jna by java-native-access.
the class TlbAbstractMethod method getUserdefinedType.
protected String getUserdefinedType(HREFTYPE hreftype) {
ITypeInfo refTypeInfo = this.typeInfoUtil.getRefTypeInfo(hreftype);
TypeInfoUtil typeInfoUtil = new TypeInfoUtil(refTypeInfo);
TypeInfoDoc documentation = typeInfoUtil.getDocumentation(OaIdl.MEMBERID_NIL);
return documentation.getName();
}
Aggregations