Exemplo n.º 1
0
 protected void Dispose(bool disposing)
 {
     if (this.LibHandle != null && !this.LibHandle.IsClosed)
     {
         this.LibHandle.Close();
     }
     this.LibHandle = null;
 }
Exemplo n.º 2
0
 public SevenZipFormat(string sevenZipLibPath)
 {
     this.LibHandle = SevenZipFormat.LoadLibrary(sevenZipLibPath);
     if (this.LibHandle.IsInvalid)
     {
         throw new Win32Exception();
     }
     if (SevenZipFormat.GetProcAddress(this.LibHandle, "GetHandlerProperty") == IntPtr.Zero)
     {
         this.LibHandle.Close();
         throw new ArgumentException();
     }
 }
Exemplo n.º 3
0
 private static extern IntPtr GetProcAddress(SevenZipFormat.SafeLibraryHandle hModule, string procName);