4 writes to _instance
System.Windows.Forms (4)
System\Windows\Forms\ActiveX\AxHost.cs (4)
2268_instance = ComHelpers.GetObjectForIUnknown(unknown); 2290_instance = ComHelpers.GetObjectForIUnknown(unknown); 2306_instance = CreateInstanceCore(_clsid); 3439_instance = null;
34 references to _instance
System.Windows.Forms (34)
System\Windows\Forms\ActiveX\AxHost.cs (34)
1884using var persistStream = ComHelpers.GetComScope<IPersistStream>(_instance); 1889using var persistStreamInit = ComHelpers.GetComScope<IPersistStreamInit>(_instance); 1902using var persistStorage = ComHelpers.GetComScope<IPersistStorage>(_instance); 1910using (var persistPropBag = ComHelpers.GetComScope<IPersistPropertyBag>(_instance)) 2034using (var persistStream = ComHelpers.GetComScope<IPersistStream>(_instance)) 2041using (var persistStreamInit = ComHelpers.GetComScope<IPersistStreamInit>(_instance)) 2048using (var persistStorage = ComHelpers.GetComScope<IPersistStorage>(_instance)) 2294if (_instance is null) 2300[MemberNotNull(nameof(_instance))] 2303Debug.Assert(_instance is null, "instance must be null"); 2307Debug.Assert(_instance is not null, "w/o an exception being thrown we must have an object..."); 2338return _instance; 2343using var categorizeProperties = ComHelpers.TryGetComScope<ICategorizeProperties>(_instance, out HRESULT hr); 2745using var persistStreamInit = ComHelpers.TryGetComScope<IPersistStreamInit>(_instance, out HRESULT hr); 2753if (ComHelpers.SupportsInterface<IPersistStream>(_instance)) 2759using var persistStoragePtr = ComHelpers.TryGetComScope<IPersistStorage>(_instance, out hr); 2769using var persistPropBag = ComHelpers.TryGetComScope<IPersistPropertyBag>(_instance, out hr); 2788using var persistStream = ComHelpers.GetComScope<IPersistStream>(_instance); 2794using (var persistStreamInit = ComHelpers.TryGetComScope<IPersistStreamInit>(_instance, out HRESULT hr)) 2824using var persistStorage = ComHelpers.GetComScope<IPersistStorage>(_instance); 2837using var persistPropBag = ComHelpers.GetComScope<IPersistPropertyBag>(_instance); 2855return _instance; 2860if (_instance is null) 2868return _instance; 2925using var pages = ComHelpers.TryGetComScope<ISpecifyPropertyPages>(_instance, out HRESULT hr); 2936using var pages = ComHelpers.TryGetComScope<ISpecifyPropertyPages>(_instance, out HRESULT hr); 2959using ComScope<IUnknown> unknown = ComHelpers.TryGetComScope<IUnknown>(_instance, out HRESULT hr); 3012using var pages = ComHelpers.TryGetComScope<ISpecifyPropertyPages>(_instance, out HRESULT hr); 3027using var unknown = ComHelpers.GetComScope<IUnknown>(_instance); 3305if (_instance is not IQuickActivate.Interface iqa) 3436if (_instance is not null) 3438Marshal.ReleaseComObject(_instance); 3520=> ComHelpers.GetComScope<T>(_instance); 3523=> ComHelpers.TryGetComScope<T>(_instance, out hr);