本文整理了Java中com.sun.jna.Function.invokeInt()
方法的一些代码示例,展示了Function.invokeInt()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Function.invokeInt()
方法的具体详情如下:
包路径:com.sun.jna.Function
类名称:Function
方法名:invokeInt
[英]Convenience method for #invoke(Class,Object[]).
[中]方便的#invoke方法(类,对象[])。
代码示例来源:origin: net.java.dev.jna/jna-platform
@Override
public int AddRef() {
Function f = Function.getFunction(vTable[1], Function.ALT_CONVENTION);
return f.invokeInt(new Object[]{interfacePointer});
}
代码示例来源:origin: net.java.dev.jna/jna-platform
@Override
public WinNT.HRESULT QueryInterface(REFIID byValue, PointerByReference pointerByReference) {
Function f = Function.getFunction(vTable[0], Function.ALT_CONVENTION);
return new WinNT.HRESULT(f.invokeInt(new Object[]{interfacePointer, byValue, pointerByReference}));
}
代码示例来源:origin: net.java.dev.jna/jna-platform
@Override
public WinNT.HRESULT QueryInterface(REFIID byValue, PointerByReference pointerByReference) {
Function f = Function.getFunction(vTable[0], Function.ALT_CONVENTION);
return new WinNT.HRESULT(f.invokeInt(new Object[]{interfacePointer, byValue, pointerByReference}));
}
代码示例来源:origin: net.java.dev.jna/jna-platform
@Override
public HRESULT GetUIObjectOf(WinDef.HWND hwndOwner, int cidl, Pointer apidl, REFIID riid, IntByReference rgfReserved, PointerByReference ppv) {
Function f = Function.getFunction(vTable[10], Function.ALT_CONVENTION);
return new WinNT.HRESULT( f.invokeInt(new Object[]{interfacePointer, hwndOwner, cidl, apidl, riid, rgfReserved, ppv}));
}
代码示例来源:origin: net.java.dev.jna/jna-platform
@Override
public HRESULT Clone(PointerByReference ppenum) {
Function f = Function.getFunction(vTable[6], Function.ALT_CONVENTION);
return new HRESULT(f.invokeInt(new Object[]{interfacePointer, ppenum}));
}
};
代码示例来源:origin: net.java.dev.jna/jna-platform
@Override
public WinNT.HRESULT ParseDisplayName(WinDef.HWND hwnd, Pointer pbc, String pszDisplayName, IntByReference pchEaten, PointerByReference ppidl, IntByReference pdwAttributes) {
Function f = Function.getFunction(vTable[3], Function.ALT_CONVENTION);
return new WinNT.HRESULT(f.invokeInt(new Object[]{interfacePointer, hwnd, pbc, pszDisplayName, pchEaten, ppidl, pdwAttributes}));
}
代码示例来源:origin: net.java.dev.jna/jna-platform
@Override
public HRESULT BindToStorage(Pointer pidl, Pointer pbc, REFIID riid, PointerByReference ppv) {
Function f = Function.getFunction(vTable[6], Function.ALT_CONVENTION);
return new WinNT.HRESULT( f.invokeInt(new Object[]{interfacePointer, pidl, pbc, riid, ppv}));
}
代码示例来源:origin: net.java.dev.jna/jna-platform
@Override
public HRESULT CompareIDs(WinDef.LPARAM lParam, Pointer pidl1, Pointer pidl2) {
Function f = Function.getFunction(vTable[7], Function.ALT_CONVENTION);
return new WinNT.HRESULT( f.invokeInt(new Object[]{interfacePointer, lParam, pidl1, pidl2}));
}
代码示例来源:origin: net.java.dev.jna/jna-platform
@Override
public HRESULT CreateViewObject(WinDef.HWND hwndOwner, REFIID riid, PointerByReference ppv) {
Function f = Function.getFunction(vTable[8], Function.ALT_CONVENTION);
return new WinNT.HRESULT( f.invokeInt(new Object[]{interfacePointer, hwndOwner, riid, ppv}));
}
代码示例来源:origin: net.java.dev.jna/jna-platform
@Override
public HRESULT GetAttributesOf(int cidl, Pointer apidl, IntByReference rgfInOut) {
Function f = Function.getFunction(vTable[9], Function.ALT_CONVENTION);
return new WinNT.HRESULT( f.invokeInt(new Object[]{interfacePointer, cidl, apidl, rgfInOut}));
}
代码示例来源:origin: net.java.dev.jna/jna-platform
@Override
public HRESULT SetNameOf(WinDef.HWND hwnd, Pointer pidl, String pszName, int uFlags, PointerByReference ppidlOut) {
Function f = Function.getFunction(vTable[12], Function.ALT_CONVENTION);
return new WinNT.HRESULT( f.invokeInt(new Object[]{interfacePointer, hwnd, pidl, pszName, uFlags, ppidlOut}));
}
};
代码示例来源:origin: net.java.dev.jna/jna-platform
@Override
public HRESULT Next(int celt, PointerByReference rgelt, IntByReference pceltFetched) {
Function f = Function.getFunction(vTable[3], Function.ALT_CONVENTION);
return new HRESULT(f.invokeInt(new Object[]{interfacePointer, celt, rgelt, pceltFetched}));
}
代码示例来源:origin: net.java.dev.jna/jna-platform
@Override
public HRESULT Reset() {
Function f = Function.getFunction(vTable[5], Function.ALT_CONVENTION);
return new HRESULT(f.invokeInt(new Object[]{interfacePointer}));
}
代码示例来源:origin: net.java.dev.jna/jna-platform
protected int _invokeNativeInt(int vtableId, Object[] args) {
Pointer vptr = this.getPointer().getPointer(0);
// we take the vtable id and multiply with the pointer size (4 bytes on
// 32bit OS)
Function func = Function.getFunction(vptr.getPointer(vtableId
* Native.POINTER_SIZE));
return func.invokeInt(args);
}
代码示例来源:origin: net.java.dev.jna/platform
public/* [local] */void ReleaseVarDesc(
/* [in] */VARDESC pVarDesc) {
Pointer vptr = this.getPointer().getPointer(0);
Function func = Function.getFunction(vptr.getPointer(84));
func.invokeInt(new Object[] { this.getPointer(), pVarDesc });
}
}
代码示例来源:origin: net.java.dev.jna/platform
public HRESULT IsName(
/* [annotation][out][in] */
WString szNameBuf,
/* [in] */ULONG lHashVal,
/* [out] */BOOLbyReference pfName) {
Pointer vptr = this.getPointer().getPointer(0);
Function func = Function.getFunction(vptr.getPointer(40));
int hr = func.invokeInt(new Object[] { this.getPointer(), szNameBuf,
lHashVal, pfName });
return new HRESULT(hr);
}
代码示例来源:origin: net.java.dev.jna/platform
public/* [local] */HRESULT GetFuncDesc(
/* [in] */UINT index,
/* [out] */FUNCDESC.ByReference pFuncDesc) {
Pointer vptr = this.getPointer().getPointer(0);
Function func = Function.getFunction(vptr.getPointer(20));
int hr = func.invokeInt(new Object[] { this.getPointer(), index,
pFuncDesc });
return new HRESULT(hr);
}
代码示例来源:origin: net.java.dev.jna/platform
public/* [local] */HRESULT GetNames(
/* [in] */MEMBERID memid,
/* [length_is][size_is][out] */BSTR[] rgBstrNames,
/* [in] */UINT cMaxNames,
/* [out] */UINTbyReference pcNames) {
Pointer vptr = this.getPointer().getPointer(0);
Function func = Function.getFunction(vptr.getPointer(28));
int hr = func.invokeInt(new Object[] { this.getPointer(), memid,
rgBstrNames, cMaxNames, pcNames });
return new HRESULT(hr);
}
代码示例来源:origin: net.java.dev.jna/platform
public HRESULT GetTypeAttr(
/* [out] */TYPEATTR.ByReference pTypeAttr) {
Pointer vptr = this.getPointer().getPointer(0);
Function func = Function.getFunction(vptr.getPointer(12));
int hr = func.invokeInt(new Object[] { this.getPointer(), pTypeAttr });
pTypeAttr.read();
return new HRESULT(hr);
}
代码示例来源:origin: net.java.dev.jna/platform
public HRESULT GetTypeComp(
/* [out] */ITypeComp.ByReference pTComp) {
Pointer vptr = this.getPointer().getPointer(0);
Function func = Function.getFunction(vptr.getPointer(32));
PointerByReference ppTComp = new PointerByReference();
int hr = func.invokeInt(new Object[] { this.getPointer(), ppTComp });
pTComp.setPointer(ppTComp.getPointer());
return new HRESULT(hr);
}
内容来源于网络,如有侵权,请联系作者删除!