Commit 970cfc74 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

advpack: Constify some variables.

parent 51bb7d15
...@@ -59,7 +59,7 @@ typedef struct _ADVInfo ...@@ -59,7 +59,7 @@ typedef struct _ADVInfo
BOOL need_reboot; BOOL need_reboot;
} ADVInfo; } 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 */ /* Advanced INF commands */
static const WCHAR CheckAdminRights[] = { static const WCHAR CheckAdminRights[] = {
...@@ -76,7 +76,7 @@ static const WCHAR RunPostSetupCommands[] = { ...@@ -76,7 +76,7 @@ static const WCHAR RunPostSetupCommands[] = {
}; };
/* Advanced INF callbacks */ /* 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; INFCONTEXT context;
HRESULT hr = S_OK; HRESULT hr = S_OK;
...@@ -99,7 +99,7 @@ static HRESULT del_dirs_callback(HINF hinf, PCWSTR field, void *arg) ...@@ -99,7 +99,7 @@ static HRESULT del_dirs_callback(HINF hinf, PCWSTR field, void *arg)
return hr; 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; PERUSERSECTIONW per_user;
INFCONTEXT context; INFCONTEXT context;
...@@ -142,7 +142,7 @@ static HRESULT per_user_install_callback(HINF hinf, PCWSTR field, void *arg) ...@@ -142,7 +142,7 @@ static HRESULT per_user_install_callback(HINF hinf, PCWSTR field, void *arg)
return SetPerUserSecValuesW(&per_user); 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; HMODULE hm;
INFCONTEXT context; INFCONTEXT context;
...@@ -180,9 +180,9 @@ static HRESULT register_ocxs_callback(HINF hinf, PCWSTR field, void *arg) ...@@ -180,9 +180,9 @@ static HRESULT register_ocxs_callback(HINF hinf, PCWSTR field, void *arg)
return hr; 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; INFCONTEXT context;
HRESULT hr = S_OK; HRESULT hr = S_OK;
DWORD size; DWORD size;
...@@ -291,7 +291,7 @@ static HRESULT iterate_section_fields(HINF hinf, PCWSTR section, PCWSTR key, ...@@ -291,7 +291,7 @@ static HRESULT iterate_section_fields(HINF hinf, PCWSTR section, PCWSTR key,
return hr; return hr;
} }
static HRESULT check_admin_rights(ADVInfo *info) static HRESULT check_admin_rights(const ADVInfo *info)
{ {
INT check; INT check;
INFCONTEXT context; INFCONTEXT context;
...@@ -311,7 +311,7 @@ static HRESULT check_admin_rights(ADVInfo *info) ...@@ -311,7 +311,7 @@ static HRESULT check_admin_rights(ADVInfo *info)
} }
/* performs a setupapi-level install of the INF file */ /* performs a setupapi-level install of the INF file */
static HRESULT spapi_install(ADVInfo *info) static HRESULT spapi_install(const ADVInfo *info)
{ {
BOOL ret; BOOL ret;
HRESULT res; HRESULT res;
...@@ -511,7 +511,7 @@ static HRESULT install_init(LPCWSTR inf_filename, LPCWSTR install_sec, ...@@ -511,7 +511,7 @@ static HRESULT install_init(LPCWSTR inf_filename, LPCWSTR install_sec,
} }
/* release the install instance information */ /* 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) if (info->hinf && info->hinf != INVALID_HANDLE_VALUE)
SetupCloseInfFile(info->hinf); SetupCloseInfFile(info->hinf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment