Sync to Wine-20040813:

Ivan Leo Puoti <puoti@inwind.it>
- Added Italian resources.
Marcelo Duarte <wine-devel@bol.com.br>
- Update localization for Portuguese language.
Alexandre Julliard
- Get rid of the non-standard ICOM_VTABLE macro.
- Get rid of the non-standard ICOM_VFIELD macro.
- Fixed flags handling in StrIsIntlEqualA/W (spotted by James Hawkins).
Jacek Caban <jack@itma.pwr.wroc.pl>
- Implemented IsOS function.
Francois Gouget <fgouget@free.fr>
- Modify widl to put the C COM macros inside an #ifdef COBJMACROS block
  as is done in the Windows headers.
- Add #define COBJMACROS where needed in Wine.
- Fixes the compilation of the oleaut32/tests/olefont.c and
  urlmon/tests/url.c conformance tests with the Windows headers.
Stefan Leichter <Stefan.Leichter@camLine.com>
- Forward shlwapi.459/460 (SHExpandEnvironmentStringsA/W) to
  kernel32.ExpandEnvironmentStringsA/W.

svn path=/trunk/; revision=10538
This commit is contained in:
Gé van Geldorp 2004-08-14 20:24:42 +00:00
parent 86eb12c5fc
commit 82663d1e65
11 changed files with 285 additions and 38 deletions

View file

