Beispiel #1
0
        /// <summary>
        /// Disposes the managed and unmanaged objects in this object.
        /// </summary>
        public void Dispose()
        {
            if (!this.disposed)
            {
                CabInterop.CreateCabFinish(this.handle);
                this.handle = IntPtr.Zero;

                GC.SuppressFinalize(this);
                this.disposed = true;
            }
        }
Beispiel #2
0
        /// <summary>
        /// Closes the cabinet being created.
        /// </summary>
        public void Close()
        {
            if (IntPtr.Zero == this.handle)
            {
                throw new ArgumentNullException();
            }

            int error = CabInterop.CreateCabFinish(this.handle);

            if (0 != error)
            {
                throw new WixCabCreationException(error);
            }
            this.handle = IntPtr.Zero;
        }