Ejemplo n.º 1
0
        /// <summary>
        /// Retrieves the message from message queue
        /// </summary>
        /// <param name="CAPImsg">Retrieved message</param>
        /// <param name="comm">Command and subcommand of last message</param>
        /// <param name="info">Return code</param>
        public static void Get_msg(ref CAPI_Message CAPImsg, out comsub comm, out uint info)
        {
            comm = comsub.NO_ONE;
            IntPtr CAPImsgPtr = (IntPtr)null;

            info = (uint)CAPI_GET_MESSAGE(app_ID, ref CAPImsgPtr);
            if (info != (ushort)TInterfaceError.SUCCESS)
            {
                return;
            }
            CAPImsg.CopyToBuffor(CAPImsgPtr, (uint)Marshal.ReadInt16(CAPImsgPtr));
            comm = CAPImsg.sub_com;
        }