/// <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); }
private static extern int _FilterReplyMessage(IntPtr hPort, ref PERMISSION lpReplyBuffer, Int32 dwReplyBufferSize);
public virtual int FilterReplyMessage(IntPtr hPort, ref PERMISSION lpReplyBuffer, Int32 dwReplyBufferSize) { return(_FilterReplyMessage(hPort, ref lpReplyBuffer, dwReplyBufferSize)); }