Implement CopyProfileDirectoryA/W.

svn path=/trunk/; revision=12380
This commit is contained in:
Eric Kohl 2004-12-28 13:30:18 +00:00
parent 59951cd18f
commit 9af695bf7b
3 changed files with 55 additions and 1 deletions

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: directory.c,v 1.7 2004/11/09 15:02:35 ion Exp $
/* $Id: directory.c,v 1.8 2004/12/28 13:30:18 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -30,6 +30,54 @@
/* FUNCTIONS ***************************************************************/
BOOL STDCALL
CopyProfileDirectoryA(LPCSTR lpSourcePath,
LPCSTR lpDestinationPath,
DWORD dwFlags)
{
UNICODE_STRING SrcPath;
UNICODE_STRING DstPath;
NTSTATUS Status;
BOOL bResult;
Status = RtlCreateUnicodeStringFromAsciiz(&SrcPath,
(LPSTR)lpSourcePath);
if (!NT_SUCCESS(Status))
{
SetLastError (RtlNtStatusToDosError (Status));
return FALSE;
}
Status = RtlCreateUnicodeStringFromAsciiz(&DstPath,
(LPSTR)lpDestinationPath);
if (!NT_SUCCESS(Status))
{
RtlFreeUnicodeString(&SrcPath);
SetLastError (RtlNtStatusToDosError (Status));
return FALSE;
}
bResult = CopyProfileDirectoryW(SrcPath.Buffer,
DstPath.Buffer,
dwFlags);
RtlFreeUnicodeString(&DstPath);
RtlFreeUnicodeString(&SrcPath);
return bResult;
}
BOOL STDCALL
CopyProfileDirectoryW(LPCWSTR lpSourcePath,
LPCWSTR lpDestinationPath,
DWORD dwFlags)
{
/* FIXME: dwFlags are ignored! */
return CopyDirectory(lpDestinationPath, lpSourcePath);
}
BOOL
CopyDirectory (LPCWSTR lpDestinationPath,
LPCWSTR lpSourcePath)

View file

@ -11,6 +11,8 @@ DeleteItemA@16 @107 NONAME
DeleteItemW@16 @108 NONAME
CreateUserProfileA@8 @109 NONAME
CreateUserProfileW@8 @110 NONAME
CopyProfileDirectoryA@12 @111 NONAME
CopyProfileDirectoryW@12 @112 NONAME
AddDesktopItemA@32 @113 NONAME
AddDesktopItemW@32 @114 NONAME
DeleteDesktopItemA@8 @115 NONAME

View file

@ -52,6 +52,8 @@ BOOL WINAPI AddItemA (LPCSTR, BOOL, LPCSTR, LPCSTR, LPCSTR, INT, LPCSTR, WORD, I
BOOL WINAPI AddItemW (LPCWSTR, BOOL, LPCWSTR, LPCWSTR, LPCWSTR, INT, LPCWSTR, WORD, INT);
BOOL WINAPI DeleteItemA (LPCSTR, BOOL, LPCSTR, BOOL);
BOOL WINAPI DeleteItemW (LPCWSTR, BOOL, LPCWSTR, BOOL);
BOOL WINAPI CopyProfileDirectoryA(LPCSTR, LPCSTR, DWORD);
BOOL WINAPI CopyProfileDirectoryW(LPCWSTR, LPCWSTR, DWORD);
/* end private */
BOOL WINAPI LoadUserProfileA (HANDLE, LPPROFILEINFOA);
BOOL WINAPI LoadUserProfileW (HANDLE, LPPROFILEINFOW);
@ -80,6 +82,7 @@ typedef LPPROFILEINFOW LPPROFILEINFO;
#define DeleteGroup DeleteGroupW
#define AddItem AddItemW
#define DeleteItem DeleteItemW
#define CopyProfileDirectory CopyProfileDirectoryW
/* end private */
#define LoadUserProfile LoadUserProfileW
#define GetAllUsersProfileDirectory GetAllUsersProfileDirectoryW
@ -97,6 +100,7 @@ typedef LPPROFILEINFOA LPPROFILEINFO;
#define DeleteGroup DeleteGroupA
#define AddItem AddItemA
#define DeleteItem DeleteItemA
#define CopyProfileDirectory CopyProfileDirectoryA
/* end private */
#define LoadUserProfile LoadUserProfileA
#define GetAllUsersProfileDirectory GetAllUsersProfileDirectoryA