35 DPRINT(
"DumpEventSourceList()\n");
43 EventSourceListEntry);
45 DPRINT(
"EventSource->szName: %S\n", EventSource->
szName);
47 CurrentEntry = CurrentEntry->
Flink;
86 DWORD dwNumSubKeys, dwMaxSubKeyLength;
87 DWORD dwEventSourceNameLength, MaxValueLen;
90 size_t cchRemaining = 0;
93 DPRINT(
"LoadEventSources\n");
108 DPRINT1(
"Error: cannot allocate heap!\n");
117 MaxValueLen = dwNumSubKeys * dwMaxSubKeyLength +
wcslen(pLogFile->
LogName) + 2;
121 DPRINT1(
"Error: cannot allocate heap!\n");
126 cchRemaining = MaxValueLen;
136 dwEventSourceNameLength = dwMaxSubKeyLength;
141 &dwEventSourceNameLength,
146 DPRINT(
"Event Source: %S\n", Buf);
152 if (cchRemaining > 0)
160 dwEventSourceNameLength = dwMaxSubKeyLength;
171 if (cchRemaining > 0)
184 (MaxValueLen - cchRemaining + 1) *
sizeof(
WCHAR));
215 EventSourceListEntry);
226 CurrentEntry = CurrentEntry->
Flink;
static LPWSTR lpEventSource
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
#define HeapFree(x, y, z)
#define InsertTailList(ListHead, Entry)
#define InitializeListHead(ListHead)
BOOL LoadEventSources(HKEY hKey, PLOGFILE pLogFile)
static LIST_ENTRY EventSourceListHead
VOID InitEventSourceList(VOID)
static VOID DumpEventSourceList(VOID)
static CRITICAL_SECTION EventSourceListCs
static BOOL AddNewEventSource(PLOGFILE pLogFile, PWSTR lpSourceName)
PEVENTSOURCE GetEventSourceByName(LPCWSTR Name)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
static const WCHAR szName[]
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
STRSAFEAPI StringCchCopyExW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc, STRSAFE_LPWSTR *ppszDestEnd, size_t *pcchRemaining, STRSAFE_DWORD dwFlags)
struct _LIST_ENTRY * Flink
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
#define FIELD_OFFSET(t, f)
#define CONTAINING_RECORD(address, type, field)
_In_ WDFCOLLECTION _In_ WDFOBJECT Item
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
_In_ IN_ADDR _In_ IN_ADDR _Out_ MULTICAST_MODE_TYPE _Inout_ ULONG _Out_writes_ SourceCount IN_ADDR * SourceList
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO