[SDK] Introduce winbase_undoc.h for undocumented exported kernel32 definitions (#8019)

This header is based on the following files from the official
Windows 10.0.10240.0 PSDK, a copy of which can be found at:
- https://github.com/tpn/winsdk-10/blob/master/Include/10.0.10240.0/um/minwin/winbasep.h
- https://github.com/tpn/winsdk-10/blob/master/Include/10.0.10240.0/um/minwin/wbasek.h
This commit is contained in:
Hermès Bélusca-Maïto
2025-05-27 20:52:17 +02:00
parent 4fce13e06b
commit 6696d40cfc
16 changed files with 65 additions and 25 deletions
+2
View File
@@ -432,6 +432,8 @@
# M:
# R: HBelusca, Hermès Bélusca-Maïto
# S: Maintained
/sdk/include/reactos/winbase_undoc.h @HBelusca
/subsystems/win/basesrv/
/win32ss/user/winsrv/
/win32ss/user/winsrv/usersrv/harderror.c @HBelusca
+1
View File
@@ -9,6 +9,7 @@
/* INCLUDES *****************************************************************/
#include "precomp.h"
#include <winbase_undoc.h>
WINE_DEFAULT_DEBUG_CHANNEL(schedsvc);
-1
View File
@@ -12,7 +12,6 @@
#include <winreg.h>
#include <winsvc.h>
#include <winuser.h>
#include <undocuser.h>
#include <ndk/rtlfuncs.h>
+1 -2
View File
@@ -14,11 +14,10 @@
#include "services.h"
#include <winbase_undoc.h>
#include <userenv.h>
#include <strsafe.h>
#include <reactos/undocuser.h>
#define NDEBUG
#include <debug.h>
+1
View File
@@ -9,6 +9,7 @@
/* INCLUDES *****************************************************************/
#include "winlogon.h"
#include <winbase_undoc.h>
/* FUNCTIONS ****************************************************************/
+2 -2
View File
@@ -47,8 +47,8 @@
/* PSEH for SEH Support */
#include <pseh/pseh2.h>
#include <reactos/undocuser.h>
#include <reactos/undocmpr.h>
#include <undocuser.h>
#include <undocmpr.h>
BOOL
WINAPI
-3
View File
@@ -56,9 +56,6 @@
#define __EXCEPT_PAGE_FAULT _SEH2_EXCEPT(_SEH2_GetExceptionCode() == STATUS_ACCESS_VIOLATION)
#define __ENDTRY _SEH2_END
/* Undocumented CreateProcess flag */
#define STARTF_SHELLPRIVATE 0x400
typedef struct _CODEPAGE_ENTRY
{
LIST_ENTRY Entry;
+1
View File
@@ -17,6 +17,7 @@
#define WIN32_NO_STATUS
#include <windef.h>
#include <winbase.h>
#include <winbase_undoc.h>
#include <wingdi.h>
#include <winreg.h>
#include <wincon.h>
@@ -26,7 +26,6 @@
#include <atlcom.h>
#include <atlwin.h>
#include <undocshell.h>
#include <undocuser.h>
#include <shellutils.h>
#include "CChangeNotifyServer.h"
-1
View File
@@ -49,7 +49,6 @@
#include <atlcom.h>
#include <atlwin.h>
#include <undocshell.h>
#include <undocuser.h>
#include <shellutils.h>
#include <ui/rosctrls.h>
+1 -3
View File
@@ -21,15 +21,13 @@
*/
#include "precomp.h"
#include <winbase_undoc.h>
#include <undocshell.h>
WINE_DEFAULT_DEBUG_CHANNEL(exec);
EXTERN_C BOOL PathIsExeW(LPCWSTR lpszPath);
#ifndef STARTF_SHELLPRIVATE
#define STARTF_SHELLPRIVATE 0x400 // From kernel32.h
#endif
#define SEE_MASK_CLASSALL (SEE_MASK_CLASSNAME | SEE_MASK_CLASSKEY)
typedef UINT_PTR (*SHELL_ExecuteW32)(const WCHAR *lpCmd, WCHAR *env, BOOL shWait,
+3
View File
@@ -536,6 +536,9 @@ extern "C" {
#define STARTF_TITLEISAPPID 0x00001000
#define STARTF_PREVENTPINNING 0x00002000
#endif /* (WINVER >= 0x400) */
#if (WINVER >= 0x0600)
#define STARTF_UNTRUSTEDSOURCE 0x00008000
#endif /* (WINVER >= 0x0600) */
#define TC_NORMAL 0
#define TC_HARDERR 1
+7 -2
View File
@@ -1,6 +1,8 @@
#ifndef _UNDOCUSER_H
#define _UNDOCUSER_H
#pragma once
#ifdef __cplusplus
extern "C" {
#endif /* defined(__cplusplus) */
@@ -159,10 +161,13 @@ extern "C" {
#define DFCS_MENUARROWDOWN 0x0010
//
// Undocumented flags for CreateProcess
// Win32-user-specific undocumented flags for CreateProcess
//
#ifndef STARTF_INHERITDESKTOP
#define STARTF_INHERITDESKTOP 0x40000000
#define STARTF_SCREENSAVER 0x80000000
#endif
#define MOD_WINLOGON_SAS 0x8000
@@ -414,4 +419,4 @@ typedef enum tagSETIMEHOTKEY_ACTION
} /* extern "C" */
#endif /* defined(__cplusplus) */
#endif
#endif /* _UNDOCUSER_H */
+41
View File
@@ -0,0 +1,41 @@
/*
* PROJECT: ReactOS SDK
* LICENSE: Dual-licensed:
* LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Undocumented Base API definitions, absent from winbase.h
* COPYRIGHT: Copyright 2025 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
*
* REMARK: This header is based on the following files from the official
* Windows 10.0.10240.0 PSDK, a copy of which can be found at:
* - https://github.com/tpn/winsdk-10/blob/master/Include/10.0.10240.0/um/minwin/winbasep.h
* - https://github.com/tpn/winsdk-10/blob/master/Include/10.0.10240.0/um/minwin/wbasek.h
*/
#ifndef _WINBASE_UNDOC_H
#define _WINBASE_UNDOC_H
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
/*
* Undocumented flags for CreateProcess
*/
#if (WINVER >= 0x400)
#define STARTF_HASSHELLDATA 0x00000400 // As seen in um/minwin/winbasep.h
#define STARTF_SHELLPRIVATE STARTF_HASSHELLDATA // ReactOS-specific name
#endif /* (WINVER >= 0x400) */
#if (WINVER >= 0x0A00)
#define STARTF_TITLEISLOCALALLOCED 0x00004000
#endif /* (WINVER >= 0x0A00) */
#define STARTF_INHERITDESKTOP 0x40000000
#define STARTF_SCREENSAVER 0x80000000
#ifdef __cplusplus
}
#endif
#endif /* _WINBASE_UNDOC_H */
+4 -3
View File
@@ -35,9 +35,10 @@
typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
#define MAKEINTATOM(i) (LPWSTR)((ULONG_PTR)((WORD)(i)))
#define WINBASEAPI
#define STARTF_USESHOWWINDOW 1
#define STARTF_USESIZE 2
#define STARTF_USEPOSITION 4
#define STARTF_USESHOWWINDOW 0x00000001
#define STARTF_USESIZE 0x00000002
#define STARTF_USEPOSITION 0x00000004
#define STARTF_USEHOTKEY 0x00000200
#include <windef.h>
// Needed because windef.h messes up CDECL for whatever
+1 -7
View File
@@ -8,18 +8,12 @@
#include <win32k.h>
#include <napi.h>
#include <winbase_undoc.h>
#define NDEBUG
#include <debug.h>
#include <kdros.h>
#ifndef STARTF_USEHOTKEY
#define STARTF_USEHOTKEY 0x0200
#endif
#ifndef STARTF_SHELLPRIVATE
#define STARTF_SHELLPRIVATE 0x0400
#endif
HANDLE hModuleWin;
NTSTATUS ExitProcessCallback(PEPROCESS Process);