[PROFMAP] Initial implementation (#2119)

Co-Authored-By: Stanislav Motylkov <x86corez@gmail.com>
This commit is contained in:
Oleg Dubinskiy 2020-04-26 22:15:21 +03:00 committed by GitHub
parent 96b7cb1a4f
commit 70b6658af8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 102 additions and 0 deletions

View file

@ -158,6 +158,7 @@ add_subdirectory(pdh)
add_subdirectory(pidgen)
add_subdirectory(powrprof)
add_subdirectory(printui)
add_subdirectory(profmap)
add_subdirectory(propsys)
add_subdirectory(psapi)
add_subdirectory(pstorec)

View file

@ -0,0 +1,13 @@
spec2def(profmap.dll profmap.spec)
list(APPEND SOURCE
profmap.c
profmap.rc
${CMAKE_CURRENT_BINARY_DIR}/profmap_stubs.c
${CMAKE_CURRENT_BINARY_DIR}/profmap.def)
add_library(profmap MODULE ${SOURCE})
set_module_type(profmap win32dll)
add_importlibs(profmap msvcrt kernel32 ntdll)
add_cd_file(TARGET profmap DESTINATION reactos/system32 FOR all)

View file

@ -0,0 +1,77 @@
/*
* PROJECT: ReactOS system libraries
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* FILE: dll/win32/profmap/profmap.c
* PURPOSE: ReactOS User Profile Mapping API
* COPYRIGHT: Copyright 2019 Oleg Dubinskiy (oleg.dubinskij2013@yandex.ua)
*/
/* INCLUDES *******************************************************************/
#include <windef.h>
#include <winbase.h>
#define NDEBUG
#include <debug.h>
/* PUBLIC FUNCTIONS ***********************************************************/
/*
* @implemented
*/
BOOL
WINAPI
DllMain(HINSTANCE hinstDll,
DWORD dwReason,
LPVOID reserved)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hinstDll);
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
/*
* @unimplemented
*
* NOTES:
* Based on the documentation from:
* http://sendmail2.blogspot.com/2012/11/windows-small-business-server-2008_7553.html?view=magazine
*/
BOOL
WINAPI
RemapAndMoveUserA(IN LPCSTR pComputer,
IN DWORD dwFlags,
IN LPCSTR pCurrentUser,
IN LPCSTR pNewUser)
{
UNIMPLEMENTED;
return FALSE;
}
/*
* @unimplemented
*
* NOTES:
* Based on the documentation from:
* http://sendmail2.blogspot.com/2012/11/windows-small-business-server-2008_7553.html?view=magazine
*/
BOOL
WINAPI
RemapAndMoveUserW(IN LPCWSTR pComputer,
IN DWORD dwFlags,
IN LPCWSTR pCurrentUser,
IN LPCWSTR pNewUser)
{
UNIMPLEMENTED;
return FALSE;
}
/* EOF */

View file

@ -0,0 +1,5 @@
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS User Profile Mapping API"
#define REACTOS_STR_INTERNAL_NAME "profmap"
#define REACTOS_STR_ORIGINAL_FILENAME "profmap.dll"
#include <reactos/version.rc>

View file

@ -0,0 +1,6 @@
@ stdcall DllMain(ptr long ptr)
@ stub InitializeProfileMappingApi
@ stdcall RemapAndMoveUserA(str long str str)
@ stdcall RemapAndMoveUserW(wstr long wstr wstr)
@ stub RemapUserProfileA
@ stub RemapUserProfileW