コード例 #1
0
 public void CreateFciContext(string cabFileName)
 {
     this.error = new NativeHelper.CabError();
     NativeHelper.CompressionInfo cabInfo = new NativeHelper.CompressionInfo(cabFileName);
     this.customData  = new CustomCabData();
     CustomDataHandle = GCHandle.Alloc(this.customData);
     fciContext       = NativeHelper.FCICreate(
         this.error,
         FciFilePlacedMethod,
         FciAllocMemHandler,
         FdiFreeMemHandler,
         FciOpenMethod,
         FciReadMethod,
         FciWriteMethod,
         FciCloseMethod,
         FciSeekMethod,
         FciDlDeleteMethod,
         FciGetTempFileMethod,
         cabInfo,
         (IntPtr)CustomDataHandle);
     if (this.customData.ErrorInfo != null)
     {
         throw this.customData.ErrorInfo;
     }
 }
コード例 #2
0
 private static int CabFilePlaced(
     NativeHelper.CompressionInfo currentCab,
     string fileName,
     int fileSize,
     bool continuation,
     IntPtr data)
 {
     return(1);
 }
コード例 #3
0
 private static bool GetNextCabinet(NativeHelper.CompressionInfo currentCab, int previousCab, IntPtr data)
 {
     return(false);
 }