- BOOL WINAPI PathResolve(LPWSTR path, LPCWSTR *dirs, DWORD flags)
- {
- UINT uExtensions = (flags & PRF_DONTFINDLNK) ? 0xF : 0x3F;
- if (edi & PRF_VERIFYEXISTS)
- SetLastError(ERROR_FILE_NOT_FOUND);
- PathUnquoteSpacesW(path);
- if (PathIsRootW(path))
- {
- if ((path[0] == L'\\' && path[1] == 0) ||
- (PathIsUNCServerW(path) || PathIsUNCServerShare(path)))
- {
- if ((flags & PRF_FIRSTDIRDEF) == 0)
- Func7C95C607(path, dirs[0], 0);
- else
- Func7C95C607(path, NULL, 0);
- }
- if (flags & PRF_VERIFYEXISTS)
- return PathFileExistsAndAttributesW(path, NULL);
- return TRUE;
- }
- else if (PathIsFileSpecW(path))
- {
- if ((flags & PRF_TRYPROGRAMEXTENSIONS) && Func7C903F7F(path, dirs, TRUE, uExtensions))
- return TRUE;
- if (PathFindOnPathW(path, dirs))
- {
- if (!(flags & PRF_REQUIREABSOLUTE))
- return TRUE;
- if (!Func7C8FF2D3(path))
- {
- if (!Func7C9A5238(path))
- return FALSE;
- return PathFileExistsAndAttributesW(path, NULL);
- }
- }
- }
- else if (!PathIsURLW(path))
- {
- if (flags & PRF_FIRSTDIRDEF)
- Func7C95C607(path, *dirs, 1);
- else
- Func7C95C607(path, NULL, 1);
- if (flags & PRF_TRYPROGRAMEXTENSIONS)
- {
- if (Func7C903F7F(path, dirs, FALSE, uExtensions))
- return PathFileExistsAndAttributesW(path, NULL);
- }
- else
- {
- if (!PathFileExistsAndAttributesW(path, NULL))
- return FALSE;
- }
- if (flags & PRF_REQUIREABSOLUTE)
- {
- if (!Func7C8FF2D3(path))
- {
- if (!Func7C9A5238(path))
- return FALSE;
- return PathFileExistsAndAttributesW(path, NULL);
- }
- }
- return TRUE;
- }
- return FALSE;
- }
[text] PathResolve
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Editor
You can edit this paste and save as new:
File Description
- PathResolve
- Paste Code
- 23 Jun-2021
- 2.04 Kb
You can Share it: