use of com.sun.jna.platform.win32.WinNT.HRESULT 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.WinNT.HRESULT in project jna by java-native-access.
the class TypeInfoUtil method GetDllEntry.
/**
* Gets the dll entry.
*
* @param memid
* the memid
* @param invKind
* the inv kind
* @return the dll entry
*/
public DllEntry GetDllEntry(MEMBERID memid, INVOKEKIND invKind) {
BSTRByReference pBstrDllName = new BSTRByReference();
BSTRByReference pBstrName = new BSTRByReference();
WORDByReference pwOrdinal = new WORDByReference();
HRESULT hr = this.typeInfo.GetDllEntry(memid, invKind, pBstrDllName, pBstrName, pwOrdinal);
COMUtils.checkRC(hr);
OLEAUTO.SysFreeString(pBstrDllName.getValue());
OLEAUTO.SysFreeString(pBstrName.getValue());
return new DllEntry(pBstrDllName.getString(), pBstrName.getString(), pwOrdinal.getValue().intValue());
}
use of com.sun.jna.platform.win32.WinNT.HRESULT 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.WinNT.HRESULT in project jna by java-native-access.
the class TypeInfoUtil method GetContainingTypeLib.
/**
* Gets the containing type lib.
*
* @return the containing type lib
*/
public ContainingTypeLib GetContainingTypeLib() {
PointerByReference ppTLib = new PointerByReference();
UINTByReference pIndex = new UINTByReference();
HRESULT hr = this.typeInfo.GetContainingTypeLib(ppTLib, pIndex);
COMUtils.checkRC(hr);
return new ContainingTypeLib(new TypeLib(ppTLib.getValue()), pIndex.getValue().intValue());
}
use of com.sun.jna.platform.win32.WinNT.HRESULT in project jna by java-native-access.
the class TypeInfoUtil method getTypeComp.
/**
* Gets the type comp.
*
* @return the type comp
*/
public TypeComp getTypeComp() {
PointerByReference ppTypeAttr = new PointerByReference();
HRESULT hr = this.typeInfo.GetTypeComp(ppTypeAttr);
COMUtils.checkRC(hr);
return new TypeComp(ppTypeAttr.getValue());
}
Aggregations