UIAutomation.Highlighter.getPoint C# (CSharp) Méthode

getPoint() private méthode

private getPoint ( double X, double Y, int intHandle ) : NativeMethods.CursorPoint
X double
Y double
intHandle int
Résultat NativeMethods.CursorPoint
        private  NativeMethods.CursorPoint getPoint(
            double X,
            double Y,
            int intHandle)
        {
            var p = new NativeMethods.CursorPoint {X = (int) X, Y = (int) Y};
            if (intHandle == 0) return p;
            try { // Windows Vista or higher only
                var handle = 
                    new IntPtr(intHandle);
                NativeMethods.PhysicalToLogicalPoint(handle, ref p);
            } 
            catch {
            }
            
            /*
            NativeMethods.CursorPoint p = new NativeMethods.CursorPoint {X = (int) X, Y = (int) Y};
            if (intHandle == 0) return p;
            try { // Windows Vista or higher only
                IntPtr handle = 
                    new IntPtr(intHandle);
                NativeMethods.PhysicalToLogicalPoint(handle, ref p);
            } 
            catch {
            }
            */

            /*
            if (intHandle != 0) {
                try { // Windows Vista or higher only
                    IntPtr handle = 
                        new IntPtr(intHandle);
                     NativeMethods.PhysicalToLogicalPoint(handle, ref p);
                } 
                catch {
                }
            }
            */
            return p;
        }