private static string GetAccessibleValueInt(System.IntPtr accObj, int vmId)
        {
            string str = string.Empty;

            if (!accObj.Equals((System.IntPtr)System.IntPtr.Zero))
            {
                System.IntPtr zero = System.IntPtr.Zero;
                try
                {
                    zero = System.Runtime.InteropServices.Marshal.AllocCoTaskMem(4);
                    if (!zero.Equals((System.IntPtr)System.IntPtr.Zero))
                    {
                        AccessibleContextInfo accContextInfo = new AccessibleContextInfo();
                        JavaAccNativeMethods.getAccessibleContextInfo(vmId, accObj, out accContextInfo);
                        if (accContextInfo.accessibleInterfaces && JavaAccNativeMethods.getCurrentAccessibleValueFromContext(vmId, accObj, zero, 4))
                        {
                            str = System.Runtime.InteropServices.Marshal.PtrToStringUni(zero);
                        }
                    }
                }
                catch (System.Exception exception)
                {
                    if (!IsJavaAccException(exception) || !IsJavaAccExceptionMaskable(exception))
                    {
                        throw;
                    }
                    return(str);
                }
                finally
                {
                    if (!zero.Equals((System.IntPtr)System.IntPtr.Zero))
                    {
                        System.Runtime.InteropServices.Marshal.FreeCoTaskMem(zero);
                    }
                }
            }
            return(str);
        }