/* Retrieve the next celt items in the enumeration sequence. * If there are fewer than the requested number of elements left * in the sequence, retrieve the remaining elements. * The number of elements actually retrieved is returned in pceltFetched * (unless the caller passed in NULL for that parameter).
/* If there are no listeners, query the proxy for * its IEnumVariant, and get the Next items from it.
	int Next(int celt, int rgvar, int pceltFetched) {		/* Retrieve the next celt items in the enumeration sequence. 		 * If there are fewer than the requested number of elements left		 * in the sequence, retrieve the remaining elements.		 * The number of elements actually retrieved is returned in pceltFetched 		 * (unless the caller passed in NULL for that parameter).		 */		if (rgvar == 0) return COM.E_INVALIDARG;		if (pceltFetched == 0 && celt != 1) return COM.E_INVALIDARG;		if (enumIndex == 0) {			AccessibleControlEvent event = new AccessibleControlEvent(this);			event.childID = ACC.CHILDID_SELF;			for (int i = 0; i < accessibleControlListeners.size(); i++) {				AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);				listener.getChildren(event);			}			variants = event.children;		}			Object[] nextItems = null;		if (variants != null && celt >= 1) {			int endIndex = enumIndex + celt - 1;			if (endIndex > (variants.length - 1)) endIndex = variants.length - 1;			if (enumIndex <= endIndex) {				nextItems = new Object[endIndex - enumIndex + 1];				for (int i = 0; i < nextItems.length; i++) {					Object child = variants[enumIndex];					if (child instanceof Integer) {						nextItems[i] = new Integer(((Integer)child).intValue() + 1);					} else {						nextItems[i] = child;					}					enumIndex++;				}			}		}		if (nextItems != null) {			for (int i = 0; i < nextItems.length; i++) {				Object nextItem = nextItems[i];				if (nextItem instanceof Integer) {					int item = ((Integer) nextItem).intValue();					COM.MoveMemory(rgvar + i * 16, new short[] { COM.VT_I4 }, 2);					COM.MoveMemory(rgvar + i * 16 + 8, new int[] { item }, 4);				} else {					int address = ((Accessible) nextItem).objIAccessible.getAddress();					COM.MoveMemory(rgvar + i * 16, new short[] { COM.VT_DISPATCH }, 2);					COM.MoveMemory(rgvar + i * 16 + 8, new int[] { address }, 4);				}			}			if (pceltFetched != 0)				COM.MoveMemory(pceltFetched, new int[] {nextItems.length}, 4);			if (nextItems.length == celt) return COM.S_OK;		} else {			if (pceltFetched != 0)				COM.MoveMemory(pceltFetched, new int[] {0}, 4);		}		return COM.S_FALSE;	}