mirror of
https://github.com/reactos/reactos.git
synced 2024-11-18 21:13:52 +00:00
950c86fb4c
Based on https://stackoverflow.com/a/1511273 Also enforce CRLF for all *.xml files in our tree, because they are distributed with ReactOS.
67 lines
2.1 KiB
Diff
67 lines
2.1 KiB
Diff
Index: path.c
|
|
===================================================================
|
|
--- path.c (working copy)
|
|
+++ path.c (working copy)
|
|
@@ -21,23 +21,8 @@
|
|
|
|
#include "precomp.h"
|
|
|
|
-/* Get a function pointer from a DLL handle */
|
|
-#define GET_FUNC(func, module, name, fail) \
|
|
- do { \
|
|
- if (!func) { \
|
|
- if (!SHLWAPI_h##module && !(SHLWAPI_h##module = LoadLibraryA(#module ".dll"))) return fail; \
|
|
- func = (fn##func)GetProcAddress(SHLWAPI_h##module, name); \
|
|
- if (!func) return fail; \
|
|
- } \
|
|
- } while (0)
|
|
+int WINAPI IsNetDrive(int drive);
|
|
|
|
-/* DLL handles for late bound calls */
|
|
-static HMODULE SHLWAPI_hshell32;
|
|
-
|
|
-/* Function pointers for GET_FUNC macro; these need to be global because of gcc bug */
|
|
-typedef BOOL (WINAPI *fnpIsNetDrive)(int);
|
|
-static fnpIsNetDrive pIsNetDrive;
|
|
-
|
|
HRESULT WINAPI SHGetWebFolderFilePathW(LPCWSTR,LPWSTR,DWORD);
|
|
|
|
static inline WCHAR* heap_strdupAtoW(LPCSTR str)
|
|
@@ -2186,7 +2186,7 @@
|
|
{
|
|
TRACE("(%s)\n",debugstr_a(lpszPath));
|
|
|
|
- if (lpszPath && (lpszPath[0]=='\\') && (lpszPath[1]=='\\'))
|
|
+ if (lpszPath && (lpszPath[0]=='\\') && (lpszPath[1]=='\\') && (lpszPath[2]!='?'))
|
|
return TRUE;
|
|
return FALSE;
|
|
}
|
|
@@ -2200,7 +2200,7 @@
|
|
{
|
|
TRACE("(%s)\n",debugstr_w(lpszPath));
|
|
|
|
- if (lpszPath && (lpszPath[0]=='\\') && (lpszPath[1]=='\\'))
|
|
+ if (lpszPath && (lpszPath[0]=='\\') && (lpszPath[1]=='\\') && (lpszPath[2]!='?'))
|
|
return TRUE;
|
|
return FALSE;
|
|
}
|
|
@@ -3699,8 +3684,7 @@
|
|
dwDriveNum = PathGetDriveNumberA(lpszPath);
|
|
if (dwDriveNum == -1)
|
|
return FALSE;
|
|
- GET_FUNC(pIsNetDrive, shell32, (LPCSTR)66, FALSE); /* ord 66 = shell32.IsNetDrive */
|
|
- return pIsNetDrive(dwDriveNum);
|
|
+ return IsNetDrive(dwDriveNum);
|
|
}
|
|
|
|
/*************************************************************************
|
|
@@ -3721,8 +3705,7 @@
|
|
dwDriveNum = PathGetDriveNumberW(lpszPath);
|
|
if (dwDriveNum == -1)
|
|
return FALSE;
|
|
- GET_FUNC(pIsNetDrive, shell32, (LPCSTR)66, FALSE); /* ord 66 = shell32.IsNetDrive */
|
|
- return pIsNetDrive(dwDriveNum);
|
|
+ return IsNetDrive(dwDriveNum);
|
|
}
|
|
|
|
/*************************************************************************
|