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)
807
if (
GetOcx
() is not null)
840
if (
GetOcx
() is IOleControl.Interface oleCtl)
933
if (
GetOcx
() is not null)
System\Windows\Forms\ActiveX\AxHost.OleInterfaces.cs (1)
57
object? nativeObject = _host.
GetOcx
();
System.Windows.Forms.Tests (45)
System\Windows\Forms\AxHost.AxPropertyDescriptorTests.cs (20)
165
Assert.NotNull(control.
GetOcx
());
413
Assert.NotNull(control.
GetOcx
());
436
Assert.NotNull(control.
GetOcx
());
462
Assert.NotNull(control.
GetOcx
());
565
Assert.NotNull(control.
GetOcx
());
601
Assert.NotNull(control.
GetOcx
());
632
Assert.NotNull(control.
GetOcx
());
680
Assert.NotNull(control.
GetOcx
());
728
Assert.NotNull(control.
GetOcx
());
846
Assert.NotNull(control.
GetOcx
());
877
Assert.NotNull(control.
GetOcx
());
906
Assert.NotNull(control.
GetOcx
());
938
Assert.NotNull(control.
GetOcx
());
967
Assert.NotNull(control.
GetOcx
());
1010
Assert.NotNull(control.
GetOcx
());
1054
Assert.NotNull(control.
GetOcx
());
1106
Assert.NotNull(control.
GetOcx
());
1154
Assert.NotNull(control.
GetOcx
());
1202
Assert.NotNull(control.
GetOcx
());
1256
Assert.NotNull(control.
GetOcx
());
System\Windows\Forms\AxHostTests.cs (25)
618
object ocx = control.
GetOcx
();
620
Assert.Same(ocx, control.
GetOcx
());
626
Assert.Same(ocx, control.
GetOcx
());
648
Assert.Same(ocx, control.
GetOcx
());
654
Assert.Same(ocx, control.
GetOcx
());
682
Assert.Null(control.
GetOcx
());
688
Assert.Null(control.
GetOcx
());
710
object ocx = control.
GetOcx
();
712
Assert.Same(ocx, control.
GetOcx
());
718
Assert.Same(ocx, control.
GetOcx
());
746
Assert.Null(control.
GetOcx
());
752
Assert.Null(control.
GetOcx
());
774
Assert.Null(control.
GetOcx
());
780
Assert.Null(control.
GetOcx
());
817
object ocx = control.
GetOcx
();
826
Assert.Same(ocx, control.
GetOcx
());
835
Assert.Same(ocx, control.
GetOcx
());
863
Assert.Same(ocx, control.
GetOcx
());
872
Assert.Same(ocx, control.
GetOcx
());
1377
object ocx = control.
GetOcx
();
1410
Assert.Null(control.
GetOcx
());
1425
object ocx = control.
GetOcx
();
1751
Assert.Null(control.
GetOcx
());
1755
Assert.Null(control.
GetOcx
());
3083
using var ocx = ComHelpers.GetComScope<IUnknown>(control.
GetOcx
());