Exemple #1
0
        // Returns a unique temporary file name, and creates a 0-byte file by that
        // name on disk.
        /// <include file='doc\Path.uex' path='docs/doc[@for="Path.GetTempFileName"]/*' />
        public static String GetTempFileName()
        {
            String        path = GetTempPath();
            StringBuilder sb   = new StringBuilder(MAX_PATH);
            uint          r    = Win32Native.GetTempFileName(path, "tmp", 0, sb);

            if (r == 0)
            {
                __Error.WinIOError();
            }
            return(sb.ToString());
        }