Пример #1
0
        internal static IntPtr GetDC(HandleRef hWnd)
        {
            var hDc = IntGetDC(hWnd);

            if (hDc == IntPtr.Zero)
            {
                throw new Win32Exception();
            }

            return(HandleCollector.Add(hDc, CommonHandles.HDC));
        }
Пример #2
0
 protected WpfSafeHandle(bool ownsHandle, int collectorId) : base(ownsHandle)
 {
     HandleCollector.Add(collectorId);
     _collectorId = collectorId;
 }