mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
implemented CheckNameLegalDOS8Dot3A/W()
svn path=/trunk/; revision=10969
This commit is contained in:
@@ -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 @@ SetFileShortNameA(
|
||||
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 */
|
||||
|
||||
@@ -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.
|
||||
@@ -1307,23 +1307,6 @@ ZombifyActCtx(
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* @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
|
||||
*/
|
||||
@@ -1667,23 +1650,6 @@ VerifyVersionInfoW(
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* @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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user