reactos/lib/kernel32/file
diff -u -r1.57 -r1.58
--- file.c 6 Sep 2004 15:56:25 -0000 1.57
+++ file.c 22 Sep 2004 09:31:01 -0000 1.58
@@ -1,4 +1,4 @@
-/* $Id: file.c,v 1.57 2004/09/06 15:56:25 weiden Exp $
+/* $Id: file.c,v 1.58 2004/09/22 09:31:01 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@@ -1360,4 +1360,97 @@
return Ret;
}
+
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+CheckNameLegalDOS8Dot3W(
+ LPCWSTR lpName,
+ LPSTR lpOemName OPTIONAL,
+ DWORD OemNameSize OPTIONAL,
+ PBOOL pbNameContainsSpaces OPTIONAL,
+ PBOOL pbNameLegal
+ )
+{
+ UNICODE_STRING Name;
+ ANSI_STRING AnsiName;
+
+ if(lpName == NULL ||
+ (lpOemName == NULL && OemNameSize != 0) ||
+ pbNameLegal == NULL)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ if(lpOemName != NULL)
+ {
+ AnsiName.Buffer = lpOemName;
+ AnsiName.MaximumLength = OemNameSize * sizeof(CHAR);
+ AnsiName.Length = 0;
+ }
+
+ RtlInitUnicodeString(&Name, lpName);
+
+ *pbNameLegal = RtlIsNameLegalDOS8Dot3(&Name,
+ (lpOemName ? &AnsiName : NULL),
+ (BOOLEAN*)pbNameContainsSpaces);
+
+ return TRUE;
+}
+
+
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+CheckNameLegalDOS8Dot3A(
+ LPCSTR lpName,
+ LPSTR lpOemName OPTIONAL,
+ DWORD OemNameSize OPTIONAL,
+ PBOOL pbNameContainsSpaces OPTIONAL,
+ PBOOL pbNameLegal
+ )
+{
+ UNICODE_STRING Name;
+ ANSI_STRING AnsiName, AnsiInputName;
+ NTSTATUS Status;
+
+ if(lpName == NULL ||
+ (lpOemName == NULL && OemNameSize != 0) ||
+ pbNameLegal == NULL)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ if(lpOemName != NULL)
+ {
+ AnsiName.Buffer = lpOemName;
+ AnsiName.MaximumLength = OemNameSize * sizeof(CHAR);
+ AnsiName.Length = 0;
+ }
+
+ RtlInitAnsiString(&AnsiInputName, (LPSTR)lpName);
+ if(bIsFileApiAnsi)
+ Status = RtlAnsiStringToUnicodeString(&Name, &AnsiInputName, TRUE);
+ else
+ Status = RtlOemStringToUnicodeString(&Name, &AnsiInputName, TRUE);
+
+ if(!NT_SUCCESS(Status))
+ {
+ SetLastErrorByStatus(Status);
+ return FALSE;
+ }
+
+ *pbNameLegal = RtlIsNameLegalDOS8Dot3(&Name,
+ (lpOemName ? &AnsiName : NULL),
+ (BOOLEAN*)pbNameContainsSpaces);
+
+ return TRUE;
+}
+
/* EOF */
reactos/lib/kernel32/misc
diff -u -r1.86 -r1.87
--- stubs.c 21 Sep 2004 22:08:18 -0000 1.86
+++ stubs.c 22 Sep 2004 09:31:01 -0000 1.87
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.86 2004/09/21 22:08:18 weiden Exp $
+/* $Id: stubs.c,v 1.87 2004/09/22 09:31:01 weiden Exp $
*
* KERNEL32.DLL stubs (unimplemented functions)
* Remove from this file, if you implement them.
@@ -1310,23 +1310,6 @@
/*
* @unimplemented
*/
-BOOL
-STDCALL
-CheckNameLegalDOS8Dot3W(
- LPCWSTR lpName,
- LPSTR lpOemName OPTIONAL,
- DWORD OemNameSize OPTIONAL,
- PBOOL pbNameContainsSpaces OPTIONAL,
- PBOOL pbNameLegal
- )
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-/*
- * @unimplemented
- */
HANDLE
STDCALL
CreateJobObjectW(
@@ -1670,23 +1653,6 @@
/*
* @unimplemented
*/
-BOOL
-STDCALL
-CheckNameLegalDOS8Dot3A(
- LPCSTR lpName,
- LPSTR lpOemName OPTIONAL,
- DWORD OemNameSize OPTIONAL,
- PBOOL pbNameContainsSpaces OPTIONAL,
- PBOOL pbNameLegal
- )
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-/*
- * @unimplemented
- */
HANDLE
STDCALL
CreateJobObjectA(