コード例 #1
0
ファイル: COPCGroups.cs プロジェクト: zgqallen/HyperOPClient
        public void DeletePublic(bool p_Force)
        {
            if (!m_State.Public)
            {
                Marshal.ThrowExceptionForHR(HResults.E_FAIL);
            }

            IOPCServerPublicGroups l_IfPubGrps = null;

            l_IfPubGrps = (IOPCServerPublicGroups)m_IfServer;
            if (l_IfPubGrps == null)
            {
                Marshal.ThrowExceptionForHR(HResults.E_NOINTERFACE);
            }
            Remove(false);
            l_IfPubGrps.RemovePublicGroup(m_State.HandleServer, p_Force);
            l_IfPubGrps = null;
        }
コード例 #2
0
ファイル: OpcGroup.cs プロジェクト: tkouba/OPCdotNET
        /// <summary>
        /// Delete public OPC group
        /// </summary>
        /// <param name="force">Force remove</param>
        public void DeletePublic(bool force)
        {
            ThrowIfDisposed();
            if (!statePublic)
            {
                Marshal.ThrowExceptionForHR(HRESULTS.E_FAIL);
            }

            IOPCServerPublicGroups ifPubGrps = parentServer as IOPCServerPublicGroups;

            if (ifPubGrps == null)
            {
                Marshal.ThrowExceptionForHR(HRESULTS.E_NOINTERFACE);
            }
            int serverhandle = stateHandleServer;

            InternalRemove(false);
            ifPubGrps.RemovePublicGroup(serverhandle, force);
            ifPubGrps = null;
        }
コード例 #3
0
        // -------------- IOPCServerPublicGroups + IOPCPublicGroupStateMgt

        public void DeletePublic(bool bForce)
        {
            if (!state.Public)
            {
                Marshal.ThrowExceptionForHR(HRESULTS.E_FAIL);
            }

            IOPCServerPublicGroups ifPubGrps = null;

            ifPubGrps = (IOPCServerPublicGroups)ifServer;
            if (ifPubGrps == null)
            {
                Marshal.ThrowExceptionForHR(HRESULTS.E_NOINTERFACE);
            }
            int serverhandle = state.HandleServer;

            Remove(false);
            ifPubGrps.RemovePublicGroup(serverhandle, bForce);
            ifPubGrps = null;
        }