// ----------------------------------------------------------------------------------- public OpcEnumItemAttributes CreateAttrEnumerator() { Type typEnuAtt = typeof(IEnumOPCItemAttributes); Guid guidEnuAtt = typEnuAtt.GUID; object objtemp; int hresult = ifItems.CreateEnumerator(ref guidEnuAtt, out objtemp); if (HRESULTS.Failed(hresult)) { Marshal.ThrowExceptionForHR(hresult); } if ((hresult == HRESULTS.S_FALSE) || (objtemp == null)) { return(null); } IEnumOPCItemAttributes ifenu = (IEnumOPCItemAttributes)objtemp; objtemp = null; OpcEnumItemAttributes enu = new OpcEnumItemAttributes(ifenu); return(enu); }
// ----------------------------------------------------------------------------------- public OpcEnumItemAttributes CreateAttrEnumerator() { Type typEnuAtt = typeof( IEnumOPCItemAttributes ); Guid guidEnuAtt = typEnuAtt.GUID; object objtemp; int hresult = ifItems.CreateEnumerator( ref guidEnuAtt, out objtemp ); if( HRESULTS.Failed( hresult ) ) Marshal.ThrowExceptionForHR( hresult ); if( (hresult == HRESULTS.S_FALSE) || (objtemp == null) ) return null; IEnumOPCItemAttributes ifenu = (IEnumOPCItemAttributes) objtemp; objtemp = null; OpcEnumItemAttributes enu = new OpcEnumItemAttributes( ifenu ); return enu; }