int UnsafeNativeMethods.IOleContainer.EnumObjects(int grfFlags, out UnsafeNativeMethods.IEnumUnknown ppenum) { ppenum = null; Debug.Assert(_host != null, "gotta have the avalon activex host"); object ax = _host.ActiveXInstance; //We support only one control, return that here //How does one add multiple controls to a container? if (ax != null && (((grfFlags & NativeMethods.OLECONTF_EMBEDDINGS) != 0) || ((grfFlags & NativeMethods.OLECONTF_ONLYIFRUNNING) != 0 && _host.ActiveXState == ActiveXHelper.ActiveXState.Running))) { Object[] temp = new Object[1]; temp[0] = ax; ppenum = new EnumUnknown(temp); return(NativeMethods.S_OK); } ppenum = new EnumUnknown(null); return(NativeMethods.S_OK); }
int UnsafeNativeMethods.IOleContainer.EnumObjects(int grfFlags, out UnsafeNativeMethods.IEnumUnknown ppenum) { ppenum = null; object activeXInstance = this._host.ActiveXInstance; if (activeXInstance != null && ((grfFlags & 1) != 0 || ((grfFlags & 16) != 0 && this._host.ActiveXState == ActiveXHelper.ActiveXState.Running))) { ppenum = new EnumUnknown(new object[] { activeXInstance }); return(0); } ppenum = new EnumUnknown(null); return(0); }
int UnsafeNativeMethods.IOleContainer.EnumObjects(int grfFlags, out UnsafeNativeMethods.IEnumUnknown ppenum) { ppenum = null; if ((grfFlags & 1) != 0) { ArrayList list = new ArrayList(); this.ListAXControls(list, true); if (list.Count > 0) { object[] array = new object[list.Count]; list.CopyTo(array, 0); ppenum = new AxHost.EnumUnknown(array); return(0); } } ppenum = new AxHost.EnumUnknown(null); return(0); }
int UnsafeNativeMethods.IOleContainer.EnumObjects(int grfFlags, out UnsafeNativeMethods.IEnumUnknown ppenum) { ppenum = null; if ((grfFlags & 1) != 0) // 1 == OLECONTF_EMBEDDINGS { Debug.Assert(parent != null, "gotta have it..."); ArrayList list = new ArrayList(); ListAXControls(list, true); if (list.Count > 0) { object[] temp = new object[list.Count]; list.CopyTo(temp, 0); ppenum = new AxHost.EnumUnknown(temp); return(NativeMethods.S_OK); } } ppenum = new AxHost.EnumUnknown(null); return(NativeMethods.S_OK); }
void UnsafeNativeMethods.IEnumUnknown.Clone(out UnsafeNativeMethods.IEnumUnknown ppenum) { ppenum = new EnumUnknown(this.arr, this.loc); }