MCPcopy Create free account
hub / github.com/D4stiny/PeaceMaker / StringFilters

Method StringFilters

PeaceMaker Kernel/StringFilters.cpp:15–41  ·  view source on GitHub ↗

Initialize the CUSTOM_FILTERS class by initializing the linked list's lock. @param Type - The type of filter to add (filesystem or registry). @param RegistryPath - The registry path of the driver. @param FilterStoreName - Name of the filter store. */

Source from the content-addressed store, hash-verified

13 @param FilterStoreName - Name of the filter store.
14*/
15StringFilters::StringFilters (
16 _In_ STRING_FILTER_TYPE FilterType,
17 _In_ PUNICODE_STRING RegistryPath,
18 _In_ CONST WCHAR* FilterStoreName
19 )
20{
21 //
22 // Initialize the lock for the filters.
23 //
24 FltInitializePushLock(&this->filtersLock);
25
26 this->filtersHead = RCAST<PFILTER_INFO_LINKED>(ExAllocatePoolWithTag(NonPagedPool, sizeof(FILTER_INFO_LINKED), FILTER_INFO_TAG));
27 InitializeListHead(RCAST<PLIST_ENTRY>(this->filtersHead));
28 this->destroying = FALSE;
29
30 this->filtersCount = 0;
31 this->filterType = FilterType;
32
33 //
34 // Initialize space for the driver registry key.
35 //
36 this->driverRegistryPath.Buffer = RCAST<PWCH>(ExAllocatePoolWithTag(NonPagedPool, RegistryPath->MaximumLength, FILTER_INFO_TAG));
37 this->driverRegistryPath.MaximumLength = RegistryPath->MaximumLength;
38 RtlCopyUnicodeString(&this->driverRegistryPath, RegistryPath);
39
40 RtlInitUnicodeString(&this->filterStoreValueName, FilterStoreName);
41}
42
43/**
44 Destroy the CustomFilters class by clearing the filters linked list and deleting the associated lock.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected