added stubs for NeedCurrentDirectoryForExePathA/W()
authorThomas Bluemel <thomas@reactsoft.com>
Sat, 12 Feb 2005 17:15:04 +0000 (17:15 +0000)
committerThomas Bluemel <thomas@reactsoft.com>
Sat, 12 Feb 2005 17:15:04 +0000 (17:15 +0000)
svn path=/trunk/; revision=13511

reactos/include/ascii.h
reactos/include/funcs.h
reactos/include/unicode.h
reactos/lib/kernel32/file/dir.c
reactos/lib/kernel32/kernel32.def

index c694424..49c3253 100644 (file)
@@ -1107,6 +1107,12 @@ GetCurrentDirectoryA(
     LPSTR lpBuffer
     );
 
+BOOL
+STDCALL
+NeedCurrentDirectoryForExePathA(
+    LPCSTR ExeName
+    );
+
 WINBOOL
 STDCALL
 GetDiskFreeSpaceA(
index 573b18e..2a2fc54 100644 (file)
@@ -358,6 +358,7 @@ typedef PPROGRESS_ROUTINE LPPROGRESS_ROUTINE;
 #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 @@ typedef PPROGRESS_ROUTINE LPPROGRESS_ROUTINE;
 #define GetWindowsDirectory  GetWindowsDirectoryA
 #define SetCurrentDirectory  SetCurrentDirectoryA
 #define GetCurrentDirectory  GetCurrentDirectoryA
+#define NeedCurrentDirectoryForExePath  NeedCurrentDirectoryForExePathA
 #define GetDiskFreeSpace  GetDiskFreeSpaceA
 #define GetDiskFreeSpaceEx GetDiskFreeSpaceExA
 #define CreateDirectory  CreateDirectoryA
index e7d5e74..847bad2 100644 (file)
@@ -1118,6 +1118,12 @@ GetCurrentDirectoryW(
     LPWSTR lpBuffer
     );
 
+BOOL
+STDCALL
+NeedCurrentDirectoryForExePathW(
+    LPCWSTR ExeName
+    );
+
 WINBOOL
 STDCALL
 GetDiskFreeSpaceW(
index b46e2d0..5011b83 100644 (file)
@@ -1059,4 +1059,44 @@ GetDllDirectoryA(
   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 */
index f618755..383ec6d 100644 (file)
@@ -641,6 +641,8 @@ MoveFileW@8
 MoveFileWithProgressW@20
 MulDiv@12
 MultiByteToWideChar@24
+NeedCurrentDirectoryForExePathA@4
+NeedCurrentDirectoryForExePathW@4
 NlsConvertIntegerToString@20
 ;NlsGetCacheUpdateCount
 ;NlsResetProcessLocale