use of com.sun.jna.platform.win32.OaIdl.MEMBERID in project jna by java-native-access.
the class ITypeInfoTest method testGetIDsOfNames.
@Test
public void testGetIDsOfNames() {
ITypeInfo[] typeInfos = getTypeInfos();
LPOLESTR[] rgszNames = { new LPOLESTR("Help") };
UINT cNames = new UINT(1);
MEMBERID[] pMemId = new MEMBERID[1];
for (ITypeInfo typeInfo : typeInfos) {
HRESULT hr = typeInfo.GetIDsOfNames(rgszNames, cNames, pMemId);
if (COMUtils.SUCCEEDED(hr)) {
//System.out.println("pMemId: " + pMemId.toString());
return;
}
}
throw new RuntimeException("Didn't find Help in any of the type infos");
}
use of com.sun.jna.platform.win32.OaIdl.MEMBERID in project jna by java-native-access.
the class ITypeInfoTest method testGetDllEntry.
@Test
@Ignore("Needs a DLL that contains code")
public void testGetDllEntry() {
ITypeInfo[] typeInfos = getTypeInfos();
MEMBERID memid = new MEMBERID(0);
BSTRByReference pBstrDllName = new BSTRByReference();
BSTRByReference pBstrName = new BSTRByReference();
WORDByReference pwOrdinal = new WORDByReference();
for (ITypeInfo typeInfo : typeInfos) {
HRESULT hr = typeInfo.GetDllEntry(memid, INVOKEKIND.INVOKE_FUNC, pBstrDllName, pBstrName, pwOrdinal);
if (COMUtils.SUCCEEDED(hr)) {
//System.out.println("pwOrdinal: " + pwOrdinal.getValue());
return;
}
}
throw new RuntimeException("Didn't find Dll entry for member in any of the type infos");
}
Aggregations