4 writes to _instance
System.Windows.Forms (4)
System\Windows\Forms\ActiveX\AxHost.cs (4)
2265_instance = ComHelpers.GetObjectForIUnknown(unknown); 2287_instance = ComHelpers.GetObjectForIUnknown(unknown); 2303_instance = CreateInstanceCore(_clsid); 3436_instance = null;
34 references to _instance
System.Windows.Forms (34)
System\Windows\Forms\ActiveX\AxHost.cs (34)
1881using var persistStream = ComHelpers.GetComScope<IPersistStream>(_instance); 1886using var persistStreamInit = ComHelpers.GetComScope<IPersistStreamInit>(_instance); 1899using var persistStorage = ComHelpers.GetComScope<IPersistStorage>(_instance); 1907using (var persistPropBag = ComHelpers.GetComScope<IPersistPropertyBag>(_instance)) 2031using (var persistStream = ComHelpers.GetComScope<IPersistStream>(_instance)) 2038using (var persistStreamInit = ComHelpers.GetComScope<IPersistStreamInit>(_instance)) 2045using (var persistStorage = ComHelpers.GetComScope<IPersistStorage>(_instance)) 2291if (_instance is null) 2297[MemberNotNull(nameof(_instance))] 2300Debug.Assert(_instance is null, "instance must be null"); 2304Debug.Assert(_instance is not null, "w/o an exception being thrown we must have an object..."); 2335return _instance; 2340using var categorizeProperties = ComHelpers.TryGetComScope<ICategorizeProperties>(_instance, out HRESULT hr); 2742using var persistStreamInit = ComHelpers.TryGetComScope<IPersistStreamInit>(_instance, out HRESULT hr); 2750if (ComHelpers.SupportsInterface<IPersistStream>(_instance)) 2756using var persistStoragePtr = ComHelpers.TryGetComScope<IPersistStorage>(_instance, out hr); 2766using var persistPropBag = ComHelpers.TryGetComScope<IPersistPropertyBag>(_instance, out hr); 2785using var persistStream = ComHelpers.GetComScope<IPersistStream>(_instance); 2791using (var persistStreamInit = ComHelpers.TryGetComScope<IPersistStreamInit>(_instance, out HRESULT hr)) 2821using var persistStorage = ComHelpers.GetComScope<IPersistStorage>(_instance); 2834using var persistPropBag = ComHelpers.GetComScope<IPersistPropertyBag>(_instance); 2852return _instance; 2857if (_instance is null) 2865return _instance; 2922using var pages = ComHelpers.TryGetComScope<ISpecifyPropertyPages>(_instance, out HRESULT hr); 2933using var pages = ComHelpers.TryGetComScope<ISpecifyPropertyPages>(_instance, out HRESULT hr); 2956using ComScope<IUnknown> unknown = ComHelpers.TryGetComScope<IUnknown>(_instance, out HRESULT hr); 3009using var pages = ComHelpers.TryGetComScope<ISpecifyPropertyPages>(_instance, out HRESULT hr); 3024using var unknown = ComHelpers.GetComScope<IUnknown>(_instance); 3302if (_instance is not IQuickActivate.Interface iqa) 3433if (_instance is not null) 3435Marshal.ReleaseComObject(_instance); 3517=> ComHelpers.GetComScope<T>(_instance); 3520=> ComHelpers.TryGetComScope<T>(_instance, out hr);