kernel32: Add partial stub for NeedCurrentDirectoryForExePath

Kirill K. Smirnov lich at math.spbu.ru
Wed Apr 18 05:24:35 CDT 2007


Add partial stub for NeedCurrentDirectoryForExePath. It is needed by win2003 
cmd.exe
-------------- next part --------------
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index a675386..4d3d083 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -799,6 +799,8 @@ # @ stub MapUserPhysicalPagesScatter
 @ stdcall MoveFileWithProgressW(wstr wstr ptr ptr long)
 @ stdcall MulDiv(long long long)
 @ stdcall MultiByteToWideChar(long long str long ptr long)
+@ stdcall NeedCurrentDirectoryForExePathA(str)
+@ stdcall NeedCurrentDirectoryForExePathW(wstr)
 # @ stub NlsConvertIntegerToString
 # @ stub NlsGetCacheUpdateCount
 # @ stub NlsResetProcessLocale
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
index b195435..bf32f4c 100644
--- a/dlls/kernel32/path.c
+++ b/dlls/kernel32/path.c
@@ -1511,6 +1511,30 @@ UINT WINAPI GetSystemWow64DirectoryA( LP
 
 
 /***********************************************************************
+ *           NeedCurrentDirectoryForExePathW   (KERNEL32.@)
+ */
+BOOL WINAPI NeedCurrentDirectoryForExePathW( LPCWSTR name )
+{
+    if (strchrW(name, '\\'))
+        return TRUE;
+    FIXME("(%s): stub!\n", debugstr_w(name));
+    return TRUE;
+}
+
+
+/***********************************************************************
+ *           NeedCurrentDirectoryForExePathA   (KERNEL32.@)
+ */
+BOOL WINAPI NeedCurrentDirectoryForExePathA( LPCSTR name )
+{
+    WCHAR *nameW;
+
+    if (!(nameW = FILE_name_AtoW( name, FALSE ))) return TRUE;
+    return NeedCurrentDirectoryForExePathW( nameW );
+}
+
+
+/***********************************************************************
  *           wine_get_unix_file_name (KERNEL32.@) Not a Windows API
  *
  * Return the full Unix file name for a given path.
diff --git a/include/winbase.h b/include/winbase.h
index 59e7718..da9c547 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -1839,6 +1839,9 @@ BOOL        WINAPI MoveFileWithProgressA
 BOOL        WINAPI MoveFileWithProgressW(LPCWSTR,LPCWSTR,LPPROGRESS_ROUTINE,LPVOID,DWORD);
 #define     MoveFileWithProgress WINELIB_NAME_AW(MoveFileWithProgress)
 INT         WINAPI MulDiv(INT,INT,INT);
+BOOL        WINAPI NeedCurrentDirectoryForExePathA(LPCSTR);
+BOOL        WINAPI NeedCurrentDirectoryForExePathW(LPCWSTR);
+#define     NeedCurrentDirectoryForExePath WINELIB_NAME_AW(NeedCurrentDirectoryForExePath)
 BOOL        WINAPI NotifyChangeEventLog(HANDLE,HANDLE);
 BOOL        WINAPI ObjectCloseAuditAlarmA(LPCSTR,LPVOID,BOOL);
 BOOL        WINAPI ObjectCloseAuditAlarmW(LPCWSTR,LPVOID,BOOL);


More information about the wine-patches mailing list