53 references to GetOcx
System.Windows.Forms (8)
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (2)
305
controls.Add(hostControl.
GetOcx
()!);
590
oleControls.Add(hostControl.
GetOcx
()!);
System\Windows\Forms\ActiveX\AxHost.AxContainer.ExtenderProxy.cs (1)
84
*ppvObj = ComHelpers.GetComPointer<IOleObject>(hostControl.
GetOcx
());
System\Windows\Forms\ActiveX\AxHost.AxPropertyDescriptor.cs (1)
281
if ((GetFlag(FlagUpdatedEditorAndConverter) && !force) || _owner.
GetOcx
() is null)
System\Windows\Forms\ActiveX\AxHost.cs (3)
806
if (
GetOcx
() is not null)
839
if (
GetOcx
() is IOleControl.Interface oleCtl)
932
if (
GetOcx
() is not null)
System\Windows\Forms\ActiveX\AxHost.OleInterfaces.cs (1)
58
object? nativeObject = _host.
GetOcx
();
System.Windows.Forms.Tests (45)
System\Windows\Forms\AxHost.AxPropertyDescriptorTests.cs (20)
163
Assert.NotNull(control.
GetOcx
());
411
Assert.NotNull(control.
GetOcx
());
434
Assert.NotNull(control.
GetOcx
());
460
Assert.NotNull(control.
GetOcx
());
563
Assert.NotNull(control.
GetOcx
());
599
Assert.NotNull(control.
GetOcx
());
630
Assert.NotNull(control.
GetOcx
());
678
Assert.NotNull(control.
GetOcx
());
726
Assert.NotNull(control.
GetOcx
());
844
Assert.NotNull(control.
GetOcx
());
875
Assert.NotNull(control.
GetOcx
());
904
Assert.NotNull(control.
GetOcx
());
936
Assert.NotNull(control.
GetOcx
());
965
Assert.NotNull(control.
GetOcx
());
1008
Assert.NotNull(control.
GetOcx
());
1052
Assert.NotNull(control.
GetOcx
());
1104
Assert.NotNull(control.
GetOcx
());
1152
Assert.NotNull(control.
GetOcx
());
1200
Assert.NotNull(control.
GetOcx
());
1254
Assert.NotNull(control.
GetOcx
());
System\Windows\Forms\AxHostTests.cs (25)
616
object ocx = control.
GetOcx
();
618
Assert.Same(ocx, control.
GetOcx
());
624
Assert.Same(ocx, control.
GetOcx
());
646
Assert.Same(ocx, control.
GetOcx
());
652
Assert.Same(ocx, control.
GetOcx
());
680
Assert.Null(control.
GetOcx
());
686
Assert.Null(control.
GetOcx
());
708
object ocx = control.
GetOcx
();
710
Assert.Same(ocx, control.
GetOcx
());
716
Assert.Same(ocx, control.
GetOcx
());
744
Assert.Null(control.
GetOcx
());
750
Assert.Null(control.
GetOcx
());
772
Assert.Null(control.
GetOcx
());
778
Assert.Null(control.
GetOcx
());
815
object ocx = control.
GetOcx
();
824
Assert.Same(ocx, control.
GetOcx
());
833
Assert.Same(ocx, control.
GetOcx
());
861
Assert.Same(ocx, control.
GetOcx
());
870
Assert.Same(ocx, control.
GetOcx
());
1375
object ocx = control.
GetOcx
();
1408
Assert.Null(control.
GetOcx
());
1423
object ocx = control.
GetOcx
();
1749
Assert.Null(control.
GetOcx
());
1753
Assert.Null(control.
GetOcx
());
3081
using var ocx = ComHelpers.GetComScope<IUnknown>(control.
GetOcx
());