advpack: Constify some variables
Andrew Talbot
Andrew.Talbot at talbotville.com
Mon Apr 2 16:49:59 CDT 2007
Changelog:
advpack: Constify some variables.
diff -urN a/dlls/advpack/install.c b/dlls/advpack/install.c
--- a/dlls/advpack/install.c 2007-04-02 17:54:51.000000000 +0100
+++ b/dlls/advpack/install.c 2007-04-02 20:48:20.000000000 +0100
@@ -59,7 +59,7 @@
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 @@
};
/* 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 @@
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 @@
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 @@
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 @@
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 @@
}
/* 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 @@
}
/* 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);
More information about the wine-patches
mailing list