Sync with Wine-20040121

svn path=/trunk/; revision=7828
This commit is contained in:
Gé van Geldorp 2004-01-22 20:35:25 +00:00
parent 8625e94a7a
commit 029c2688e6
4 changed files with 117 additions and 29 deletions

View file

@ -1714,6 +1714,63 @@ BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
return dwAttr == INVALID_FILE_ATTRIBUTES ? FALSE : TRUE;
}
/*************************************************************************
* PathFileExistsAndAttributesA [SHLWAPI.445]
*
* Determine if a file exists.
*
* PARAMS
* lpszPath [I] Path to check
* dwAttr [O] attributes of file
*
* RETURNS
* TRUE If the file exists and is readable
* FALSE Otherwise
*/
BOOL WINAPI PathFileExistsAndAttributesA(LPCSTR lpszPath, DWORD *dwAttr)
{
UINT iPrevErrMode;
DWORD dwVal = 0;
TRACE("(%s %p)\n", debugstr_a(lpszPath), dwAttr);
if (dwAttr)
*dwAttr = INVALID_FILE_ATTRIBUTES;
if (!lpszPath)
return FALSE;
iPrevErrMode = SetErrorMode(SEM_FAILCRITICALERRORS);
dwVal = GetFileAttributesA(lpszPath);
SetErrorMode(iPrevErrMode);
if (dwAttr)
*dwAttr = dwVal;
return (dwVal != INVALID_FILE_ATTRIBUTES);
}
/*************************************************************************
* PathFileExistsAndAttributesW [SHLWAPI.446]
*
* See PathFileExistsA.
*/
BOOL WINAPI PathFileExistsAndAttributesW(LPCWSTR lpszPath, DWORD *dwAttr)
{
UINT iPrevErrMode;
DWORD dwVal;
TRACE("(%s %p)\n", debugstr_w(lpszPath), dwAttr);
if (!lpszPath)
return FALSE;
iPrevErrMode = SetErrorMode(SEM_FAILCRITICALERRORS);
dwVal = GetFileAttributesW(lpszPath);
SetErrorMode(iPrevErrMode);
if (dwAttr)
*dwAttr = dwVal;
return (dwVal != INVALID_FILE_ATTRIBUTES);
}
/*************************************************************************
* PathMatchSingleMaskA [internal]
*/
@ -2975,7 +3032,7 @@ BOOL WINAPI PathMakeSystemFolderW(LPWSTR lpszPath)
if (!lpszPath || !*lpszPath)
return FALSE;
/* If the directory is already a system directory, dont do anything */
/* If the directory is already a system directory, don't do anything */
GetSystemDirectoryW(buff, MAX_PATH);
if (!strcmpW(buff, lpszPath))
return TRUE;

View file

@ -2190,3 +2190,34 @@ HRESULT WINAPI SHRegGetCLSIDKeyW(REFGUID guid, LPCWSTR lpszValue, BOOL bUseHKCU,
return dwRet ? HRESULT_FROM_WIN32(dwRet) : S_OK;
}
/*************************************************************************
* SHRegisterValidateTemplate [SHLWAPI.@]
*
* observed from the ie 5.5 installer:
* - allocates a buffer with the size of the given file
* - read the file content into the buffer
* - creates the key szTemplateKey
* - sets "205523652929647911071668590831910975402"=dword:00002e37 at
* the key
*
* PARAMS
* filename [I] An existing file its content is read into an allocated
* buffer
* unknown [I]
*
* RETURNS
* Success: ERROR_SUCCESS.
*/
HRESULT WINAPI SHRegisterValidateTemplate(LPCWSTR filename, BOOL unknown)
{
/* static const WCHAR szTemplateKey[] = { 'S','o','f','t','w','a','r','e','\\',
* 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
* 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
* 'E','x','p','l','o','r','e','r','\\',
* 'T','e','m','p','l','a','t','e','R','e','g','i','s','t','r','y',0 };
*/
FIXME("stub: %s, %08x\n", debugstr_w(filename), unknown);
return S_OK;
}

View file

