private EnumString GetEnumerator(string itemID, BrowseFilters filters, bool branches, bool flat) { IOPCBrowseServerAddressSpace iOPCBrowseServerAddressSpace = (IOPCBrowseServerAddressSpace)m_server; if (!flat) { string text = (itemID != null) ? itemID : ""; try { iOPCBrowseServerAddressSpace.ChangeBrowsePosition(OPCBROWSEDIRECTION.OPC_BROWSE_TO, text); } catch { try { iOPCBrowseServerAddressSpace.ChangeBrowsePosition(OPCBROWSEDIRECTION.OPC_BROWSE_DOWN, text); } catch { try { while (true) { iOPCBrowseServerAddressSpace.ChangeBrowsePosition(OPCBROWSEDIRECTION.OPC_BROWSE_UP, string.Empty); } } catch { } string[] array = null; lock (m_separatorsLock) { array = ((m_separators == null) ? text.Split(m_separators) : text.Split(m_separators)); } for (int i = 0; i < array.Length; i++) { if (array[i] != null && array[i].Length != 0) { try { iOPCBrowseServerAddressSpace.ChangeBrowsePosition(OPCBROWSEDIRECTION.OPC_BROWSE_DOWN, array[i]); } catch { throw new ResultIDException(ResultID.Da.E_UNKNOWN_ITEM_NAME, "Cannot browse because the server is not compliant because it does not support the BROWSE_TO function."); } } } } } } try { IEnumString ppIEnumString = null; OPCBROWSETYPE dwBrowseFilterType = branches ? OPCBROWSETYPE.OPC_BRANCH : OPCBROWSETYPE.OPC_LEAF; if (flat) { dwBrowseFilterType = OPCBROWSETYPE.OPC_FLAT; } iOPCBrowseServerAddressSpace.BrowseOPCItemIDs(dwBrowseFilterType, (filters.ElementNameFilter != null) ? filters.ElementNameFilter : "", 0, 0, out ppIEnumString); return(new EnumString(ppIEnumString)); } catch { throw new ResultIDException(ResultID.Da.E_UNKNOWN_ITEM_NAME); } }
private List <string> GetOptionIdsImpl() { IEnumString optionIds = _speller.Value.OptionIds; return((optionIds != null) ? optionIds.ToList(false, true) : null); }
public void BrowseOPCItemIDs(OPCBROWSETYPE dwBrowseFilterType, string szFilterCriteria, short vtDataTypeFilter, int dwAccessRightsFilter, out IEnumString ppIEnumString) { var methodName = nameof(IOPCBrowseServerAddressSpace) + "." + nameof(IOPCBrowseServerAddressSpace.BrowseOPCItemIDs); try { var server = BeginComCall <IOPCBrowseServerAddressSpace>(methodName, true); server.BrowseOPCItemIDs(dwBrowseFilterType, szFilterCriteria, vtDataTypeFilter, dwAccessRightsFilter, out ppIEnumString); } finally { EndComCall(methodName); } }
int WebBrowserAPI.IInternetSecurityManager.GetZoneMappings(int dwZone, ref IEnumString ppenumstring, int dwFlags) { ppenumstring = null; return WebBrowserAPI.INET_E_DEFAULT_ACTION; }
public ComStringEnumerator(IntPtr ptrToIEnumString) { this.enumString = (IEnumString)Marshal.GetTypedObjectForIUnknown(ptrToIEnumString, typeof(IEnumString)); }
public virtual int GetZoneMappings(int dwZone, out IEnumString ppenumString, int dwFlags) { ppenumString = null; return INET_E.DEFAULT_ACTION; }
void IEnumString.Clone(out IEnumString ppenum) { ppenum = new StringSource(this.strings); }
public void BrowseAccessPaths(string szItemID, out IEnumString pIEnumString) { var methodName = nameof(IOPCBrowseServerAddressSpace) + "." + nameof(IOPCBrowseServerAddressSpace.BrowseAccessPaths); try { var server = BeginComCall<IOPCBrowseServerAddressSpace>(methodName, true); server.BrowseAccessPaths(szItemID, out pIEnumString); } finally { EndComCall(methodName); } }
public void BrowseOPCItemIDs(OPCBROWSETYPE dwBrowseFilterType, string szFilterCriteria, short vtDataTypeFilter, int dwAccessRightsFilter, out IEnumString ppIEnumString) { var methodName = nameof(IOPCBrowseServerAddressSpace) + "." + nameof(IOPCBrowseServerAddressSpace.BrowseOPCItemIDs); try { var server = BeginComCall<IOPCBrowseServerAddressSpace>(methodName, true); server.BrowseOPCItemIDs(dwBrowseFilterType, szFilterCriteria, vtDataTypeFilter, dwAccessRightsFilter, out ppIEnumString); } finally { EndComCall(methodName); } }
public void EnumObjectParam(out IEnumString ppenum) { _object.EnumObjectParam(out ppenum); }
public void Clone(out IEnumString ppenum) { throw new System.NotImplementedException(); }
public int Clone(out IEnumString ppenum) { throw new NotImplementedException(); }
public void Clone(out IEnumString ppenum) { ppenum = new EnumString(strings); }
public void Clone(out IEnumString ppenum) { ppenum = null; }
void IEnumString.Clone(out IEnumString ppenum) { ppenum = new StringSource(strings); }
int COM.IInternetSecurityManager.GetZoneMappings(int dwZone, out IEnumString ppenumString, int dwFlags) { ppenumString = null; return COM.INET_E_DEFAULT_ACTION; }
/// <summary> /// Initializes the object with an enumerator. /// </summary> public EnumString(object enumerator) { m_enumerator = (IEnumString)enumerator; }
public void GetEnumerator(out IEnumString ppIEnumString) { Log.Error("MetadataEnumerator.GetEnumerator called"); throw new NotImplementedException(); }
public int GetZoneMappings(int dwZone, out IEnumString ppenumString, int dwFlags) { return SecurityManager.GetZoneMappings(dwZone, out ppenumString, dwFlags); }
/// <summary> /// Releases the remote COM object. /// </summary> public void Dispose() { Utilities.Interop.ReleaseServer(m_enumerator); m_enumerator = null; }
int IInternetSecurityManager.GetZoneMappings(uint dwZone, out IEnumString ppenumString, uint dwFlags) { ppenumString = null; return (int)WinInetErrors.INET_E_DEFAULT_ACTION; }
private static int Skip(IntPtr thisPtr, int celt) { IEnumString inst = ComInterfaceDispatch.GetInstance <IEnumString>((ComInterfaceDispatch *)thisPtr); return(inst.Skip(celt)); }
public int GetZoneMappings(int dwZone, ref IEnumString ppenumString, int dwFlags) { ppenumString = null; return WebBrowserAPI.INET_E_DEFAULT_ACTION; }
int WebBrowserAPI.IInternetSecurityManager.GetZoneMappings(int dwZone, ref IEnumString ppenumstring, int dwFlags) { ppenumstring = null; return(WebBrowserAPI.INET_E_DEFAULT_ACTION); }