Example #1
0
        static bool ProcessReplyMessage(EaseFilter.MessageSendData messageSend, IntPtr replyDataPtr)
        {
            bool ret = true;

            try
            {
                EaseFilter.MessageReplyData messageReply = new EaseFilter.MessageReplyData();
                messageReply = (EaseFilter.MessageReplyData)Marshal.PtrToStructure(replyDataPtr, typeof(EaseFilter.MessageReplyData));

                messageReply.MessageId   = messageSend.MessageId;
                messageReply.MessageType = messageSend.MessageType;


                messageReply.FilterStatus = 0;
                messageReply.ReturnStatus = (uint)NtStatus.Status.Success;


                Marshal.StructureToPtr(messageReply, replyDataPtr, true);
            }
            catch
            {
            }

            return(ret);
        }
Example #2
0
        static Boolean FilterCallback(IntPtr sendDataPtr, IntPtr replyDataPtr)
        {
            Boolean ret = true;

            try
            {
                EaseFilter.MessageSendData messageSend = new EaseFilter.MessageSendData();
                messageSend = (EaseFilter.MessageSendData)Marshal.PtrToStructure(sendDataPtr, typeof(EaseFilter.MessageSendData));

                if (EaseFilter.MESSAGE_SEND_VERIFICATION_NUMBER != messageSend.VerificationNumber)
                {
                    return(false);
                }



                ret = ProcessReplyMessage(messageSend, replyDataPtr);


                return(ret);
            }
            catch
            {
                return(false);
            }
        }