@ -53,6 +53,44 @@ extern "C" {
#define URL_UNESCAPE_HIGH_ANSI_ONLY 0x00400000
#define URL_UNESCAPE_INPLACE 0x00100000
#define OS_WIN32SORGREATER 0x00
#define OS_NT 0x01
#define OS_WIN95ORGREATER 0x02
#define OS_NT4ORGREATER 0x03
#define OS_WIN2000ORGREATER_ALT 0x04
#define OS_WIN98ORGREATER 0x05
#define OS_WIN98_GOLD 0x06
#define OS_WIN2000ORGREATER 0x07
#define OS_WIN2000PRO 0x08
#define OS_WIN2000SERVER 0x09
#define OS_WIN2000ADVSERVER 0x0A
#define OS_WIN2000DATACENTER 0x0B
#define OS_WIN2000TERMINAL 0x0C
#define OS_EMBEDDED 0x0D
#define OS_TERMINALCLIENT 0x0E
#define OS_TERMINALREMOTEADMIN 0x0F
#define OS_WIN95_GOLD 0x10
#define OS_MEORGREATER 0x11
#define OS_XPORGREATER 0x12
#define OS_HOME 0x13
#define OS_PROFESSIONAL 0x14
#define OS_DATACENTER 0x15
#define OS_ADVSERVER 0x16
#define OS_SERVER 0x17
#define OS_TERMINALSERVER 0x18
#define OS_PERSONALTERMINALSERVER 0x19
#define OS_FASTUSERSWITCHING 0x1A
#define OS_WELCOMELOGONUI 0x1B
#define OS_DOMAINMEMBER 0x1C
#define OS_ANYSERVER 0x1D
#define OS_WOW6432 0x1E
#define OS_WEBSERVER 0x1F
#define OS_SMALLBUSINESSSERVER 0x20
#define OS_TABLETPC 0x21
#define OS_SERVERADMINUI 0x22
#define OS_MEDIACENTER 0x23
#define OS_APPLIANCE 0x24
#ifndef RC_INVOKED
#include <pshpack1.h>
typedef struct _DllVersionInfo
@ -140,6 +178,7 @@ WINSHLWAPI BOOL WINAPI ChrCmpIW(WCHAR,WCHAR);
#define IntlStrEqNIW(pStr1, pStr2, nChar) IntlStrEqWorkerW(FALSE, pStr1, pStr2, nChar);
WINSHLWAPI BOOL WINAPI IntlStrEqWorkerA(BOOL,LPCSTR,LPCSTR,int);
WINSHLWAPI BOOL WINAPI IntlStrEqWorkerW(BOOL,LPCWSTR,LPCWSTR,int);
WINSHLWAPI BOOL WINAPI IsOS(DWORD);
WINSHLWAPI HRESULT WINAPI SHStrDupA(LPCSTR,LPWSTR*);
WINSHLWAPI HRESULT WINAPI SHStrDupW(LPCWSTR,LPWSTR*);
WINSHLWAPI LPSTR WINAPI StrCatA(LPSTR,LPCSTR);

View file

@ -58,13 +58,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
typedef struct
{
ICOM_VFIELD(IQueryAssociations);
IQueryAssociationsVtbl *lpVtbl;
LONG ref;
HKEY hkeySource;
HKEY hkeyProgID;
} IQueryAssociationsImpl;
static struct ICOM_VTABLE(IQueryAssociations) IQueryAssociations_vtbl;
static struct IQueryAssociationsVtbl IQueryAssociations_vtbl;
/**************************************************************************
* IQueryAssociations_Constructor [internal]
@ -691,7 +691,7 @@ static HRESULT WINAPI IQueryAssociations_fnGetEnum(
return E_NOTIMPL;
}
static struct ICOM_VTABLE(IQueryAssociations) IQueryAssociations_vtbl =
static struct IQueryAssociationsVtbl IQueryAssociations_vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IQueryAssociations_fnQueryInterface,

View file

@ -36,7 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
/* Layout of ISHFileStream object */
typedef struct
{
ICOM_VFIELD(IStream);
IStreamVtbl *lpVtbl;
ULONG ref;
HANDLE hFile;
DWORD dwMode;
@ -320,7 +320,7 @@ static HRESULT WINAPI IStream_fnClone(IStream *iface, IStream** ppstm)
return E_NOTIMPL;
}
static struct ICOM_VTABLE(IStream) SHLWAPI_fsVTable =
static struct IStreamVtbl SHLWAPI_fsVTable =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IStream_fnQueryInterface,

View file

@ -28,8 +28,10 @@
#include <stdio.h>
#include <string.h>
#define COBJMACROS
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
@ -47,6 +49,7 @@
#include "winreg.h"
#include "wine/debug.h"
#include "shlwapi.h"
#include "winnt.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
@ -3657,12 +3660,118 @@ HRESULT WINAPI CLSIDFromStringWrap(LPCWSTR idstr, CLSID *id)
* TRUE If the feature is available.
* FALSE If the feature is not available.
*/
DWORD WINAPI IsOS(DWORD feature)
BOOL WINAPI IsOS(DWORD feature)
{
FIXME("(0x%08lx) stub\n", feature);
if (feature == 4)
return TRUE;
return FALSE;
OSVERSIONINFOA osvi;
DWORD platform, majorv, minorv;
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
if(!GetVersionExA(&osvi)) {
ERR("GetVersionEx failed");
return FALSE;
}
majorv = osvi.dwMajorVersion;
minorv = osvi.dwMinorVersion;
platform = osvi.dwPlatformId;
#define ISOS_RETURN(x) \
TRACE("(0x%lx) ret=%d\n",feature,(x)); \
return (x);
switch(feature) {
case OS_WIN32SORGREATER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32s
|| platform == VER_PLATFORM_WIN32_WINDOWS)
case OS_NT:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
case OS_WIN95ORGREATER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS)
case OS_NT4ORGREATER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 4)
case OS_WIN2000ORGREATER_ALT:
case OS_WIN2000ORGREATER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5)
case OS_WIN98ORGREATER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS && minorv >= 10)
case OS_WIN98_GOLD:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS && minorv == 10)
case OS_WIN2000PRO:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5)
case OS_WIN2000SERVER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
case OS_WIN2000ADVSERVER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
case OS_WIN2000DATACENTER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
case OS_WIN2000TERMINAL:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
case OS_EMBEDDED:
FIXME("(OS_EMBEDDED) What should we return here?\n");
return FALSE;
case OS_TERMINALCLIENT:
FIXME("(OS_TERMINALCLIENT) What should we return here?\n");
return FALSE;
case OS_TERMINALREMOTEADMIN:
FIXME("(OS_TERMINALREMOTEADMIN) What should we return here?\n");
return FALSE;
case OS_WIN95_GOLD:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS && minorv == 0)
case OS_MEORGREATER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS && minorv >= 90)
case OS_XPORGREATER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5 && minorv >= 1)
case OS_HOME:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5 && minorv >= 1)
case OS_PROFESSIONAL:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
case OS_DATACENTER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
case OS_ADVSERVER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5)
case OS_SERVER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
case OS_TERMINALSERVER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
case OS_PERSONALTERMINALSERVER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && minorv >= 1 && majorv >= 5)
case OS_FASTUSERSWITCHING:
FIXME("(OS_FASTUSERSWITCHING) What should we return here?\n");
return TRUE;
case OS_WELCOMELOGONUI:
FIXME("(OS_WELCOMELOGONUI) What should we return here?\n");
return FALSE;
case OS_DOMAINMEMBER:
FIXME("(OS_DOMAINMEMBER) What should we return here?\n");
return TRUE;
case OS_ANYSERVER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
case OS_WOW6432:
FIXME("(OS_WOW6432) Should we check this?\n");
return FALSE;
case OS_WEBSERVER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
case OS_SMALLBUSINESSSERVER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
case OS_TABLETPC:
FIXME("(OS_TABLEPC) What should we return here?\n");
return FALSE;
case OS_SERVERADMINUI:
FIXME("(OS_SERVERADMINUI) What should we return here?\n");
return FALSE;
case OS_MEDIACENTER:
FIXME("(OS_MEDIACENTER) What should we return here?\n");
return FALSE;
case OS_APPLIANCE:
FIXME("(OS_APPLIANCE) What should we return here?\n");
return FALSE;
}
#undef ISOS_RETURN
WARN("(0x%lx) unknown parameter\n",feature);
return FALSE;
}
/*************************************************************************

View file

@ -33,7 +33,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(shell);
typedef struct
{ ICOM_VFIELD(IStream);
{ IStreamVtbl *lpVtbl;
DWORD ref;
HKEY hKey;
LPBYTE pbBuffer;
@ -251,7 +251,7 @@ static HRESULT WINAPI IStream_fnClone (IStream * iface, IStream** ppstm)
return E_NOTIMPL;
}
static struct ICOM_VTABLE(IStream) rstvt =
static struct IStreamVtbl rstvt =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IStream_fnQueryInterface,
@ -302,7 +302,7 @@ static HRESULT WINAPI IStream_fnReadDummy(IStream *iface, LPVOID pv, ULONG cb, U
return E_NOTIMPL;
}
static struct ICOM_VTABLE(IStream) DummyRegStreamVTable =
static struct IStreamVtbl DummyRegStreamVTable =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IStream_fnQueryInterface,

View file

@ -26,4 +26,6 @@
#include "shlwapi_De.rc"
#include "shlwapi_En.rc"
#include "shlwapi_Es.rc"
#include "shlwapi_It.rc"
#include "shlwapi_Ja.rc"
#include "shlwapi_Pt.rc"

View file

@ -456,8 +456,8 @@
456 stub -noname PathIsValidCharW
457 stub -noname GetLongPathNameWrapW
458 stub -noname GetLongPathNameWrapA
459 stub -noname SHExpandEnvironmentStringsA
460 stub -noname SHExpandEnvironmentStringsW
459 stdcall -noname SHExpandEnvironmentStringsA(str ptr long) kernel32.ExpandEnvironmentStringsA
460 stdcall -noname SHExpandEnvironmentStringsW(wstr ptr long) kernel32.ExpandEnvironmentStringsW
461 stdcall -noname SHGetAppCompatFlags()
462 stub -noname UrlFixupW
463 stub -noname SHExpandEnvironmentStringsForUserA

View file

@ -0,0 +1,35 @@
/*
* Italian resources for shlwapi
*
* Copyright 2004 Ivan Leo Puoti
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_ITALIAN, SUBLANG_DEFAULT
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Errore!"
FONT 8, "MS Shell Dlg"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
CHECKBOX "Non mostrare nuovamente &questo messaggio", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&OK" IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Annulla" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Si" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&No" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}

View file

@ -0,0 +1,35 @@
/*
* Portuguese resources for shlwapi
*
* Copyright 2004 Marcelo Duarte
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_PORTUGUESE, SUBLANG_DEFAULT
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Erro!"
FONT 8, "MS Shell Dlg"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
CHECKBOX "Não &me mostre essa mensagem novamente", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&OK" IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Cancelar" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Sim" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Não" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}

View file

@ -2051,24 +2051,18 @@ INT WINAPI StrFromTimeIntervalW(LPWSTR lpszStr, UINT cchMax, DWORD dwMS,
BOOL WINAPI StrIsIntlEqualA(BOOL bCase, LPCSTR lpszStr, LPCSTR lpszComp,
int iLen)
{
DWORD dwFlags = LOCALE_USE_CP_ACP;
int iRet;
DWORD dwFlags;
TRACE("(%d,%s,%s,%d)\n", bCase,
debugstr_a(lpszStr), debugstr_a(lpszComp), iLen);
/* FIXME: These flags are undocumented and unknown by our CompareString.
* We need defines for them.
/* FIXME: This flag is undocumented and unknown by our CompareString.
* We need a define for it.
*/
dwFlags |= bCase ? 0x10000000 : 0x10000001;
dwFlags = 0x10000000;
if (!bCase) dwFlags |= NORM_IGNORECASE;
iRet = CompareStringA(GetThreadLocale(),
dwFlags, lpszStr, iLen, lpszComp, iLen);
if (!iRet)
iRet = CompareStringA(2048, dwFlags, lpszStr, iLen, lpszComp, iLen);
return iRet == 2 ? TRUE : FALSE;
return (CompareStringA(GetThreadLocale(), dwFlags, lpszStr, iLen, lpszComp, iLen) == CSTR_EQUAL);
}
/*************************************************************************
@ -2080,23 +2074,17 @@ BOOL WINAPI StrIsIntlEqualW(BOOL bCase, LPCWSTR lpszStr, LPCWSTR lpszComp,
int iLen)
{
DWORD dwFlags;
int iRet;
TRACE("(%d,%s,%s,%d)\n", bCase,
debugstr_w(lpszStr),debugstr_w(lpszComp), iLen);
/* FIXME: These flags are undocumented and unknown by our CompareString.
* We need defines for them.
/* FIXME: This flag is undocumented and unknown by our CompareString.
* We need a define for it.
*/
dwFlags = bCase ? 0x10000000 : 0x10000001;
dwFlags = 0x10000000;
if (!bCase) dwFlags |= NORM_IGNORECASE;
iRet = CompareStringW(GetThreadLocale(),
dwFlags, lpszStr, iLen, lpszComp, iLen);
if (!iRet)
iRet = CompareStringW(2048, dwFlags, lpszStr, iLen, lpszComp, iLen);
return iRet == 2 ? TRUE : FALSE;
return (CompareStringW(GetThreadLocale(), dwFlags, lpszStr, iLen, lpszComp, iLen) == CSTR_EQUAL);
}
/*************************************************************************

View file

@ -33,6 +33,44 @@ extern "C" {
#define URL_UNESCAPE_HIGH_ANSI_ONLY 0x00400000
#define URL_UNESCAPE_INPLACE 0x00100000
#define OS_WIN32SORGREATER 0x00
#define OS_NT 0x01
#define OS_WIN95ORGREATER 0x02
#define OS_NT4ORGREATER 0x03
#define OS_WIN2000ORGREATER_ALT 0x04
#define OS_WIN98ORGREATER 0x05
#define OS_WIN98_GOLD 0x06
#define OS_WIN2000ORGREATER 0x07
#define OS_WIN2000PRO 0x08
#define OS_WIN2000SERVER 0x09
#define OS_WIN2000ADVSERVER 0x0A
#define OS_WIN2000DATACENTER 0x0B
#define OS_WIN2000TERMINAL 0x0C
#define OS_EMBEDDED 0x0D
#define OS_TERMINALCLIENT 0x0E
#define OS_TERMINALREMOTEADMIN 0x0F
#define OS_WIN95_GOLD 0x10
#define OS_MEORGREATER 0x11
#define OS_XPORGREATER 0x12
#define OS_HOME 0x13
#define OS_PROFESSIONAL 0x14
#define OS_DATACENTER 0x15
#define OS_ADVSERVER 0x16
#define OS_SERVER 0x17
#define OS_TERMINALSERVER 0x18
#define OS_PERSONALTERMINALSERVER 0x19
#define OS_FASTUSERSWITCHING 0x1A
#define OS_WELCOMELOGONUI 0x1B
#define OS_DOMAINMEMBER 0x1C
#define OS_ANYSERVER 0x1D
#define OS_WOW6432 0x1E
#define OS_WEBSERVER 0x1F
#define OS_SMALLBUSINESSSERVER 0x20
#define OS_TABLETPC 0x21
#define OS_SERVERADMINUI 0x22
#define OS_MEDIACENTER 0x23
#define OS_APPLIANCE 0x24
#ifndef RC_INVOKED
#include <pshpack1.h>
typedef struct _DllVersionInfo
@ -120,6 +158,7 @@ WINSHLWAPI BOOL WINAPI ChrCmpIW(WCHAR,WCHAR);
#define IntlStrEqNIW(pStr1, pStr2, nChar) IntlStrEqWorkerW(FALSE, pStr1, pStr2, nChar);
WINSHLWAPI BOOL WINAPI IntlStrEqWorkerA(BOOL,LPCSTR,LPCSTR,int);
WINSHLWAPI BOOL WINAPI IntlStrEqWorkerW(BOOL,LPCWSTR,LPCWSTR,int);
WINSHLWAPI BOOL WINAPI IsOS(DWORD);
WINSHLWAPI HRESULT WINAPI SHStrDupA(LPCSTR,LPWSTR*);
WINSHLWAPI HRESULT WINAPI SHStrDupW(LPCWSTR,LPWSTR*);
WINSHLWAPI LPSTR WINAPI StrCatA(LPSTR,LPCSTR);