Implemented Get/SetFileSecurity A->W.

This commit is contained in:
Mike McCormack 2004-08-16 23:18:23 +00:00 committed by Alexandre Julliard
parent 9b68d0f993
commit 93eeaa417d
1 changed files with 33 additions and 4 deletions

View File

@ -973,8 +973,23 @@ GetFileSecurityA( LPCSTR lpFileName,
PSECURITY_DESCRIPTOR pSecurityDescriptor, PSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD nLength, LPDWORD lpnLengthNeeded ) DWORD nLength, LPDWORD lpnLengthNeeded )
{ {
FIXME("(%s) : stub\n", debugstr_a(lpFileName)); DWORD len;
return TRUE; BOOL r;
LPWSTR name = NULL;
if( lpFileName )
{
len = MultiByteToWideChar( CP_ACP, 0, lpFileName, -1, NULL, 0 );
name = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, lpFileName, -1, name, len );
}
r = GetFileSecurityW( name, RequestedInformation, pSecurityDescriptor,
nLength, lpnLengthNeeded );
if( name )
HeapFree( GetProcessHeap(), 0, name );
return r;
} }
/****************************************************************************** /******************************************************************************
@ -1076,8 +1091,22 @@ BOOL WINAPI SetFileSecurityA( LPCSTR lpFileName,
SECURITY_INFORMATION RequestedInformation, SECURITY_INFORMATION RequestedInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor) PSECURITY_DESCRIPTOR pSecurityDescriptor)
{ {
FIXME("(%s) : stub\n", debugstr_a(lpFileName)); DWORD len;
return TRUE; BOOL r;
LPWSTR name = NULL;
if( lpFileName )
{
len = MultiByteToWideChar( CP_ACP, 0, lpFileName, -1, NULL, 0 );
name = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, lpFileName, -1, name, len );
}
r = SetFileSecurityW( name, RequestedInformation, pSecurityDescriptor );
if( name )
HeapFree( GetProcessHeap(), 0, name );
return r;
} }
/****************************************************************************** /******************************************************************************