ReleaseMemoryHdc() public static method

Release the given memory HDC and dib section created from CreateMemoryHdc.
public static ReleaseMemoryHdc ( IntPtr memoryHdc, IntPtr dib ) : void
memoryHdc System.IntPtr Memory HDC to release
dib System.IntPtr bitmap section to release
return void
Exemplo n.º 1
0
        public void Dispose()
        {
            if (isDisposed)
            {
                return;
            }

            if (hRgn != IntPtr.Zero)
            {
                MyWin32.DeleteObject(hRgn);
                hRgn = IntPtr.Zero;
            }


            MyWin32.ReleaseMemoryHdc(memHdc, dib);
            dib        = IntPtr.Zero;
            memHdc     = IntPtr.Zero;
            isDisposed = true;
        }
Exemplo n.º 2
0
        public void Dispose()
        {
            if (_isDisposed)
            {
                return;
            }

            if (_hRgn != IntPtr.Zero)
            {
                MyWin32.DeleteObject(_hRgn);
                _hRgn = IntPtr.Zero;
            }


            MyWin32.ReleaseMemoryHdc(_memHdc, _dib);
            _dib        = IntPtr.Zero;
            _memHdc     = IntPtr.Zero;
            _isDisposed = true;
        }