throw new HResultException(COM.E_INVALIDARG);
}
} else if ((flags & COM.DISPATCH_PROPERTYGET) != 0) {
// property get on the method itself
try {
IDispatchImpl funcObj = new IDispatchImpl() {
// do nothing, just return some IDispatch
@Override
protected Variant invoke(int dispId, int flags, Variant[] params)
throws HResultException, InstantiationException, InvocationTargetException {
return new Variant();
}
@Override
protected void getIDsOfNames(String[] names, int[] ids) throws HResultException {
}
};
IDispatch disp = new IDispatch(funcObj.getAddress());
disp.AddRef();
return new Variant(disp);
} catch (Exception e) {
// just return VT_EMPTY
return new Variant();