@ -442,8 +442,8 @@
442 stdcall @(wstr ptr long) kernel32.GetEnvironmentVariableW
443 stdcall @(ptr long) kernel32.GetSystemWindowsDirectoryA
444 stdcall @(ptr long) kernel32.GetSystemWindowsDirectoryW
445 stub -noname PathFileExistsAndAttributesA
446 stub -noname PathFileExistsAndAttributesW
445 stdcall -noname PathFileExistsAndAttributesA(str ptr)
446 stdcall -noname PathFileExistsAndAttributesW(wstr ptr)
447 stub -noname FixSlashesAndColonA
448 stub -noname FixSlashesAndColonW
449 stub -noname NextPathA
@ -826,7 +826,7 @@
@ stdcall SHRegDuplicateHKey (long)
@ stdcall SHRegSetPathA(long str str str long)
@ stdcall SHRegSetPathW(long wstr wstr wstr long)
@ stub SHRegisterValidateTemplate
@ stdcall SHRegisterValidateTemplate(wstr long)
@ stdcall SHSetThreadRef (ptr)
@ stdcall SHReleaseThreadRef()
@ stdcall SHSkipJunction(ptr ptr)

View file

@ -4,7 +4,7 @@ RCS file: /home/wine/wine/dlls/shlwapi/istream.c,v
retrieving revision 1.9
diff -u -r1.9 istream.c
--- istream.c 24 Sep 2003 05:14:39 -0000 1.9
+++ istream.c 2 Jan 2004 19:10:16 -0000
+++ istream.c 22 Jan 2004 20:39:18 -0000
@@ -163,12 +163,12 @@
TRACE("(%p,%ld,%ld,%p)\n", This, dlibMove.s.LowPart, dwOrigin, pNewPos);
@ -38,7 +38,7 @@ RCS file: /home/wine/wine/dlls/shlwapi/ordinal.c,v
retrieving revision 1.75
diff -u -r1.75 ordinal.c
--- ordinal.c 1 Oct 2003 03:10:42 -0000 1.75
+++ ordinal.c 2 Jan 2004 19:10:18 -0000
+++ ordinal.c 22 Jan 2004 20:39:20 -0000
@@ -3414,7 +3414,7 @@
* Success: A handle to the loaded module
* Failure: A NULL handle.
@ -60,10 +60,10 @@ diff -u -r1.75 ordinal.c
Index: path.c
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/path.c,v
retrieving revision 1.38
diff -u -r1.38 path.c
--- path.c 22 Sep 2003 19:46:32 -0000 1.38
+++ path.c 2 Jan 2004 19:10:20 -0000
retrieving revision 1.40
diff -u -r1.40 path.c
--- path.c 19 Jan 2004 21:46:14 -0000 1.40
+++ path.c 22 Jan 2004 20:39:22 -0000
@@ -32,6 +32,7 @@
#include "wingdi.h"
#include "winuser.h"
@ -72,7 +72,7 @@ diff -u -r1.38 path.c
#define NO_SHLWAPI_STREAM
#include "shlwapi.h"
#include "wine/debug.h"
@@ -2944,7 +2945,7 @@
@@ -3001,7 +3002,7 @@
* TRUE If the path was changed to/already was a system folder
* FALSE If the path is invalid or SetFileAttributesA() fails
*/
@ -81,7 +81,7 @@ diff -u -r1.38 path.c
{
BOOL bRet = FALSE;
@@ -2964,7 +2965,7 @@
@@ -3021,7 +3022,7 @@
*
* See PathMakeSystemFolderA.
*/
@ -90,7 +90,7 @@ diff -u -r1.38 path.c
{
DWORD dwDefaultAttr = FILE_ATTRIBUTE_READONLY, dwAttr;
WCHAR buff[MAX_PATH];
@@ -3211,7 +3212,7 @@
@@ -3268,7 +3269,7 @@
if (lpszUrl[1] != ':' && lpszUrl[1] != '|' && isalphaW(*lpszUrl))
return E_INVALIDARG;
@ -99,7 +99,7 @@ diff -u -r1.38 path.c
if (lpszPath[1] == '|')
lpszPath[1] = ':';
@@ -3359,7 +3360,7 @@
@@ -3416,7 +3417,7 @@
* Failure: FALSE, if lpszPath is NULL, empty, not a directory, or calling
* SetFileAttributesA() fails.
*/
@ -108,7 +108,7 @@ diff -u -r1.38 path.c
{
DWORD dwAttr;
@@ -3378,7 +3379,7 @@
@@ -3435,7 +3436,7 @@
*
* See PathUnmakeSystemFolderA.
*/
@ -117,7 +117,7 @@ diff -u -r1.38 path.c
{
DWORD dwAttr;
@@ -3688,7 +3689,7 @@
@@ -3745,7 +3746,7 @@
* The match is made against the end of the suffix string, so for example:
* lpszSuffix="fooBAR" matches "BAR", but lpszSuffix="fooBARfoo" does not.
*/
@ -126,7 +126,7 @@ diff -u -r1.38 path.c
{
size_t dwLen;
int dwRet = 0;
@@ -3705,13 +3706,13 @@
@@ -3762,13 +3763,13 @@
if (dwCompareLen < dwLen)
{
if (!strcmp(lpszSuffix + dwLen - dwCompareLen, *lppszArray))
@ -142,7 +142,7 @@ diff -u -r1.38 path.c
}
/*************************************************************************
@@ -3719,7 +3720,7 @@
@@ -3776,7 +3777,7 @@
*
* See PathFindSuffixArrayA.
*/
@ -151,7 +151,7 @@ diff -u -r1.38 path.c
{
size_t dwLen;
int dwRet = 0;
@@ -3736,13 +3737,13 @@
@@ -3793,13 +3794,13 @@
if (dwCompareLen < dwLen)
{
if (!strcmpW(lpszSuffix + dwLen - dwCompareLen, *lppszArray))
@ -170,10 +170,10 @@ diff -u -r1.38 path.c
Index: reg.c
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/reg.c,v
retrieving revision 1.44
diff -u -r1.44 reg.c
--- reg.c 20 Nov 2003 04:20:50 -0000 1.44
+++ reg.c 2 Jan 2004 19:10:21 -0000
retrieving revision 1.45
diff -u -r1.45 reg.c
--- reg.c 18 Jan 2004 22:07:57 -0000 1.45
+++ reg.c 22 Jan 2004 20:39:23 -0000
@@ -232,7 +232,7 @@
* Success: ERROR_SUCCESS
* Failure: An error code from RegCloseKey().
@ -292,10 +292,10 @@ diff -u -r1.44 reg.c
Index: shlwapi.spec
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/shlwapi.spec,v
retrieving revision 1.81
diff -u -r1.81 shlwapi.spec
--- shlwapi.spec 1 Oct 2003 03:10:42 -0000 1.81
+++ shlwapi.spec 2 Jan 2004 19:10:22 -0000
retrieving revision 1.83
diff -u -r1.83 shlwapi.spec
--- shlwapi.spec 19 Jan 2004 21:46:14 -0000 1.83
+++ shlwapi.spec 22 Jan 2004 20:39:24 -0000
@@ -374,8 +374,8 @@
374 stub -noname SHCheckDiskForMediaA
375 stub -noname SHCheckDiskForMediaW
@ -313,7 +313,7 @@ RCS file: /home/wine/wine/dlls/shlwapi/string.c,v
retrieving revision 1.39
diff -u -r1.39 string.c
--- string.c 22 Nov 2003 00:00:53 -0000 1.39
+++ string.c 2 Jan 2004 19:10:23 -0000
+++ string.c 22 Jan 2004 20:39:25 -0000
@@ -556,7 +556,7 @@
{
TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
@ -356,7 +356,7 @@ RCS file: /home/wine/wine/dlls/shlwapi/url.c,v
retrieving revision 1.26
diff -u -r1.26 url.c
--- url.c 1 Oct 2003 03:10:42 -0000 1.26
+++ url.c 2 Jan 2004 19:10:24 -0000
+++ url.c 22 Jan 2004 20:39:26 -0000
@@ -34,9 +34,9 @@
#include "shlwapi.h"
#include "wine/debug.h"