xref: /reactos/dll/win32/shlwapi/shlwapi_ros.diff (revision 8e659192)
1Index: path.c
2===================================================================
3--- path.c	(working copy)
4+++ path.c	(working copy)
5@@ -21,23 +21,8 @@
6
7 #include "precomp.h"
8
9-/* Get a function pointer from a DLL handle */
10-#define GET_FUNC(func, module, name, fail) \
11-  do { \
12-    if (!func) { \
13-      if (!SHLWAPI_h##module && !(SHLWAPI_h##module = LoadLibraryA(#module ".dll"))) return fail; \
14-      func = (fn##func)GetProcAddress(SHLWAPI_h##module, name); \
15-      if (!func) return fail; \
16-    } \
17-  } while (0)
18+int WINAPI IsNetDrive(int drive);
19
20-/* DLL handles for late bound calls */
21-static HMODULE SHLWAPI_hshell32;
22-
23-/* Function pointers for GET_FUNC macro; these need to be global because of gcc bug */
24-typedef BOOL (WINAPI *fnpIsNetDrive)(int);
25-static  fnpIsNetDrive pIsNetDrive;
26-
27 HRESULT WINAPI SHGetWebFolderFilePathW(LPCWSTR,LPWSTR,DWORD);
28
29 static inline WCHAR* heap_strdupAtoW(LPCSTR str)
30@@ -2186,7 +2186,7 @@
31 {
32   TRACE("(%s)\n",debugstr_a(lpszPath));
33
34-  if (lpszPath && (lpszPath[0]=='\\') && (lpszPath[1]=='\\'))
35+  if (lpszPath && (lpszPath[0]=='\\') && (lpszPath[1]=='\\') && (lpszPath[2]!='?'))
36     return TRUE;
37   return FALSE;
38 }
39@@ -2200,7 +2200,7 @@
40 {
41   TRACE("(%s)\n",debugstr_w(lpszPath));
42
43-  if (lpszPath && (lpszPath[0]=='\\') && (lpszPath[1]=='\\'))
44+  if (lpszPath && (lpszPath[0]=='\\') && (lpszPath[1]=='\\') && (lpszPath[2]!='?'))
45     return TRUE;
46   return FALSE;
47 }
48@@ -3699,8 +3684,7 @@
49   dwDriveNum = PathGetDriveNumberA(lpszPath);
50   if (dwDriveNum == -1)
51     return FALSE;
52-  GET_FUNC(pIsNetDrive, shell32, (LPCSTR)66, FALSE); /* ord 66 = shell32.IsNetDrive */
53-  return pIsNetDrive(dwDriveNum);
54+  return IsNetDrive(dwDriveNum);
55 }
56
57 /*************************************************************************
58@@ -3721,8 +3705,7 @@
59   dwDriveNum = PathGetDriveNumberW(lpszPath);
60   if (dwDriveNum == -1)
61     return FALSE;
62-  GET_FUNC(pIsNetDrive, shell32, (LPCSTR)66, FALSE); /* ord 66 = shell32.IsNetDrive */
63-  return pIsNetDrive(dwDriveNum);
64+  return IsNetDrive(dwDriveNum);
65 }
66
67 /*************************************************************************
68