#include "cmp.h"
#include "stdlib.h"
#include "parseini.h"
#include "geninst.h"
Go to the source code of this file.
Defines | |
#define | FLG_ADDREG_BINVALUETYPE ( 0x00000001 ) |
#define | FLG_ADDREG_NOCLOBBER ( 0x00000002 ) |
#define | FLG_ADDREG_DELVAL ( 0x00000004 ) |
#define | FLG_ADDREG_APPEND ( 0x00000008 ) |
#define | FLG_ADDREG_KEYONLY ( 0x00000010 ) |
#define | FLG_ADDREG_OVERWRITEONLY ( 0x00000020 ) |
#define | FLG_ADDREG_TYPE_MASK ( 0xFFFF0000 | FLG_ADDREG_BINVALUETYPE ) |
#define | FLG_ADDREG_TYPE_SZ ( 0x00000000 ) |
#define | FLG_ADDREG_TYPE_MULTI_SZ ( 0x00010000 ) |
#define | FLG_ADDREG_TYPE_EXPAND_SZ ( 0x00020000 ) |
#define | FLG_ADDREG_TYPE_BINARY ( 0x00000000 | FLG_ADDREG_BINVALUETYPE ) |
#define | FLG_ADDREG_TYPE_DWORD ( 0x00010000 | FLG_ADDREG_BINVALUETYPE ) |
#define | FLG_ADDREG_TYPE_NONE ( 0x00020000 | FLG_ADDREG_BINVALUETYPE ) |
#define | FLG_BITREG_CLEAR ( 0x00000000 ) |
#define | FLG_BITREG_SET ( 0x00000001 ) |
#define | FLG_BITREG_TYPE_BINARY ( 0x00000000 ) |
#define | FLG_BITREG_TYPE_DWORD ( 0x00000002 ) |
#define | NUM_OF_INF_RULES 3 |
Typedefs | |
typedef BOOLEAN(* | PFN_INFRULE )(IN PVOID InfHandle, IN PCHAR Section, IN PVOID RefData) |
typedef BOOLEAN(* | PFN_REGLINE )(IN PVOID InfHandle, IN PCHAR Section, IN ULONG LineIndex) |
Functions | |
BOOLEAN | CmpProcessReg (IN PVOID InfHandle, IN PCHAR Section, IN PVOID RefData) |
NTSTATUS | CmpProcessAddRegLine (IN PVOID InfHandle, IN PCHAR Section, IN ULONG LineIndex) |
NTSTATUS | CmpProcessDelRegLine (IN PVOID InfHandle, IN PCHAR Section, IN ULONG LineIndex) |
NTSTATUS | CmpProcessBitRegLine (IN PVOID InfHandle, IN PCHAR Section, IN ULONG LineIndex) |
NTSTATUS | CmpGetAddRegInfData (IN PVOID InfHandle, IN PCHAR Section, IN ULONG LineIndex, IN ULONG ValueIndex, IN ULONG ValueType, OUT PVOID *Data, OUT PULONG DataSize) |
NTSTATUS | CmpOpenRegKey (IN OUT PHANDLE Key, IN OUT PULONG Disposition, IN PCHAR Root, IN PCHAR SubKey, IN ULONG DesiredAccess, IN BOOLEAN Create) |
NTSTATUS | CmpAppendStringToMultiSz (IN HANDLE Key, IN PCHAR ValueName, IN OUT PVOID *Data, IN OUT PULONG DataSize) |
BOOLEAN | CmpGenInstall (IN PVOID InfHandle, IN PCHAR Section) |
Variables | |
struct { | |
PCHAR Name | |
PFN_INFRULE Action | |
PVOID RefData | |
} | gInfRuleTable [NUM_OF_INF_RULES] |
|
Definition at line 125 of file geninst.c. Referenced by CmpProcessAddRegLine(). |
|
Definition at line 122 of file geninst.c. Referenced by CmpProcessAddRegLine(). |
|
Definition at line 124 of file geninst.c. Referenced by CmpProcessAddRegLine(). |
|
Definition at line 127 of file geninst.c. Referenced by CmpProcessAddRegLine(). |
|
Definition at line 123 of file geninst.c. Referenced by CmpProcessAddRegLine(). |
|
Definition at line 128 of file geninst.c. Referenced by CmpProcessAddRegLine(). |
|
Definition at line 134 of file geninst.c. Referenced by CmpProcessAddRegLine(). |
|
Definition at line 135 of file geninst.c. Referenced by CmpProcessAddRegLine(). |
|
Definition at line 133 of file geninst.c. Referenced by CmpProcessAddRegLine(). |
|
Definition at line 130 of file geninst.c. Referenced by CmpProcessAddRegLine(). |
|
Definition at line 132 of file geninst.c. Referenced by CmpProcessAddRegLine(). |
|
Definition at line 136 of file geninst.c. Referenced by CmpProcessAddRegLine(). |
|
Definition at line 131 of file geninst.c. Referenced by CmpProcessAddRegLine(). |
|
|
|
Definition at line 139 of file geninst.c. Referenced by CmpProcessBitRegLine(). |
|
|
|
Definition at line 141 of file geninst.c. Referenced by CmpProcessBitRegLine(). |
|
Definition at line 147 of file geninst.c. Referenced by CmpGenInstall(). |
|
|
|
Definition at line 45 of file geninst.c. Referenced by CmpProcessReg(). |
|
Definition at line 1392 of file geninst.c. References ASSERT, DbgPrint, ExAllocatePoolWithTag, ExFreePool(), Key, NT_SUCCESS, NtQueryValueKey(), NTSTATUS(), NULL, PagedPool, RtlAnsiStringToUnicodeString(), RtlFreeUnicodeString(), RtlInitAnsiString(), TRUE, and ValueName. Referenced by CmpProcessAddRegLine().
|
|
Definition at line 176 of file geninst.c. References CmpGetKeyName(), CmpGetSectionLineIndex(), CmpSearchInfSection(), FALSE, gInfRuleTable, Name, NULL, NUM_OF_INF_RULES, and TRUE. Referenced by CmpMatchInfList(), and CmpMatchInstallRule().
|
|
Definition at line 987 of file geninst.c. References ASSERT, CmpGetBinaryField(), CmpGetIntField(), CmpGetSectionLineIndex(), CmpGetSectionLineIndexValueCount(), ExAllocatePoolWithTag, FALSE, NT_SUCCESS, NTSTATUS(), NULL, PagedPool, RtlAnsiStringToUnicodeString(), RtlInitAnsiString(), strlen(), and USHORT. Referenced by CmpProcessAddRegLine().
|
|
Definition at line 1264 of file geninst.c. References ASSERT, Create(), ExAllocatePoolWithTag, ExFreePool(), Key, NT_SUCCESS, NtCreateKey(), NtOpenKey(), NTSTATUS(), NULL, PagedPool, RtlAnsiStringToUnicodeString(), RtlFreeUnicodeString(), RtlInitAnsiString(), strlen(), and TRUE. Referenced by CmpProcessAddRegLine(), CmpProcessBitRegLine(), and CmpProcessDelRegLine().
|
|
Definition at line 311 of file geninst.c. References CmpAppendStringToMultiSz(), CmpGetAddRegInfData(), CmpGetIntField(), CmpGetSectionLineIndex(), CmpOpenRegKey(), FALSE, FLG_ADDREG_APPEND, FLG_ADDREG_BINVALUETYPE, FLG_ADDREG_DELVAL, FLG_ADDREG_KEYONLY, FLG_ADDREG_NOCLOBBER, FLG_ADDREG_OVERWRITEONLY, FLG_ADDREG_TYPE_BINARY, FLG_ADDREG_TYPE_DWORD, FLG_ADDREG_TYPE_EXPAND_SZ, FLG_ADDREG_TYPE_MASK, FLG_ADDREG_TYPE_MULTI_SZ, FLG_ADDREG_TYPE_NONE, FLG_ADDREG_TYPE_SZ, NT_SUCCESS, NtClose(), NtDeleteValueKey(), NtQueryValueKey(), NtSetValueKey(), NTSTATUS(), NULL, RtlAnsiStringToUnicodeString(), RtlFreeUnicodeString(), RtlInitAnsiString(), and TRUE.
|
|
Definition at line 776 of file geninst.c. References ASSERT, CmpGetIntField(), CmpGetSectionLineIndex(), CmpOpenRegKey(), DbgPrint, ExAllocatePoolWithTag, ExFreePool(), FALSE, FLG_BITREG_SET, FLG_BITREG_TYPE_DWORD, NT_SUCCESS, NtClose(), NtQueryValueKey(), NtSetValueKey(), NTSTATUS(), NULL, PagedPool, RtlAnsiStringToUnicodeString(), RtlFreeUnicodeString(), RtlInitAnsiString(), and TRUE.
|
|
Definition at line 658 of file geninst.c. References CmpGetSectionLineIndex(), CmpOpenRegKey(), FALSE, NT_SUCCESS, NtClose(), NtDeleteKey(), NtDeleteValueKey(), NTSTATUS(), RtlAnsiStringToUnicodeString(), RtlFreeUnicodeString(), RtlInitAnsiString(), and TRUE.
|
|
Definition at line 258 of file geninst.c. References CmpSearchInfLine(), FALSE, NT_SUCCESS, NTSTATUS(), PFN_REGLINE, RefData, and TRUE.
|
|
|
|
Referenced by CmpGenInstall(). |
|
|
Definition at line 156 of file geninst.c. Referenced by CmpProcessReg(). |