Jakub Kahovec - 2006-01-11

I've been trying to get events from Outlook's calendar, everything
works fine until i try to get UserProperties property. I iterate over
the collection of events and after the 248th (247 loops pass without
problem) calling of

oUserPropItem = Dispatch.invoke(oItem, "UserProperties", Dispatch.Get,
new Object[] {"EventType"}, new
int[1]).toDispatch();

(i also tried Dispatch.get(oItem, "UserProperties"))

it throws the following exception

Exception in thread "main" com.jacob.com.ComFailException: A COM
exception has been encountered:
At Invoke of: UserProperties
Description: Unspecified error

at com.jacob.com.Dispatch.invokev(Native Method)
at com.jacob.com.Dispatch.invokev(Dispatch.java:888)
at com.jacob.com.Dispatch.get(Dispatch.java:1237)
at org.londongt.ACM.generateEventsXML(ACM.java:186)
at org.londongt.ACM.main(ACM.java:96)

Doesn't matter which kind of events there are, it just stop working
after the 248th iteration cycle.
It seems to me like a memory leak.

Any ideas ?

Thanks.