mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 12:23:25 +00:00
Autosyncing with Wine HEAD
svn path=/trunk/; revision=26493
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
#include "winreg.h"
|
||||
#include "winver.h"
|
||||
#include "winternl.h"
|
||||
#include "winnls.h"
|
||||
#include "setupapi.h"
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<define name="_WIN32_WINNT">0x501</define>
|
||||
<define name="WINVER">0x501</define>
|
||||
<library>wine</library>
|
||||
<library>ole32</library>
|
||||
<library>setupapi</library>
|
||||
<library>version</library>
|
||||
<library>user32</library>
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
#include "winreg.h"
|
||||
#include "winver.h"
|
||||
#include "winternl.h"
|
||||
#include "winnls.h"
|
||||
#include "setupapi.h"
|
||||
#include "advpub.h"
|
||||
#include "ole2.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "advpack_private.h"
|
||||
@@ -58,7 +58,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[] = {
|
||||
@@ -75,7 +75,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;
|
||||
@@ -98,7 +98,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;
|
||||
@@ -141,7 +141,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;
|
||||
@@ -159,21 +159,29 @@ static HRESULT register_ocxs_callback(HINF hinf, PCWSTR field, void *arg)
|
||||
continue;
|
||||
|
||||
hm = LoadLibraryExW(buffer, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
|
||||
if (!hm)
|
||||
continue;
|
||||
if (hm)
|
||||
{
|
||||
if (do_ocx_reg(hm, TRUE))
|
||||
hr = E_FAIL;
|
||||
|
||||
if (do_ocx_reg(hm, TRUE))
|
||||
FreeLibrary(hm);
|
||||
}
|
||||
else
|
||||
hr = E_FAIL;
|
||||
|
||||
FreeLibrary(hm);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
/* FIXME: display a message box */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
@@ -282,7 +290,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;
|
||||
@@ -302,7 +310,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;
|
||||
@@ -350,8 +358,10 @@ static HRESULT adv_install(ADVInfo *info)
|
||||
if (hr != S_OK)
|
||||
return hr;
|
||||
|
||||
OleInitialize(NULL);
|
||||
hr = iterate_section_fields(info->hinf, info->install_sec,
|
||||
RegisterOCXs, register_ocxs_callback, NULL);
|
||||
OleUninitialize();
|
||||
if (hr != S_OK)
|
||||
return hr;
|
||||
|
||||
@@ -500,7 +510,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);
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "winerror.h"
|
||||
#include "winuser.h"
|
||||
#include "winternl.h"
|
||||
#include "setupapi.h"
|
||||
#include "advpub.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
@@ -221,7 +220,7 @@ static HRESULT write_predefined_strings(HMODULE hm, LPCWSTR ini_path)
|
||||
*/
|
||||
HRESULT WINAPI RegInstallW(HMODULE hm, LPCWSTR pszSection, const STRTABLEW* pstTable)
|
||||
{
|
||||
int i;
|
||||
unsigned int i;
|
||||
CABINFOW cabinfo;
|
||||
WCHAR tmp_ini_path[MAX_PATH];
|
||||
HRESULT hr = E_FAIL;
|
||||
|
||||
Reference in New Issue
Block a user