예제 #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));
 }