[REGAPI] Import regapi.dll from Wine Staging 5.7 CORE-16458 (#2723)

- Comment some other missing exports Windows regapi.dll has them, but Wine's one doesn't.

Required by MS winlogon with Win32SS replaced. I double-rechecked: now it doesn't fail due to missing regapi.dll in system32 or separate missing functions in this dll, exactly the same as with MS regapi. In pair with my profmap.dll (which was merged recently), now it fails due to InitializeUserProfile() stub in our userenv.dll (if to replace msgina too).
Also I compared the exports of MS regapi.dll and Wine's one. Win2k3 version has all exports that Wine version has and some others (which looks like were dropped in NT6). But those exports which already exist, are enough to allow MS winlogon no longer fail.

CORE-16458
This commit is contained in:
Oleg Dubinskiy 2020-05-14 15:21:16 +03:00 committed by GitHub
parent d3a550a6a9
commit 90aff2947b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 145 additions and 0 deletions

View file

@ -168,6 +168,7 @@ add_subdirectory(rasadhlp)
add_subdirectory(rasapi32)
add_subdirectory(rasdlg)
add_subdirectory(rasman)
add_subdirectory(regapi)
add_subdirectory(resutils)
add_subdirectory(riched20)
add_subdirectory(riched32)

View file

@ -0,0 +1,15 @@
add_definitions(-D__WINESRC__)
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
spec2def(regapi.dll regapi.spec)
list(APPEND SOURCE
main.c
${CMAKE_CURRENT_BINARY_DIR}/regapi_stubs.c
${CMAKE_CURRENT_BINARY_DIR}/regapi.def)
add_library(regapi MODULE ${SOURCE})
set_module_type(regapi win32dll)
target_link_libraries(regapi wine)
add_importlibs(regapi advapi32 msvcrt kernel32 ntdll)
add_cd_file(TARGET regapi DESTINATION reactos/system32 FOR all)

44
dll/win32/regapi/main.c Normal file
View file

@ -0,0 +1,44 @@
/*
* regapi implementation
*
* Copyright 2011 Austin English
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(regapi);
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
switch (fdwReason)
{
case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hinstDLL);
break;
default:
break;
}
return TRUE;
}

View file

@ -0,0 +1,84 @@
# GetDomainName
# QueryUserProperty
@ stub RegBuildNumberQuery
@ stub RegCdCreateA
@ stub RegCdCreateW
@ stub RegCdDeleteA
@ stub RegCdDeleteW
@ stub RegCdEnumerateA
@ stub RegCdEnumerateW
@ stub RegCdQueryA
@ stub RegCdQueryW
@ stub RegCloseServer
@ stub RegConsoleShadowQueryA
@ stub RegConsoleShadowQueryW
# RegCreateUserConfigW
@ stub RegDefaultUserConfigQueryA
@ stub RegDefaultUserConfigQueryW
@ stub RegDenyTSConnectionsPolicy
@ stub RegFreeUtilityCommandList
# RegGetLicensingModePolicy
@ stub RegGetMachinePolicy
@ stub RegGetMachinePolicyEx
# RegGetMachinePolicyNew
@ stub RegGetTServerVersion
@ stub RegGetUserConfigFromUserParameters
@ stub RegGetUserPolicy
@ stub RegIsMachineInHelpMode
@ stub RegIsMachinePolicyAllowHelp
# RegIsTimeZoneRedirectionEnabled
@ stub RegIsTServer
@ stub RegMergeUserConfigWithUserParameters
@ stub RegOpenServerA
@ stub RegOpenServerW
@ stub RegPdCreateA
@ stub RegPdCreateW
@ stub RegPdDeleteA
@ stub RegPdDeleteW
@ stub RegPdEnumerateA
@ stub RegPdEnumerateW
@ stub RegPdQueryA
@ stub RegPdQueryW
@ stub RegQueryOEMId
@ stub RegQueryUtilityCommandList
@ stub RegSAMUserConfig
@ stub RegUserConfigDelete
@ stub RegUserConfigQuery
@ stub RegUserConfigRename
@ stub RegUserConfigSet
@ stub RegWdCreateA
@ stub RegWdCreateW
@ stub RegWdDeleteA
@ stub RegWdDeleteW
@ stub RegWdEnumerateA
@ stub RegWdEnumerateW
@ stub RegWdQueryA
@ stub RegWdQueryW
@ stub RegWinStationAccessCheck
@ stub RegWinStationCreateA
@ stub RegWinStationCreateW
@ stub RegWinStationDeleteA
@ stub RegWinStationDeleteW
@ stub RegWinStationEnumerateA
@ stub RegWinStationEnumerateW
@ stub RegWinStationQueryA
@ stub RegWinStationQueryDefaultSecurity
@ stub RegWinStationQueryEx
# RegWinStationQueryExNew
@ stub RegWinStationQueryNumValueW
@ stub RegWinStationQuerySecurityA
# RegWinstationQuerySecurityConfig_Machine
# RegWinstationQuerySecurityConfig_Merged
@ stub RegWinStationQuerySecurityW
@ stub RegWinStationQueryValueW
@ stub RegWinStationQueryW
@ stub RegWinStationSetNumValueW
@ stub RegWinStationSetSecurityA
# RegWinstationSetSecurityConfig
@ stub RegWinStationSetSecurityW
# SetUserProperty
# UsrPropGetString
# UsrPropGetValue
# UsrPropSetString
# UsrPropSetValue
@ stub WaitForTSConnectionsPolicyChanges

View file

@ -158,6 +158,7 @@ dll/win32/qmgr # Synced to WineStaging-4.18
dll/win32/qmgrprxy # Synced to WineStaging-2.9
dll/win32/query # Synced to WineStaging-4.18
dll/win32/rasapi32 # Synced to WineStaging-3.3
dll/win32/regapi # Synced to WineStaging-5.7
dll/win32/resutils # Synced to WineStaging-3.3
dll/win32/riched20 # Synced to WineStaging-4.18
dll/win32/riched32 # Synced to WineStaging-3.3