diff --git a/dlls/mshtml/install.c b/dlls/mshtml/install.c index 9bff0e6e290..df8c8be3cb5 100644 --- a/dlls/mshtml/install.c +++ b/dlls/mshtml/install.c @@ -193,18 +193,21 @@ static BOOL install_from_unix_file(const char *file_name) close(fd); - if(!wine_get_dos_file_name) { + if(!wine_get_dos_file_name) wine_get_dos_file_name = (void*)GetProcAddress(GetModuleHandleW(kernel32W), "wine_get_dos_file_name"); - if(!wine_get_dos_file_name) { - ERR("Could not get wine_get_dos_file_name function.\n"); - return FALSE; - } - } - dos_file_name = wine_get_dos_file_name(file_name); - if(!dos_file_name) { - ERR("Could not get dos file name of %s\n", debugstr_a(file_name)); - return FALSE; + if(wine_get_dos_file_name) { /* Wine UNIX mode */ + dos_file_name = wine_get_dos_file_name(file_name); + if(!dos_file_name) { + ERR("Could not get dos file name of %s\n", debugstr_a(file_name)); + return FALSE; + } + } else { /* Windows mode */ + UINT res; + WARN("Could not get wine_get_dos_file_name function, calling install_cab directly.\n"); + res = MultiByteToWideChar( CP_ACP, 0, file_name, -1, 0, 0); + dos_file_name = heap_alloc (res*sizeof(WCHAR)); + MultiByteToWideChar( CP_ACP, 0, file_name, -1, dos_file_name, res); } ret = install_cab(dos_file_name);