예제 #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);
 }