advpack: Constify some variables.
This commit is contained in:
parent
51bb7d1522
commit
970cfc7485
|
@ -59,7 +59,7 @@ typedef struct _ADVInfo
|
|||
BOOL need_reboot;
|
||||
} ADVInfo;
|
||||
|
||||
typedef HRESULT (*iterate_fields_func)(HINF hinf, PCWSTR field, void *arg);
|
||||
typedef HRESULT (*iterate_fields_func)(HINF hinf, PCWSTR field, const void *arg);
|
||||
|
||||
/* Advanced INF commands */
|
||||
static const WCHAR CheckAdminRights[] = {
|
||||
|
@ -76,7 +76,7 @@ static const WCHAR RunPostSetupCommands[] = {
|
|||
};
|
||||
|
||||
/* Advanced INF callbacks */
|
||||
static HRESULT del_dirs_callback(HINF hinf, PCWSTR field, void *arg)
|
||||
static HRESULT del_dirs_callback(HINF hinf, PCWSTR field, const void *arg)
|
||||
{
|
||||
INFCONTEXT context;
|
||||
HRESULT hr = S_OK;
|
||||
|
@ -99,7 +99,7 @@ static HRESULT del_dirs_callback(HINF hinf, PCWSTR field, void *arg)
|
|||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT per_user_install_callback(HINF hinf, PCWSTR field, void *arg)
|
||||
static HRESULT per_user_install_callback(HINF hinf, PCWSTR field, const void *arg)
|
||||
{
|
||||
PERUSERSECTIONW per_user;
|
||||
INFCONTEXT context;
|
||||
|
@ -142,7 +142,7 @@ static HRESULT per_user_install_callback(HINF hinf, PCWSTR field, void *arg)
|
|||
return SetPerUserSecValuesW(&per_user);
|
||||
}
|
||||
|
||||
static HRESULT register_ocxs_callback(HINF hinf, PCWSTR field, void *arg)
|
||||
static HRESULT register_ocxs_callback(HINF hinf, PCWSTR field, const void *arg)
|
||||
{
|
||||
HMODULE hm;
|
||||
INFCONTEXT context;
|
||||
|
@ -180,9 +180,9 @@ static HRESULT register_ocxs_callback(HINF hinf, PCWSTR field, void *arg)
|
|||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT run_setup_commands_callback(HINF hinf, PCWSTR field, void *arg)
|
||||
static HRESULT run_setup_commands_callback(HINF hinf, PCWSTR field, const void *arg)
|
||||
{
|
||||
ADVInfo *info = (ADVInfo *)arg;
|
||||
const ADVInfo *info = (const ADVInfo *)arg;
|
||||
INFCONTEXT context;
|
||||
HRESULT hr = S_OK;
|
||||
DWORD size;
|
||||
|
@ -291,7 +291,7 @@ static HRESULT iterate_section_fields(HINF hinf, PCWSTR section, PCWSTR key,
|
|||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT check_admin_rights(ADVInfo *info)
|
||||
static HRESULT check_admin_rights(const ADVInfo *info)
|
||||
{
|
||||
INT check;
|
||||
INFCONTEXT context;
|
||||
|
@ -311,7 +311,7 @@ static HRESULT check_admin_rights(ADVInfo *info)
|
|||
}
|
||||
|
||||
/* performs a setupapi-level install of the INF file */
|
||||
static HRESULT spapi_install(ADVInfo *info)
|
||||
static HRESULT spapi_install(const ADVInfo *info)
|
||||
{
|
||||
BOOL ret;
|
||||
HRESULT res;
|
||||
|
@ -511,7 +511,7 @@ static HRESULT install_init(LPCWSTR inf_filename, LPCWSTR install_sec,
|
|||
}
|
||||
|
||||
/* release the install instance information */
|
||||
static void install_release(ADVInfo *info)
|
||||
static void install_release(const ADVInfo *info)
|
||||
{
|
||||
if (info->hinf && info->hinf != INVALID_HANDLE_VALUE)
|
||||
SetupCloseInfFile(info->hinf);
|
||||
|
|
Loading…
Reference in New Issue