protected void Dispose(bool disposing) { if (this.LibHandle != null && !this.LibHandle.IsClosed) { this.LibHandle.Close(); } this.LibHandle = null; }
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(); } }
private static extern IntPtr GetProcAddress(SevenZipFormat.SafeLibraryHandle hModule, string procName);