Search in sources :

Example 1 with HREFTYPEByReference

use of com.sun.jna.platform.win32.OaIdl.HREFTYPEByReference 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();
}
Also used : HRESULT(com.sun.jna.platform.win32.WinNT.HRESULT) HREFTYPEByReference(com.sun.jna.platform.win32.OaIdl.HREFTYPEByReference) UINT(com.sun.jna.platform.win32.WinDef.UINT)

Example 2 with HREFTYPEByReference

use of com.sun.jna.platform.win32.OaIdl.HREFTYPEByReference in project jna by java-native-access.

the class ITypeInfoTest method testGetRefTypeOfImplType.

@Test
public void testGetRefTypeOfImplType() {
    ITypeInfo typeInfo = getTypeInfo();
    HREFTYPEByReference pRefType = new HREFTYPEByReference();
    HRESULT hr = typeInfo.GetRefTypeOfImplType(new UINT(0), pRefType);
    COMUtils.checkRC(hr);
    assertEquals(0, hr.intValue());
//System.out.println("GetRefTypeOfImplType: " + pRefType.toString());
}
Also used : HRESULT(com.sun.jna.platform.win32.WinNT.HRESULT) HREFTYPEByReference(com.sun.jna.platform.win32.OaIdl.HREFTYPEByReference) UINT(com.sun.jna.platform.win32.WinDef.UINT) Test(org.junit.Test)

Aggregations

HREFTYPEByReference (com.sun.jna.platform.win32.OaIdl.HREFTYPEByReference)2 UINT (com.sun.jna.platform.win32.WinDef.UINT)2 HRESULT (com.sun.jna.platform.win32.WinNT.HRESULT)2 Test (org.junit.Test)1