[PATCH] shell32.dll - winxp addons

Ask your support questions in here

Moderator: Moderator Team

Post Reply
sherpya
Posts: 25
Joined: Tue Dec 21, 2004 3:56 am
Location: Italy

[PATCH] shell32.dll - winxp addons

Post by sherpya »

This patch make shell32.dll works with windows xp winlogon and other base stuff, I've added two new functions, one is stub since it needs some stuff to implement, the other is the undocumented PathIsEqualOrSubFolder,
that I've implemented and tested with the normal windows xp version with same results. The function is unicode only.

Code: Select all

Index: undocshell.h
===================================================================
--- undocshell.h        (revision 13553)
+++ undocshell.h        (working copy)
@@ -410,6 +410,8 @@

 BOOL WINAPI PathIsExeAW(LPCVOID lpszPath);

+BOOL WINAPI PathIsEqualOrSubFolder(LPCWSTR path1, LPCWSTR path2);
+
 BOOL WINAPI PathIsDirectoryAW(LPCVOID lpszPath);

 BOOL WINAPI PathFileExistsAW(LPCVOID lpszPath);
Index: shellpath.c
===================================================================
--- shellpath.c (revision 13553)
+++ shellpath.c (working copy)
@@ -401,6 +401,21 @@
 }

 /*************************************************************************
+ *  PathIsEqualOrSubFolder     [SHELL32.755]
+ */
+BOOL WINAPI PathIsEqualOrSubFolder(LPCWSTR path1, LPCWSTR path2)
+{
+       int i;
+       int len = wcslen(path1);
+       if (len > wcslen(path2)) return FALSE;
+
+       for (i=0; i < len; i++)
+               if (path1[i] != path2[i]) return FALSE;
+
+       return TRUE;
+}
+
+/*************************************************************************
  * PathIsDirectory     [SHELL32.159]
  */
 BOOL WINAPI PathIsDirectoryAW (LPCVOID lpszPath)
Index: shell32.spec
===================================================================
--- shell32.spec        (revision 13553)
+++ shell32.spec        (working copy)
@@ -314,6 +314,7 @@
 # >= NT5
  714 stdcall @(ptr)SHELL32_714 # PathIsTemporaryW
  730 stdcall RestartDialogEx(long wstr long long)
+ 755 stdcall PathIsEqualOrSubFolder(wstr wstr)

 1217 stub FOOBAR1217   # no joke! This is the real name!!

@@ -439,3 +440,4 @@
 # _WIN32_IE >= 0x600
 @ stdcall SHDefExtractIconA(str long long ptr ptr long)
 @ stdcall SHDefExtractIconW(wstr long long ptr ptr long)
+@ stub SHCreateShellItem
Last edited by sherpya on Mon Feb 14, 2005 4:34 am, edited 1 time in total.
sherpya
Posts: 25
Joined: Tue Dec 21, 2004 3:56 am
Location: Italy

Post by sherpya »

bound checks can be added if needed
w3seek
Developer
Posts: 144
Joined: Tue Nov 23, 2004 12:12 am

Post by w3seek »

great! You should submit your bug to the wine team! We just merge back their changes frequently.
Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests