Пример #1
0
        public static List <IntPtr> GetTopHandles()
        {
            List <IntPtr>  handles     = new List <IntPtr>();
            GCHandle       listgc      = GCHandle.Alloc(handles);
            EnumTopWindows callbackPtr = GetTopHandle;

            EnumWindows(callbackPtr, GCHandle.ToIntPtr(listgc));

            listgc.Free();
            return(handles);
        }
Пример #2
0
 private static extern int EnumWindows(EnumTopWindows callPtr, IntPtr lPar);