示例#1
0
        /// <summary>Replies to the request.</summary>
        public virtual void ReplyRequest(ACCESS_REQUEST AccessRequest, Boolean Allow)
        {
            if (!IsRunning)
            {
                throw new InvalidOperationException("FileWall is stopped.");
            }

            var Permission = new PERMISSION
            {
                Status    = 0,                              // STATUS_SUCCESS
                MessageId = AccessRequest.MessageId,
                Allow     = (Allow ? 1 : 0)
            };

            var hr = fltLib.FilterReplyMessage(portHandle, ref Permission, Marshal.SizeOf(Permission));

            Marshal.ThrowExceptionForHR(hr);
        }
示例#2
0
文件: FltLib.cs 项目: y11en/FileWall
 private static extern int _FilterReplyMessage(IntPtr hPort,
                                               ref PERMISSION lpReplyBuffer,
                                               Int32 dwReplyBufferSize);
示例#3
0
文件: FltLib.cs 项目: y11en/FileWall
 public virtual int FilterReplyMessage(IntPtr hPort,
                                       ref PERMISSION lpReplyBuffer,
                                       Int32 dwReplyBufferSize)
 {
     return(_FilterReplyMessage(hPort, ref lpReplyBuffer, dwReplyBufferSize));
 }