internal static void SetValue(IAccessible accObj, int childId, string textValue) { try { accObj.set_accValue(childId, textValue); } catch (Exception exception) { if (!IsOleAccException(exception) || !IsOleAccExceptionMaskable(exception)) { throw; } } }
/* void SetCopyCount(int number) * Set how many copies we need to print. * return true is success, else return false. */ public static bool SetCopyCount(int number) { if (_copyCountHandle != IntPtr.Zero && number >= 0) { try { //get MSAA interface for copy count. Win32API.AccessibleObjectFromWindow(_copyCountHandle, (int)Win32API.IACC.OBJID_CLIENT, ref Win32API.IACCUID, ref _paccCopyCount); if (_paccCopyCount != null) { _paccCopyCount.set_accValue(_selfID, number.ToString()); return(true); } } catch { } } return(false); }
void IAccessibleInternal.set_accValue(object childID, string newValue) => publicIAccessible.set_accValue(childID, newValue);
void UnsafeNativeMethods.IAccessibleInternal.set_accValue(object childID, string newValue) { IntSecurity.UnmanagedCode.Assert(); publicIAccessible.set_accValue(childID, newValue); }