private System.Windows.Forms.UnsafeNativeMethods.IOleInPlaceActiveObject GetInPlaceActiveObject() { if (this.iOleInPlaceActiveObjectExternal != null) { return this.iOleInPlaceActiveObjectExternal; } if (this.iOleInPlaceActiveObject == null) { try { this.iOleInPlaceActiveObject = (System.Windows.Forms.UnsafeNativeMethods.IOleInPlaceActiveObject) this.instance; } catch (InvalidCastException) { } } return this.iOleInPlaceActiveObject; }
private void ReleaseAxControl() { this.NoComponentChangeEvents++; ContainerControl containingControl = this.ContainingControl; if (containingControl != null) { containingControl.VisibleChanged -= this.onContainerVisibleChanged; } try { if (this.instance != null) { Marshal.FinalReleaseComObject(this.instance); this.instance = null; this.iOleInPlaceObject = null; this.iOleObject = null; this.iOleControl = null; this.iOleInPlaceActiveObject = null; this.iOleInPlaceActiveObjectExternal = null; this.iPerPropertyBrowsing = null; this.iCategorizeProperties = null; this.iPersistStream = null; this.iPersistStreamInit = null; this.iPersistStorage = null; } this.axState[checkedIppb] = false; this.axState[checkedCP] = false; this.axState[disposed] = true; this.freezeCount = 0; this.axState[sinkAttached] = false; this.wndprocAddr = IntPtr.Zero; this.SetOcState(0); } finally { this.NoComponentChangeEvents--; } }
int System.Windows.Forms.UnsafeNativeMethods.IDocHostUIHandler.ShowUI(int dwID, System.Windows.Forms.UnsafeNativeMethods.IOleInPlaceActiveObject activeObject, System.Windows.Forms.NativeMethods.IOleCommandTarget commandTarget, System.Windows.Forms.UnsafeNativeMethods.IOleInPlaceFrame frame, System.Windows.Forms.UnsafeNativeMethods.IOleInPlaceUIWindow doc) { return(1); }