if (varChild_lVal == COM.CHILDID_SELF) { event.childID = ACC.CHILDID_SELF; } else { if (control instanceof Tree) {  event.childID = varChild_lVal;
if (varChild_lVal != COM.CHILDID_SELF) { if (control instanceof Tree || control instanceof Table) {
	int get_accRole(int varChild_vt, int varChild_reserved1, int varChild_lVal, int varChild_reserved2, int pvarRole) {		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;		if ((varChild_vt & 0xFFFF) != COM.VT_I4) return COM.E_INVALIDARG;		/* Get the default role from the OS. */		int osRole = COM.ROLE_SYSTEM_CLIENT;		int code = iaccessible.get_accRole(varChild_vt, varChild_reserved1, varChild_lVal, varChild_reserved2, pvarRole);		if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID		// TEMPORARY CODE - process tree and table even if there are no apps listening		if (accessibleControlListeners.size() == 0 && !(control instanceof Tree || control instanceof Table)) return code;		if (code == COM.S_OK) {			short[] pvt = new short[1];			COM.MoveMemory(pvt, pvarRole, 2);			if (pvt[0] == COM.VT_I4) {				int[] pRole = new int[1];				COM.MoveMemory(pRole, pvarRole + 8, 4);				osRole = pRole[0];			}		}		AccessibleControlEvent event = new AccessibleControlEvent(this);		event.detail = osToRole(osRole);		if (varChild_lVal == COM.CHILDID_SELF) {			event.childID = ACC.CHILDID_SELF;		} else {			if (control instanceof Tree) {				/* Tree item childIDs are pointers (not 1-based indices). */				event.childID = varChild_lVal;								// TEMPORARY CODE				/* Currently our checkbox tree is emulated using state mask images,				 * so we need to specify 'checkbox' role for the items here. */				if ((control.getStyle() & SWT.CHECK) != 0) event.detail = ACC.ROLE_CHECKBUTTON;			} else if (control instanceof Table) {				event.childID = varChild_lVal - 1;								// TEMPORARY CODE				/* Currently our checkbox table is emulated using state mask images,				 * so we need to specify 'checkbox' role for the items here. */				if ((control.getStyle() & SWT.CHECK) != 0) event.detail = ACC.ROLE_CHECKBUTTON;			} else {				event.childID = varChild_lVal - 1;			}		}		for (int i = 0; i < accessibleControlListeners.size(); i++) {			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);			listener.getRole(event);		}		int role = roleToOs(event.detail);		COM.MoveMemory(pvarRole, new short[] { COM.VT_I4 }, 2);		COM.MoveMemory(pvarRole + 8, new int[] { role }, 4);		return COM.S_OK;	}