25#define PANO_MAX_QUEUED_EVENTS 2048
77 _In_reads_opt_(NameLength)
const WCHAR* FileName,
90 _In_reads_opt_(NameLength)
const WCHAR* FileName,
100 _In_reads_opt_(SourceNameLength)
const WCHAR* SourceName,
101 UINT32 SourceNameLength,
102 _In_reads_opt_(DestinationNameLength)
const WCHAR* DestinationName,
103 UINT32 DestinationNameLength);
117 _In_reads_opt_(KeyNameLength)
const WCHAR* KeyName,
118 UINT32 KeyNameLength,
119 _In_reads_opt_(SecondNameLength)
const WCHAR* SecondName,
120 UINT32 SecondNameLength,
121 _In_reads_bytes_opt_(DataLength)
const void* Data,
131 UINT64 ParentProcessId,
132 UINT64 CreatingProcessId,
133 UINT64 CreatingThreadId,
134 _In_reads_opt_(ImageNameLength)
const WCHAR* ImageName,
135 UINT32 ImageNameLength,
136 _In_reads_opt_(CommandLineLength)
const WCHAR* CommandLine,
137 UINT32 CommandLineLength);
NTSTATUS EventQueueInit()
Initializes the event queue. Call once from DriverEntry before any producer can run and before the de...
void EventQueueCleanup()
Cancels every pending GET_EVENT request and frees all buffered events. Call from the unload path afte...
BOOLEAN EventQueueIsConsumerProcess(UINT64 ProcessId)
Checks whether a process is the one reading events (the service). The filter does not report that pro...
NTSTATUS PanoReportProcessEvent(PANO_EVENT_TYPE Type, UINT64 ProcessId, UINT64 ParentProcessId, UINT64 CreatingProcessId, UINT64 CreatingThreadId, _In_reads_opt_(ImageNameLength) const WCHAR *ImageName, UINT32 ImageNameLength, _In_reads_opt_(CommandLineLength) const WCHAR *CommandLine, UINT32 CommandLineLength)
Convenience wrapper that builds a PANO_PROCESS_EVENT_DATA event. If the image name and command line t...
void EventQueueCleanupFile(PFILE_OBJECT FileObject)
Handles IRP_MJ_CLEANUP for a handle to the device: cancels the GET_EVENT requests still parked for it...
NTSTATUS PanoReportRenameEvent(UINT64 ProcessId, UINT64 ThreadId, UINT32 Flags, _In_reads_opt_(SourceNameLength) const WCHAR *SourceName, UINT32 SourceNameLength, _In_reads_opt_(DestinationNameLength) const WCHAR *DestinationName, UINT32 DestinationNameLength)
Convenience wrapper that builds a PANO_RENAME_EVENT_DATA event. If the two names together exceed PANO...
NTSTATUS PanoReportFileModifiedEvent(UINT64 ProcessId, UINT64 ThreadId, UINT64 Writes, UINT64 Bytes, INT64 FirstWriteTime, UINT32 Flags, _In_reads_opt_(NameLength) const WCHAR *FileName, UINT32 NameLength)
Convenience wrapper that builds a PANO_EVENT_FILE_MODIFIED event. FileName is copied and truncated to...
NTSTATUS PanoReportRegistryEvent(PANO_EVENT_TYPE Type, UINT64 ProcessId, UINT64 ThreadId, UINT32 Flags, UINT32 Detail, UINT32 DataSize, _In_reads_opt_(KeyNameLength) const WCHAR *KeyName, UINT32 KeyNameLength, _In_reads_opt_(SecondNameLength) const WCHAR *SecondName, UINT32 SecondNameLength, _In_reads_bytes_opt_(DataLength) const void *Data, UINT32 DataLength)
Convenience wrapper that builds a PANO_REGISTRY_EVENT_DATA event. Every buffer must be kernel memory:...
BOOLEAN EventQueueReceiveRequest(PIRP Irp, NTSTATUS *Status)
Queues a GET_EVENT request. Call from the IOCTL dispatch routine. On success the IRP is either comple...
NTSTATUS PanoReportEvent(PANO_EVENT_TYPE Type, _In_reads_bytes_(PayloadSize) const void *Payload, UINT32 PayloadSize)
Reports one event. Delivers it to a pending GET_EVENT request if one is waiting, otherwise buffers it...
NTSTATUS PanoReportFileEvent(PANO_EVENT_TYPE Type, UINT64 ProcessId, UINT64 ThreadId, INT64 FileOffset, UINT32 Length, UINT32 Flags, _In_reads_opt_(NameLength) const WCHAR *FileName, UINT32 NameLength)
Convenience wrapper that builds a PANO_FILE_EVENT_DATA event. FileName is copied and truncated to PAN...
PANO_EVENT_TYPE
The type of event, which determines the data that follows the header.