Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ed325359
Commit
ed325359
authored
Jan 19, 2004
by
Rolf Kalbermatter
Committed by
Alexandre Julliard
Jan 19, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented PathFileExistsAndAttributesA/W function.
parent
2cee7ac6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
2 deletions
+63
-2
path.c
dlls/shlwapi/path.c
+57
-0
shlwapi.spec
dlls/shlwapi/shlwapi.spec
+2
-2
shlwapi.h
include/shlwapi.h
+4
-0
No files found.
dlls/shlwapi/path.c
View file @
ed325359
...
...
@@ -1714,6 +1714,63 @@ BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
}
/*************************************************************************
* 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]
*/
static
BOOL
WINAPI
PathMatchSingleMaskA
(
LPCSTR
name
,
LPCSTR
mask
)
...
...
dlls/shlwapi/shlwapi.spec
View file @
ed325359
...
...
@@ -442,8 +442,8 @@
442 stdcall @(wstr ptr long) kernel32.GetEnvironmentVariableW
443 stdcall @(ptr long) kernel32.GetSystemWindowsDirectoryA
444 stdcall @(ptr long) kernel32.GetSystemWindowsDirectoryW
445 st
ub -noname PathFileExistsAndAttributesA
446 st
ub -noname PathFileExistsAndAttributesW
445 st
dcall -noname PathFileExistsAndAttributesA(str ptr)
446 st
dcall -noname PathFileExistsAndAttributesW(wstr ptr)
447 stub -noname FixSlashesAndColonA
448 stub -noname FixSlashesAndColonW
449 stub -noname NextPathA
...
...
include/shlwapi.h
View file @
ed325359
...
...
@@ -332,6 +332,10 @@ BOOL WINAPI PathFileExistsA(LPCSTR);
BOOL
WINAPI
PathFileExistsW
(
LPCWSTR
);
#define PathFileExists WINELIB_NAME_AW(PathFileExists)
BOOL
WINAPI
PathFileExistsAndAttributesA
(
LPCSTR
lpszPath
,
DWORD
*
dwAttr
);
BOOL
WINAPI
PathFileExistsAndAttributesW
(
LPCWSTR
lpszPath
,
DWORD
*
dwAttr
);
#define PathFileExistsAndAttributes WINELIB_NAME_AW(PathFileExistsAndAttributes)
LPSTR
WINAPI
PathFindExtensionA
(
LPCSTR
);
LPWSTR
WINAPI
PathFindExtensionW
(
LPCWSTR
);
#define PathFindExtension WINELIB_NAME_AW(PathFindExtension)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment