Ejemplo n.º 1
0
        private static bool IsWindowsApplication(string fileName)
        {
            NativeCommandProcessor.SHFILEINFO psfi = new NativeCommandProcessor.SHFILEINFO();
            switch ((int)NativeCommandProcessor.SHGetFileInfo(fileName, 0U, ref psfi, (uint)Marshal.SizeOf((object)psfi), 8192U))
            {
            case 0:
                return(false);

            case 17744:
                return(false);

            case 23117:
                return(false);

            default:
                return(true);
            }
        }
Ejemplo n.º 2
0
 private static extern IntPtr SHGetFileInfo(
     string pszPath,
     uint dwFileAttributes,
     ref NativeCommandProcessor.SHFILEINFO psfi,
     uint cbSizeFileInfo,
     uint uFlags);