added stubs for NeedCurrentDirectoryForExePathA/W()
Modified: trunk/reactos/include/ascii.h
Modified: trunk/reactos/include/funcs.h
Modified: trunk/reactos/include/unicode.h
Modified: trunk/reactos/lib/kernel32/file/dir.c
Modified: trunk/reactos/lib/kernel32/kernel32.def

Modified: trunk/reactos/include/ascii.h
--- trunk/reactos/include/ascii.h	2005-02-12 16:47:02 UTC (rev 13510)
+++ trunk/reactos/include/ascii.h	2005-02-12 17:15:04 UTC (rev 13511)
@@ -1107,6 +1107,12 @@
     LPSTR lpBuffer
     );
 
+BOOL
+STDCALL
+NeedCurrentDirectoryForExePathA(
+    LPCSTR ExeName
+    );
+
 WINBOOL
 STDCALL
 GetDiskFreeSpaceA(

Modified: trunk/reactos/include/funcs.h
--- trunk/reactos/include/funcs.h	2005-02-12 16:47:02 UTC (rev 13510)
+++ trunk/reactos/include/funcs.h	2005-02-12 17:15:04 UTC (rev 13511)
@@ -358,6 +358,7 @@
 #define GetWindowsDirectory  GetWindowsDirectoryW
 #define SetCurrentDirectory  SetCurrentDirectoryW
 #define GetCurrentDirectory  GetCurrentDirectoryW
+#define NeedCurrentDirectoryForExePath  NeedCurrentDirectoryForExePathW
 #define GetDiskFreeSpace  GetDiskFreeSpaceW
 #define GetDiskFreeSpaceEx GetDiskFreeSpaceExW
 #define CreateDirectory  CreateDirectoryW
@@ -878,6 +879,7 @@
 #define GetWindowsDirectory  GetWindowsDirectoryA
 #define SetCurrentDirectory  SetCurrentDirectoryA
 #define GetCurrentDirectory  GetCurrentDirectoryA
+#define NeedCurrentDirectoryForExePath  NeedCurrentDirectoryForExePathA
 #define GetDiskFreeSpace  GetDiskFreeSpaceA
 #define GetDiskFreeSpaceEx GetDiskFreeSpaceExA
 #define CreateDirectory  CreateDirectoryA

Modified: trunk/reactos/include/unicode.h
--- trunk/reactos/include/unicode.h	2005-02-12 16:47:02 UTC (rev 13510)
+++ trunk/reactos/include/unicode.h	2005-02-12 17:15:04 UTC (rev 13511)
@@ -1118,6 +1118,12 @@
     LPWSTR lpBuffer
     );
 
+BOOL
+STDCALL
+NeedCurrentDirectoryForExePathW(
+    LPCWSTR ExeName
+    );
+
 WINBOOL
 STDCALL
 GetDiskFreeSpaceW(

Modified: trunk/reactos/lib/kernel32/file/dir.c
--- trunk/reactos/lib/kernel32/file/dir.c	2005-02-12 16:47:02 UTC (rev 13510)
+++ trunk/reactos/lib/kernel32/file/dir.c	2005-02-12 17:15:04 UTC (rev 13511)
@@ -1059,4 +1059,44 @@
   return Ret;
 }
 
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+NeedCurrentDirectoryForExePathW(LPCWSTR ExeName)
+{
+  DPRINT1("NeedCurrentDirectoryForExePathW(0x%x) not implemented!\n", ExeName);
+  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+  return FALSE;
+}
+
+
+/*
+ * @implemented
+ */
+BOOL STDCALL
+NeedCurrentDirectoryForExePathA(LPCSTR ExeName)
+{
+  ANSI_STRING ExeNameA;
+  UNICODE_STRING ExeNameU;
+  BOOL Ret;
+  
+  RtlInitAnsiString(&ExeNameA, ExeName);
+  if(bIsFileApiAnsi)
+  {
+    RtlAnsiStringToUnicodeString(&ExeNameU, &ExeNameA, TRUE);
+  }
+  else
+  {
+    RtlOemStringToUnicodeString(&ExeNameU, &ExeNameA, TRUE);
+  }
+  
+  Ret = NeedCurrentDirectoryForExePathW(ExeNameU.Buffer);
+  
+  RtlFreeUnicodeString(&ExeNameU);
+  
+  return Ret;
+}
+
 /* EOF */

Modified: trunk/reactos/lib/kernel32/kernel32.def
--- trunk/reactos/lib/kernel32/kernel32.def	2005-02-12 16:47:02 UTC (rev 13510)
+++ trunk/reactos/lib/kernel32/kernel32.def	2005-02-12 17:15:04 UTC (rev 13511)
@@ -641,6 +641,8 @@
 MoveFileWithProgressW@20
 MulDiv@12
 MultiByteToWideChar@24
+NeedCurrentDirectoryForExePathA@4
+NeedCurrentDirectoryForExePathW@4
 NlsConvertIntegerToString@20
 ;NlsGetCacheUpdateCount
 ;NlsResetProcessLocale