ReactOS 0.4.15-dev-7711-g5627da4
appdb.cpp File Reference
#include "rapps.h"
#include "appdb.h"
#include "configparser.h"
#include "settings.h"
Include dependency graph for appdb.cpp:

Go to the source code of this file.

Macros

#define UNINSTALL_SUBKEY   L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall"
 

Functions

static VOID ClearList (CAtlList< CAppInfo * > &list)
 
static void DeleteWithWildcard (const CPathW &Dir, const CStringW &Filter)
 

Variables

static HKEY g_RootKeyEnum [3] = {HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, HKEY_LOCAL_MACHINE}
 
static REGSAM g_RegSamEnum [3] = {KEY_WOW64_32KEY, KEY_WOW64_32KEY, KEY_WOW64_64KEY}
 

Macro Definition Documentation

◆ UNINSTALL_SUBKEY

#define UNINSTALL_SUBKEY   L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall"

Definition at line 18 of file appdb.cpp.

Function Documentation

◆ ClearList()

static VOID ClearList ( CAtlList< CAppInfo * > &  list)
static

Definition at line 21 of file appdb.cpp.

22{
23 POSITION InfoListPosition = list.GetHeadPosition();
24 while (InfoListPosition)
25 {
26 CAppInfo *Info = list.GetNext(InfoListPosition);
27 delete Info;
28 }
29 list.RemoveAll();
30}
Definition: list.h:37
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690

Referenced by CAppDB::EnumerateFiles(), and CAppDB::UpdateInstalled().

◆ DeleteWithWildcard()

static void DeleteWithWildcard ( const CPathW Dir,
const CStringW Filter 
)
static

Definition at line 215 of file appdb.cpp.

216{
218 WIN32_FIND_DATAW FindFileData;
219
220 CPathW DirWithFilter = Dir;
221 DirWithFilter += Filter;
222
223 hFind = FindFirstFileW(DirWithFilter, &FindFileData);
224
225 if (hFind == INVALID_HANDLE_VALUE)
226 return;
227
228 do
229 {
230 CPathW szTmp = Dir;
231 szTmp += FindFileData.cFileName;
232
233 if (!(FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
234 {
236 }
237 } while (FindNextFileW(hFind, &FindFileData) != 0);
238 FindClose(hFind);
239}
char szTmp[518]
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:320
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:382
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1801
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705

Referenced by CAppDB::RemoveCached().

Variable Documentation

◆ g_RegSamEnum

REGSAM g_RegSamEnum[3] = {KEY_WOW64_32KEY, KEY_WOW64_32KEY, KEY_WOW64_64KEY}
static

Definition at line 17 of file appdb.cpp.

Referenced by CAppDB::RemoveInstalledAppFromRegistry(), and CAppDB::UpdateInstalled().

◆ g_RootKeyEnum