use of com.sun.jna.platform.win32.WinNT.HRESULT in project jna by java-native-access.
the class ITypeInfoTest method testGetMops.
@Test
public void testGetMops() {
ITypeInfo typeInfo = getTypeInfo();
MEMBERID memid = new MEMBERID(0);
BSTRByReference pBstrMops = new BSTRByReference();
HRESULT hr = typeInfo.GetMops(memid, pBstrMops);
COMUtils.checkRC(hr);
assertEquals(0, hr.intValue());
//System.out.println("pBstrMops: " + pBstrMops.toString());
}
use of com.sun.jna.platform.win32.WinNT.HRESULT in project jna by java-native-access.
the class ITypeInfoTest method testGetImplTypeFlags.
@Test
public void testGetImplTypeFlags() {
ITypeInfo typeInfo = getTypeInfo();
IntByReference pImplTypeFlags = new IntByReference();
HRESULT hr = typeInfo.GetImplTypeFlags(new UINT(0), pImplTypeFlags);
COMUtils.checkRC(hr);
assertEquals(0, hr.intValue());
//System.out.println("GetImplTypeFlags: " + pImplTypeFlags.toString());
}
use of com.sun.jna.platform.win32.WinNT.HRESULT in project jna by java-native-access.
the class ITypeLibTest method testGetTypeInfoType.
public void testGetTypeInfoType() {
ITypeLib shellTypeLib = loadShellTypeLib();
TYPEKIND.ByReference pTKind = new TYPEKIND.ByReference();
HRESULT hr = shellTypeLib.GetTypeInfoType(new UINT(0), pTKind);
assertTrue(COMUtils.SUCCEEDED(hr));
//System.out.println("TYPEKIND: " + pTKind);
}
use of com.sun.jna.platform.win32.WinNT.HRESULT in project jna by java-native-access.
the class ITypeLibTest method testGetTypeComp.
public void testGetTypeComp() {
ITypeLib shellTypeLib = loadShellTypeLib();
PointerByReference pbr = new PointerByReference();
HRESULT hr = shellTypeLib.GetTypeComp(pbr);
// Only check that call works
assertTrue(COMUtils.SUCCEEDED(hr));
}
use of com.sun.jna.platform.win32.WinNT.HRESULT in project jna by java-native-access.
the class ITypeLibTest method testLibAttr.
public void testLibAttr() {
ITypeLib shellTypeLib = loadShellTypeLib();
PointerByReference pbr = new PointerByReference();
HRESULT hr = shellTypeLib.GetLibAttr(pbr);
assertTrue(COMUtils.SUCCEEDED(hr));
OaIdl.TLIBATTR tlibAttr = new OaIdl.TLIBATTR(pbr.getValue());
assertEquals(SHELL_CLSID, tlibAttr.guid.toGuidString());
assertEquals(SHELL_MAJOR, tlibAttr.wMajorVerNum.intValue());
assertEquals(SHELL_MINOR, tlibAttr.wMinorVerNum.intValue());
shellTypeLib.ReleaseTLibAttr(tlibAttr);
}
Aggregations