Example #1
0
 /// <summary>
 /// Add a disk file to a cabinet.
 /// </summary>
 /// <param name="hfci">Handle to FCI context returned by FciCreate.</param>
 /// <param name="sourceFileName">Full path and name of the file to add.</param>
 /// <param name="fileNameInCabinet">Name to use when storing in the cabinet.</param>
 /// <param name="fExecute">True if the file should be marked to execute on extraction.</param>
 /// <param name="fnGetNextCab">GetNextCab callback.</param>
 /// <param name="fnStatus">Status callback.</param>
 /// <param name="fnGetOpenInfo">OpenInfo callback.</param>
 /// <param name="typeCompress">Type of compression desired.</param>
 /// <returns>Returns true on success.  Returns false on failure.
 /// In the event of failure, the CabError structure passed to the FciCreate function
 /// that created the current compression context will contain error information.</returns>
 public static bool FciAddFile(
     IntPtr hfci,
     string sourceFileName,
     string fileNameInCabinet,
     bool fExecute,
     FciGetNextCabinetDelegate fnGetNextCab,
     FciStatusDelegate fnStatus,
     FciGetOpenInfoDelegate fnGetOpenInfo,
     FciCompression typeCompress)
 {
     // Calls the unmanaged prototype after converting the FciCompression value
     // to a short.
     return FciAddFile(hfci, sourceFileName, fileNameInCabinet, fExecute,
         fnGetNextCab, fnStatus, fnGetOpenInfo, unchecked((short)typeCompress));
 }
Example #2
0
 public static extern bool FciFlushFolder(
     IntPtr hfci,
     FciGetNextCabinetDelegate fnGetNextCab,
     FciStatusDelegate fnStatus);
Example #3
0
 private static extern bool FciAddFile(
     IntPtr hfci,
     string sourceFileName,
     string fileNameInCabinet,
     bool fExecute,
     FciGetNextCabinetDelegate fnGetNextCab,
     FciStatusDelegate fnStatus,
     FciGetOpenInfoDelegate fnGetOpenInfo,
     short typeCompress);