ReactOS 0.4.16-dev-297-gc569aee
|
Go to the source code of this file.
Classes | |
struct | _SDB |
struct | tagATTRINFO |
struct | tagSDBQUERYRESULT |
struct | _DB_INFORMATION |
Macros | |
#define | HID_DOS_PATHS 0x1 |
#define | HID_DATABASE_FULLPATH 0x2 |
#define | HID_NO_DATABASE 0x4 |
#define | HID_DATABASE_TYPE_MASK 0xF00F0000 |
#define | SDB_DATABASE_MAIN_MSI 0x80020000 |
#define | SDB_DATABASE_MAIN_SHIM 0x80030000 |
#define | SDB_DATABASE_MAIN_DRIVERS 0x80040000 |
#define | SDB_DATABASE_SHIM 0x00010000 |
#define | SDB_MAX_SDBS 16 |
#define | SDB_MAX_EXES 16 |
#define | SDB_MAX_LAYERS 8 |
#define | SHIMREG_DISABLE_SHIM (0x00000001) |
#define | SHIMREG_DISABLE_APPHELP (0x00000002) |
#define | SHIMREG_APPHELP_NOUI (0x00000004) |
#define | SHIMREG_APPHELP_CANCEL (0x10000000) |
#define | SHIMREG_DISABLE_SXS (0x00000010) |
#define | SHIMREG_DISABLE_LAYER (0x00000020) |
#define | SHIMREG_DISABLE_DRIVER (0x00000040) |
#define | SHIMREG_HAS_ENVIRONMENT (0x1) |
#define | SDBGMEF_IGNORE_ENVIRONMENT (0x1) |
#define | DB_INFO_FLAGS_VALID_GUID 1 |
#define | ATTRIBUTE_AVAILABLE 0x1 |
#define | ATTRIBUTE_FAILED 0x2 |
Typedefs | |
typedef struct _SDB | SDB |
typedef struct _SDB * | HSDB |
typedef struct tagATTRINFO | ATTRINFO |
typedef struct tagATTRINFO * | PATTRINFO |
typedef struct tagSDBQUERYRESULT | SDBQUERYRESULT |
typedef struct tagSDBQUERYRESULT * | PSDBQUERYRESULT |
typedef struct _DB_INFORMATION | DB_INFORMATION |
typedef struct _DB_INFORMATION * | PDB_INFORMATION |
typedef struct tagATTRINFO ATTRINFO |
typedef struct _DB_INFORMATION DB_INFORMATION |
typedef struct tagATTRINFO * PATTRINFO |
typedef struct _DB_INFORMATION * PDB_INFORMATION |
typedef struct tagSDBQUERYRESULT * PSDBQUERYRESULT |
typedef struct tagSDBQUERYRESULT SDBQUERYRESULT |
Determine if we allow permission layers to apply on this file.
[in] | Path | Full pathname of the file, only the drive part is used. |
Definition at line 320 of file layer.c.
Referenced by CLayerUIPropPage::InitFile().
Closes specified database and frees its memory.
[in] | pdb | Handle to the shim database. |
Definition at line 373 of file sdbapi.c.
Referenced by SdbInstall(), SdbRegisterDatabaseEx(), SdbReleaseDatabase(), SdbUninstall(), and CLayerStringList::~CLayerStringList().
TAGID WINAPI SdbFindFirstNamedTag | ( | PDB | pdb, |
TAGID | root, | ||
TAGID | find, | ||
TAGID | nametag, | ||
LPCWSTR | find_name | ||
) |
Find the first named child tag.
[in] | pdb | The database. |
[in] | root | The tag to start at |
[in] | find | The tag type to find |
[in] | nametag | The child of 'find' that contains the name |
[in] | find_name | The name to find |
Definition at line 544 of file sdbapi.c.
Referenced by SdbGetLayerTagRef(), SdbpAddNamedLayerMatch(), and SdbQueryDataExTagID().
Searches shim database for a tag within specified domain.
[in] | pdb | Handle to the shim database. |
[in] | parent | TAGID of parent. |
[in] | tag | TAG to be located. |
Definition at line 208 of file sdbread.c.
Referenced by GetSdbGuid(), CLayerStringList::Next(), ProcessExe(), ProcessLayers(), CLayerStringList::Reset(), SdbFindFirstNamedTag(), SdbGetDatabaseID(), SdbGetLayerTagRef(), SdbGetMatchingExe(), SdbInstall(), SdbOpenDatabase(), SdbpAddExeLayers(), SdbpAddNamedLayerMatch(), SdbpMatchExe(), SdbQueryDataExTagID(), SdbUninstall(), SeiBuildGlobalInclExclList(), SeiBuildShimRefArray(), SeiGetDWORD(), SeiGetQWORD(), SeiGetStringPtr(), and SeiReadInExclude().
Searches shim database for a next tag which matches prev_child within parent's domain.
[in] | pdb | Handle to the shim database. |
[in] | parent | TAGID of parent. |
[in] | prev_child | TAGID of previous match. |
Definition at line 231 of file sdbread.c.
Referenced by CLayerStringList::Next(), ProcessExe(), ProcessLayers(), SdbFindFirstNamedTag(), SdbGetMatchingExe(), SdbpAddExeLayers(), SdbpMatchExe(), SeiBuildShimRefArray(), SeiReadInExclude(), and CLayerStringList::Skip().
VOID WINAPI SdbFreeDatabaseInformation | ( | PDB_INFORMATION | information | ) |
Definition at line 527 of file sdbapi.c.
Referenced by SdbRegisterDatabaseEx().
Frees attribute data allocated by SdbGetFileAttributes.
[in] | attr_info | Pointer to array of ATTRINFO which will be freed. |
Definition at line 214 of file sdbfileattr.c.
Referenced by InitApphelp(), SdbGetMatchingExe(), SdbpMatchExe(), and START_TEST().
Retrieves AppPatch directory.
[in] | pdb | Handle to the shim database. |
[out] | path | Pointer to memory in which path shall be written. |
[in] | size | Size of the buffer in characters. |
Definition at line 579 of file hsdb.c.
Referenced by CLayerStringList::CLayerStringList(), SdbInitDatabase(), SeiInit(), and START_TEST().
Reads binary data at specified tagid.
[in] | pdb | Handle to the shim database. |
[out] | Guid | Database ID. |
Definition at line 388 of file sdbread.c.
Referenced by SdbOpenDatabase().
BOOL WINAPI SdbGetDatabaseInformation | ( | PDB | pdb, |
PDB_INFORMATION | information | ||
) |
Definition at line 502 of file sdbapi.c.
Referenced by SdbRegisterDatabaseEx().
Retrieves attribute data shim database requires to match a file with database entry
[in] | path | Path to the file. |
[out] | attr_info_ret | Pointer to array of ATTRINFO. Contains attribute data. |
[out] | attr_count | Number of attributes in attr_info. |
Definition at line 239 of file sdbfileattr.c.
Referenced by InitApphelp(), SdbGetMatchingExe(), SdbpMatchExe(), and START_TEST().
Searches shim database for a child of specified parent tag.
[in] | pdb | Handle to the shim database. |
[in] | parent | TAGID of parent. |
Definition at line 142 of file sdbread.c.
Referenced by SdbFindFirstTag(), and SdbpMatchFileAttributes().
BOOL WINAPI SdbGetMatchingExe | ( | HSDB | hsdb, |
LPCWSTR | path, | ||
LPCWSTR | module_name, | ||
LPCWSTR | env, | ||
DWORD | flags, | ||
PSDBQUERYRESULT | result | ||
) |
Queries database for a specified exe If hsdb is NULL default database shall be loaded and searched.
[in] | hsdb | Handle to the shim database. |
[in] | path | Path to executable for which we query database. |
[in] | module_name | Unused. |
[in] | env | The environment block to use |
[in] | flags | 0 or SDBGMEF_IGNORE_ENVIRONMENT. |
[out] | result | Pointer to structure in which query result shall be stored. |
Definition at line 439 of file hsdb.c.
Referenced by ApphelpCheckRunAppEx().
Searches shim database for next child of specified parent tag.
[in] | pdb | Handle to the shim database. |
[in] | parent | TAGID of parent. |
[in] | prev_child | TAGID of previous child. |
Definition at line 171 of file sdbread.c.
Referenced by SdbFindFirstTag(), SdbFindNextTag(), and SdbpMatchFileAttributes().
BOOL WINAPI SdbGetPermLayerKeys | ( | PCWSTR | wszPath, |
PWSTR | pwszLayers, | ||
PDWORD | pdwBytes, | ||
DWORD | dwFlags | ||
) |
Read the layers specified for the application.
[in] | wszPath | Full pathname of the file. |
[out] | pwszLayers | On return, the layers set on the file. |
pdwBytes | The size of the pwszLayers buffer in bytes, and on return the size of the data written (in bytes) | |
[in] | dwFlags | The flags, [GPLK_USER | GPLK_MACHINE]. |
Definition at line 364 of file layer.c.
Referenced by GetLayerInfo(), SdbGetMatchingExe(), and SetPermLayerState().
Searches shim database for string associated with specified tagid.
[in] | pdb | Handle to the shim database. |
[in] | tagid | TAGID of string or stringref associated with the string. |
Definition at line 375 of file sdbread.c.
Referenced by CLayerStringList::Next(), ProcessExe(), ProcessLayers(), SdbFindFirstNamedTag(), SdbGetMatchingExe(), SdbInstall(), SdbOpenDatabase(), SdbpAddExeLayers(), SdbpMatchExe(), SdbpMatchFileAttributes(), SeiGetStringPtr(), and SeiReadInExclude().
Retrieves size of data at specified tagid.
[in] | pdb | Handle to the shim database. |
[in] | tagid | Tagid of tag whose size is queried. |
Definition at line 109 of file sdbread.c.
Referenced by SdbpGetTagSize(), and SdbQueryDataExTagID().
Searches shim database for the tag associated with specified tagid.
[in] | pdb | Handle to the shim database. |
[in] | tagid | The TAGID of the tag. |
Definition at line 93 of file sdbread.c.
Referenced by SdbFindFirstTag(), SdbFindNextTag(), SdbGetFirstChild(), SdbGetTagDataSize(), SdbpCheckTagIDType(), SdbpGetString(), SdbpGetTagSize(), and SdbpMatchFileAttributes().
Converts a GUID to a string.
[in] | Guid | The GUID to convert. |
[out] | GuidString | The resulting string representation of Guid. |
[in] | Length | The length of GuidString. |
Definition at line 412 of file sdbapi.c.
Referenced by ApphelpCheckShellObject(), SdbRegisterDatabaseEx(), SdbUnregisterDatabase(), and START_TEST().
Opens specified shim database file. Handle returned by this function may only be used by functions which take HSDB param thus differing it from SdbOpenDatabase.
[in] | flags | Specifies type of path or predefined database. |
[in] | path | Path to the shim database file. |
Definition at line 369 of file hsdb.c.
Referenced by ApphelpCheckRunAppEx(), SdbGetMatchingExe(), SdbPackAppCompatData(), and SeiGetShimData().
Checks if the specified GUID is a NULL GUID
[in] | Guid | The GUID to check. |
Definition at line 431 of file sdbapi.c.
Referenced by SdbGetDatabaseID(), SdbGetDatabaseInformation(), and START_TEST().
Opens specified shim database file.
[in] | path | Path to the shim database. |
[in] | type | Type of path. Either DOS_PATH or NT_PATH. |
Definition at line 329 of file sdbapi.c.
Referenced by CLayerStringList::CLayerStringList(), SdbInitDatabase(), SdbInstall(), SdbRegisterDatabaseEx(), and SdbUninstall().
Definition at line 47 of file sdbread.c.
Referenced by SdbGetStringTagPtr(), SdbQueryDataExTagID(), and SdbReadStringTag().
Definition at line 14 of file sdbread.c.
Referenced by SdbGetTagDataSize(), SdbGetTagFromTagID(), SdbpGetString(), SdbpOpenDatabase(), SdbQueryDataExTagID(), SdbReadBinaryTag(), SdbReadDWORDTag(), SdbReadQWORDTag(), and SdbReadWORDTag().
Definition at line 162 of file sdbapi.c.
Referenced by SdbpSetStringAttr(), SeiAppendHookInfo(), SeiAppendInExclude(), and SeiInitPaths().
Definition at line 157 of file sdbapi.c.
Referenced by SdbpOpenKey(), SdbSetPermLayerKeys(), SdbWriteStringTag(), and SeiInitPaths().
DWORD WINAPI SdbQueryData | ( | HSDB | hsdb, |
TAGREF | trWhich, | ||
LPCWSTR | lpszDataName, | ||
LPDWORD | lpdwDataType, | ||
LPVOID | lpBuffer, | ||
LPDWORD | lpcbBufferSize | ||
) |
Retrieve a Data entry
[in] | hsdb | The multi-database. |
[in] | trExe | The tagRef to start at |
[in,opt] | lpszDataName The name of the Data entry to find, or NULL to return all. | |
[out,opt] | lpdwDataType Any of REG_SZ, REG_QWORD, REG_DWORD, ... | |
[out] | lpBuffer | The output buffer |
[in,out,opt] | lpcbBufferSize The size of lpBuffer in bytes |
Definition at line 832 of file hsdb.c.
Referenced by SdbPackAppCompatData().
DWORD WINAPI SdbQueryDataExTagID | ( | PDB | pdb, |
TAGID | tiExe, | ||
LPCWSTR | lpszDataName, | ||
LPDWORD | lpdwDataType, | ||
LPVOID | lpBuffer, | ||
LPDWORD | lpcbBufferSize, | ||
TAGID * | ptiData | ||
) |
Retrieve a Data entry
[in] | pdb | The database. |
[in] | tiExe | The tagID to start at |
[in,opt] | lpszDataName The name of the Data entry to find, or NULL to return all. | |
[out,opt] | lpdwDataType Any of REG_SZ, REG_QWORD, REG_DWORD, ... | |
[out] | lpBuffer | The output buffer |
[in,out,opt] | lpcbBufferSize The size of lpBuffer in bytes | |
[out,opt] | ptiData The tagID of the data |
Definition at line 614 of file sdbapi.c.
Referenced by SdbQueryDataEx().
Reads binary data at specified tagid.
[in] | pdb | Handle to the shim database. |
[in] | tagid | TAGID of binary data. |
[out] | buffer | Buffer in which data will be copied. |
[in] | size | Size of the buffer. |
Definition at line 338 of file sdbread.c.
Referenced by GetSdbGuid(), and SdbGetDatabaseID().
Reads DWORD value at specified tagid.
[in] | pdb | Handle to the shim database. |
[in] | tagid | TAGID of DWORD value. |
[in] | ret | Default return value in case function fails. |
Definition at line 305 of file sdbread.c.
Referenced by SdbpAddExeLayers(), SdbpMatchFileAttributes(), SdbQueryDataExTagID(), and SeiGetDWORD().
Reads QWORD value at specified tagid.
[in] | pdb | Handle to the shim database. |
[in] | tagid | TAGID of QWORD value. |
[in] | ret | Default return value in case function fails. |
Definition at line 321 of file sdbread.c.
Referenced by SdbpMatchFileAttributes(), and SeiGetQWORD().
BOOL WINAPI SdbRegisterDatabaseEx | ( | _In_ LPCWSTR | pszDatabasePath, |
_In_ DWORD | dwDatabaseType, | ||
_In_opt_ const PULONGLONG | pTimeStamp | ||
) |
Definition at line 262 of file apphelp.c.
Referenced by SdbInstall(), and SdbRegisterDatabase().
Closes shim database opened by SdbInitDatabase.
[in] | hsdb | Handle to the shim database. |
Definition at line 417 of file hsdb.c.
Referenced by ApphelpCheckRunAppEx(), SdbGetMatchingExe(), SdbInitDatabase(), SdbPackAppCompatData(), SE_InstallBeforeInit(), and SeiGetShimData().
Translates the given trWhich to a specific database / tagid
[in] | hsdb | Handle to the database. |
[in] | pdb | The Shim database that tiWhich belongs to. |
[in] | tiWhich | Path to executable for which we query database. |
[out,opt] | ptrWhich The tagid that tiWhich corresponds to. |
Definition at line 669 of file hsdb.c.
Referenced by SdbGetLayerTagRef(), SdbpAddExeLayers(), SdbpAddExeMatch(), SdbpAddNamedLayerMatch(), SdbQueryDataEx(), and SeiBuildShimRefArray().
Translates the given trWhich to a specific database / tagid
[in] | hsdb | Handle to the database. |
[in] | trWhich | Tagref to find |
[out,opt] | ppdb The Shim database that trWhich belongs to. | |
[out,opt] | ptiWhich The tagid that trWhich corresponds to. |
Definition at line 638 of file hsdb.c.
Referenced by SdbQueryDataEx(), SeiBuildGlobalInclExclList(), SeiBuildShimRefArray(), and SeiInit().
Converts specified tag into a string.
[in] | tag | The tag which will be converted to a string. |
Definition at line 752 of file sdbapi.c.
Referenced by InitApphelp(), SdbpMatchFileAttributes(), and START_TEST().
BOOL WINAPI SdbUnpackAppCompatData | ( | HSDB | hsdb, |
LPCWSTR | pszImageName, | ||
PVOID | pData, | ||
PSDBQUERYRESULT | pQueryResult | ||
) |
Definition at line 761 of file hsdb.c.
Referenced by SeiGetShimData().
Definition at line 407 of file apphelp.c.
Referenced by SdbUninstall().
BOOL WINAPI SetPermLayerState | ( | PCWSTR | wszPath, |
PCWSTR | wszLayer, | ||
DWORD | dwFlags, | ||
BOOL | bMachine, | ||
BOOL | bEnable | ||
) |
Adds or removes a single layer entry.
[in] | wszPath | Full pathname of the file. |
[in] | wszLayer | The layer to add or remove. |
[in] | dwFlags | Additional flags to add / remove [LAYER_APPLY_TO_SYSTEM_EXES | ???]. |
[in] | bMachine | When TRUE, the setting applies to all users, when FALSE only applies to the current user. |
[in] | bEnable | TRUE to enable, FALSE to disable a layer / flag specified. |
Definition at line 467 of file layer.c.
Referenced by CLayerUIPropPage::OnApply().