Ejemplo n.º 1
0
        /// <summary>
        /// Frees resources associated with this ACM Stream
        /// </summary>
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                // Free other state (managed objects).
                if (streamHeader != null)
                {
                    streamHeader.Dispose();
                    streamHeader = null;
                }
            }

            // Free your own state (unmanaged objects).

            if (streamHandle != IntPtr.Zero)
            {
                MmResult result = AcmInterop.acmStreamClose(streamHandle, 0);
                streamHandle = IntPtr.Zero;
                if (result != MmResult.NoError)
                {
                    throw new MmException(result, "acmStreamClose");
                }
            }
            // Set large fields to null.
            if (driverHandle != IntPtr.Zero)
            {
                AcmInterop.acmDriverClose(driverHandle, 0);
                driverHandle = IntPtr.Zero;
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Frees resources associated with this ACM Stream
 /// </summary>
 // Token: 0x060007D7 RID: 2007 RVA: 0x00016EA4 File Offset: 0x000150A4
 protected virtual void Dispose(bool disposing)
 {
     if (disposing && this.streamHeader != null)
     {
         this.streamHeader.Dispose();
         this.streamHeader = null;
     }
     if (this.streamHandle != IntPtr.Zero)
     {
         MmResult mmResult = AcmInterop.acmStreamClose(this.streamHandle, 0);
         this.streamHandle = IntPtr.Zero;
         if (mmResult != MmResult.NoError)
         {
             throw new MmException(mmResult, "acmStreamClose");
         }
     }
     if (this.driverHandle != IntPtr.Zero)
     {
         AcmInterop.acmDriverClose(this.driverHandle, 0);
         this.driverHandle = IntPtr.Zero;
     }
 }