Ejemplo n.º 1
0
            public static long oHpiHandlerInfo(
                long SessionId,
                long HandlerId,
                out oHpiHandlerInfoT HandlerInfo,
                out oHpiHandlerConfigT HandlerConfig
                )
            {
                long rv;
                bool rc;

                HandlerInfo   = null;
                HandlerConfig = null;

                HpiSession s = HpiCore.GetSession(SessionId);

                if (s == null)
                {
                    return(HpiConst.SA_ERR_HPI_INVALID_SESSION);
                }
                OhpiMarshal m = s.GetMarshal();

                if (m == null)
                {
                    return(HpiConst.SA_ERR_HPI_NO_RESPONSE);
                }

                m.MarshalSaHpiSessionIdT(s.GetRemoteSid());
                m.MarshaloHpiHandlerIdT(HandlerId);
                rc = m.Interchange(OhpiConst.RPC_OHPI_HANDLER_INFO);
                if (!rc)
                {
                    m.Close();
                    return(HpiConst.SA_ERR_HPI_NO_RESPONSE);
                }
                rv = m.DemarshalSaErrorT();
                if (rv == HpiConst.SA_OK)
                {
                    HandlerInfo   = m.DemarshaloHpiHandlerInfoT();
                    HandlerConfig = m.DemarshaloHpiHandlerConfigT();
                }
                s.PutMarshal(m);

                return(rv);
            }