Search in sources :

Example 31 with HRESULT

use of com.sun.jna.platform.win32.WinNT.HRESULT in project jna by java-native-access.

the class TypeLibUtil method getTypeInfo.

/**
     * Gets the type info.
     * 
     * @param index
     *            the index
     * @return the type info
     */
public ITypeInfo getTypeInfo(int index) {
    PointerByReference ppTInfo = new PointerByReference();
    HRESULT hr = this.typelib.GetTypeInfo(new UINT(index), ppTInfo);
    COMUtils.checkRC(hr);
    return new TypeInfo(ppTInfo.getValue());
}
Also used : HRESULT(com.sun.jna.platform.win32.WinNT.HRESULT) PointerByReference(com.sun.jna.ptr.PointerByReference) UINT(com.sun.jna.platform.win32.WinDef.UINT)

Example 32 with HRESULT

use of com.sun.jna.platform.win32.WinNT.HRESULT in project jna by java-native-access.

the class TypeLibUtil method getTypeInfoType.

/**
     * Gets the type info type.
     * 
     * @param index
     *            the index
     * @return the type info type
     */
public TYPEKIND getTypeInfoType(int index) {
    TYPEKIND.ByReference typekind = new TYPEKIND.ByReference();
    HRESULT hr = this.typelib.GetTypeInfoType(new UINT(index), typekind);
    COMUtils.checkRC(hr);
    return typekind;
}
Also used : HRESULT(com.sun.jna.platform.win32.WinNT.HRESULT) DWORDByReference(com.sun.jna.platform.win32.WinDef.DWORDByReference) BSTRByReference(com.sun.jna.platform.win32.WTypes.BSTRByReference) PointerByReference(com.sun.jna.ptr.PointerByReference) BOOLByReference(com.sun.jna.platform.win32.WinDef.BOOLByReference) USHORTByReference(com.sun.jna.platform.win32.WinDef.USHORTByReference) UINT(com.sun.jna.platform.win32.WinDef.UINT) TYPEKIND(com.sun.jna.platform.win32.OaIdl.TYPEKIND)

Example 33 with HRESULT

use of com.sun.jna.platform.win32.WinNT.HRESULT in project jna by java-native-access.

the class RunningObjectTable method EnumRunning.

@Override
public HRESULT EnumRunning(PointerByReference ppenumMoniker) {
    final int vTableId = 9;
    WinNT.HRESULT hr = (WinNT.HRESULT) this._invokeNativeObject(vTableId, new Object[] { this.getPointer(), ppenumMoniker }, WinNT.HRESULT.class);
    return hr;
}
Also used : HRESULT(com.sun.jna.platform.win32.WinNT.HRESULT) WinNT(com.sun.jna.platform.win32.WinNT) HRESULT(com.sun.jna.platform.win32.WinNT.HRESULT)

Example 34 with HRESULT

use of com.sun.jna.platform.win32.WinNT.HRESULT in project jna by java-native-access.

the class TypeInfoUtil method AddressOfMember.

/**
     * Address of member.
     * 
     * @param memid
     *            the memid
     * @param invKind
     *            the inv kind
     * @return the pointer by reference
     */
public PointerByReference AddressOfMember(MEMBERID memid, INVOKEKIND invKind) {
    PointerByReference ppv = new PointerByReference();
    HRESULT hr = this.typeInfo.AddressOfMember(memid, invKind, ppv);
    COMUtils.checkRC(hr);
    return ppv;
}
Also used : HRESULT(com.sun.jna.platform.win32.WinNT.HRESULT) PointerByReference(com.sun.jna.ptr.PointerByReference)

Example 35 with HRESULT

use of com.sun.jna.platform.win32.WinNT.HRESULT in project jna by java-native-access.

the class TypeInfoUtil method getFuncDesc.

/**
     * Gets the func desc.
     * 
     * @param index
     *            the index
     * @return the func desc
     */
public FUNCDESC getFuncDesc(int index) {
    PointerByReference ppFuncDesc = new PointerByReference();
    HRESULT hr = this.typeInfo.GetFuncDesc(new UINT(index), ppFuncDesc);
    COMUtils.checkRC(hr);
    return new FUNCDESC(ppFuncDesc.getValue());
}
Also used : HRESULT(com.sun.jna.platform.win32.WinNT.HRESULT) PointerByReference(com.sun.jna.ptr.PointerByReference) FUNCDESC(com.sun.jna.platform.win32.OaIdl.FUNCDESC) UINT(com.sun.jna.platform.win32.WinDef.UINT)

Aggregations

HRESULT (com.sun.jna.platform.win32.WinNT.HRESULT)102 PointerByReference (com.sun.jna.ptr.PointerByReference)57 Test (org.junit.Test)26 REFIID (com.sun.jna.platform.win32.Guid.REFIID)20 UINT (com.sun.jna.platform.win32.WinDef.UINT)15 WString (com.sun.jna.WString)12 DWORD (com.sun.jna.platform.win32.WinDef.DWORD)12 WinNT (com.sun.jna.platform.win32.WinNT)12 DWORDByReference (com.sun.jna.platform.win32.WinDef.DWORDByReference)11 VARIANT (com.sun.jna.platform.win32.Variant.VARIANT)10 MEMBERID (com.sun.jna.platform.win32.OaIdl.MEMBERID)9 BSTRByReference (com.sun.jna.platform.win32.WTypes.BSTRByReference)9 ULONG (com.sun.jna.platform.win32.WinDef.ULONG)9 IID (com.sun.jna.platform.win32.Guid.IID)8 DISPIDByReference (com.sun.jna.platform.win32.OaIdl.DISPIDByReference)8 IntByReference (com.sun.jna.ptr.IntByReference)8 UINTByReference (com.sun.jna.platform.win32.WinDef.UINTByReference)7 COMException (com.sun.jna.platform.win32.COM.COMException)6 ConnectionPoint (com.sun.jna.platform.win32.COM.ConnectionPoint)6 Pointer (com.sun.jna.Pointer)5