コード例 #1
0
 public StrongHWNDSubclass(StrongHWND strongHwnd) : base(new HWND(strongHwnd.DangerousGetHandle()))
 {
     // Note that we passed a new "weak" HWND handle to the base class.
     // This is because we don't want the StrongHWNDSubclass processing
     // a partially disposed handle in its own Dispose methods.
     _strongHwnd = strongHwnd;
 }
コード例 #2
0
 public StrongHWNDSubclass(StrongHWND strongHwnd)
     : base(new HWND(strongHwnd.DangerousGetHandle()))
 {
     // Note that we passed a new "weak" HWND handle to the base class.
     // This is because we don't want the StrongHWNDSubclass processing
     // a partially disposed handle in its own Dispose methods.
     _strongHwnd = strongHwnd;
 }
コード例 #3
0
 internal void TransferHandleOwnership(StrongHWND hwnd)
 {
     Debug.Assert(hwnd == _hwnd); // equivalency, not reference equals
     _hwnd = hwnd;
 }