Exemplo n.º 1
0
        /// <summary>
        /// Closes a file.
        /// </summary>
        /// <param name="hf">Handle to the file to be closed.</param>
        /// <returns>Returns 0 on success.  Returns -1 on error.</returns>
        /// <remarks>The File Decompression Interface (FDI) calls this function to close a file.</remarks>
        protected virtual int FileClose(IntPtr hf)
        {
            Trace.WriteLine(string.Format("FileWrite {0}", hf));
            int err = 0;

            try
            {
                return(CabIO.FileClose(hf, ref err, userData));
            }
            finally
            {
                erf.ErrorType = err;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Closes a file.
 /// </summary>
 /// <param name="hf">Handle to the file to be closed.</param>
 /// <param name="err">Error return value.</param>
 /// <param name="pUserData">User data object.</param>
 /// <returns>Returns 0 on success.  Returns -1 on error.</returns>
 /// <remarks>The File Compression Interface (FCI) calls this function to close a file.</remarks>
 protected virtual int FileClose(IntPtr hf, ref int err, IntPtr pUserData)
 {
     Trace.WriteLine(string.Format("FileClose {0}", hf));
     return(CabIO.FileClose(hf, ref err, ((GCHandle)pUserData).Target));
 }