Search in sources :

Example 71 with HRESULT

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

the class RunningObjectTable method GetTimeOfLastChange.

@Override
public HRESULT GetTimeOfLastChange(Pointer pmkObjectName, FILETIME.ByReference pfiletime) {
    final int vTableId = 8;
    WinNT.HRESULT hr = (WinNT.HRESULT) this._invokeNativeObject(vTableId, new Object[] { this.getPointer(), pmkObjectName, pfiletime }, 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 72 with HRESULT

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

the class RunningObjectTable method Register.

// The magic number values for (vTableId) below, are worked out by
// counting the number of methods in the full interface (0 indexed), as this
// inherits IUnknown, which has 3 methods, we start here at 3.
@Override
public HRESULT Register(DWORD grfFlags, Pointer punkObject, Pointer pmkObjectName, DWORDByReference pdwRegister) {
    final int vTableId = 3;
    WinNT.HRESULT hr = (WinNT.HRESULT) this._invokeNativeObject(vTableId, new Object[] { this.getPointer(), grfFlags, punkObject, pmkObjectName, pdwRegister }, 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 73 with HRESULT

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

the class RunningObjectTable method NoteChangeTime.

@Override
public HRESULT NoteChangeTime(DWORD dwRegister, FILETIME pfiletime) {
    final int vTableId = 7;
    WinNT.HRESULT hr = (WinNT.HRESULT) this._invokeNativeObject(vTableId, new Object[] { this.getPointer(), dwRegister, pfiletime }, 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 74 with HRESULT

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

the class TypeInfoUtil method CreateInstance.

/**
     * Creates the instance.
     * 
     * @param pUnkOuter
     *            the unk outer
     * @param riid
     *            the riid
     * @return the pointer by reference
     */
public PointerByReference CreateInstance(IUnknown pUnkOuter, REFIID riid) {
    PointerByReference ppvObj = new PointerByReference();
    HRESULT hr = this.typeInfo.CreateInstance(pUnkOuter, riid, ppvObj);
    COMUtils.checkRC(hr);
    return ppvObj;
}
Also used : HRESULT(com.sun.jna.platform.win32.WinNT.HRESULT) PointerByReference(com.sun.jna.ptr.PointerByReference)

Example 75 with HRESULT

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

the class TypeInfoUtil method getDocumentation.

/**
     * Gets the documentation.
     * 
     * @param memid
     *            the memid
     * @return the documentation
     */
public TypeInfoDoc getDocumentation(MEMBERID memid) {
    BSTRByReference pBstrName = new BSTRByReference();
    BSTRByReference pBstrDocString = new BSTRByReference();
    DWORDByReference pdwHelpContext = new DWORDByReference();
    BSTRByReference pBstrHelpFile = new BSTRByReference();
    HRESULT hr = this.typeInfo.GetDocumentation(memid, pBstrName, pBstrDocString, pdwHelpContext, pBstrHelpFile);
    COMUtils.checkRC(hr);
    TypeInfoDoc TypeInfoDoc = new TypeInfoDoc(pBstrName.getString(), pBstrDocString.getString(), pdwHelpContext.getValue().intValue(), pBstrHelpFile.getString());
    OLEAUTO.SysFreeString(pBstrName.getValue());
    OLEAUTO.SysFreeString(pBstrDocString.getValue());
    OLEAUTO.SysFreeString(pBstrHelpFile.getValue());
    return TypeInfoDoc;
}
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)

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