diff --git a/CMakeLists.txt b/CMakeLists.txt index 063ea4d060d..787f8e920ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -312,6 +312,7 @@ Enable this if the module uses typeid or dynamic_cast. You will probably need to sdk/include sdk/include/psdk sdk/include/dxsdk + sdk/include/winrt ${REACTOS_BINARY_DIR}/sdk/include ${REACTOS_BINARY_DIR}/sdk/include/psdk ${REACTOS_BINARY_DIR}/sdk/include/dxsdk diff --git a/sdk/include/psdk/appmodel.h b/sdk/include/psdk/appmodel.h new file mode 100644 index 00000000000..67bb5936192 --- /dev/null +++ b/sdk/include/psdk/appmodel.h @@ -0,0 +1,78 @@ +/* + * PROJECT: ReactOS SDK + * LICENSE: MIT (https://spdx.org/licenses/MIT) + * PURPOSE: Windows AppModel definitions + * COPYRIGHT: Copyright 2024 Timo Kreuzer (timo.kreuzer@reactos.org) + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum AppPolicyProcessTerminationMethod +{ + AppPolicyProcessTerminationMethod_ExitProcess = 0, + AppPolicyProcessTerminationMethod_TerminateProcess = 1, +} AppPolicyProcessTerminationMethod; + +typedef enum AppPolicyThreadInitializationType +{ + AppPolicyThreadInitializationType_None = 0, + AppPolicyThreadInitializationType_InitializeWinRT = 1, +} AppPolicyThreadInitializationType; + +typedef enum AppPolicyShowDeveloperDiagnostic +{ + AppPolicyShowDeveloperDiagnostic_None = 0, + AppPolicyShowDeveloperDiagnostic_ShowUI = 1, +} AppPolicyShowDeveloperDiagnostic; + +typedef enum AppPolicyWindowingModel +{ + AppPolicyWindowingModel_None = 0, + AppPolicyWindowingModel_Universal = 1, + AppPolicyWindowingModel_ClassicDesktop = 2, + AppPolicyWindowingModel_ClassicPhone = 3 +} AppPolicyWindowingModel; + +WINBASEAPI +_Check_return_ +_Success_(return == ERROR_SUCCESS) +LONG +WINAPI +AppPolicyGetProcessTerminationMethod( + _In_ HANDLE processToken, + _Out_ AppPolicyProcessTerminationMethod* policy); + +WINBASEAPI +_Check_return_ +_Success_(return == ERROR_SUCCESS) +LONG +WINAPI +AppPolicyGetThreadInitializationType( + _In_ HANDLE processToken, + _Out_ AppPolicyThreadInitializationType* policy); + +WINBASEAPI +_Check_return_ +_Success_(return == ERROR_SUCCESS) +LONG +WINAPI +AppPolicyGetShowDeveloperDiagnostic( + _In_ HANDLE processToken, + _Out_ AppPolicyShowDeveloperDiagnostic* policy); + +WINBASEAPI +_Check_return_ +_Success_(return == ERROR_SUCCESS) +LONG +WINAPI +AppPolicyGetWindowingModel( + _In_ HANDLE processToken, + _Out_ AppPolicyWindowingModel* policy); + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/sdk/include/psdk/processthreadsapi.h b/sdk/include/psdk/processthreadsapi.h new file mode 100644 index 00000000000..913cc445c7f --- /dev/null +++ b/sdk/include/psdk/processthreadsapi.h @@ -0,0 +1,30 @@ +/* + * PROJECT: ReactOS SDK + * LICENSE: MIT (https://spdx.org/licenses/MIT) + * PURPOSE: API definitions for api-ms-win-core-processthreads-l1 + * COPYRIGHT: Copyright 2024 Timo Kreuzer (timo.kreuzer@reactos.org) + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +WINBASEAPI +BOOL +WINAPI +SetThreadStackGuarantee( + _Inout_ PULONG StackSizeInBytes); + +FORCEINLINE +HANDLE +GetCurrentThreadEffectiveToken( + VOID) +{ + return (HANDLE)(LONG_PTR)-6; +} + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/sdk/include/psdk/stringapiset.h b/sdk/include/psdk/stringapiset.h new file mode 100644 index 00000000000..21a6f624124 --- /dev/null +++ b/sdk/include/psdk/stringapiset.h @@ -0,0 +1,32 @@ +/* + * PROJECT: ReactOS SDK + * LICENSE: MIT (https://spdx.org/licenses/MIT) + * PURPOSE: API definitions for api-ms-win-core-string-l1 + * COPYRIGHT: Copyright 2024 Timo Kreuzer (timo.kreuzer@reactos.org) + */ + +#pragma once + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +WINBASEAPI +int +WINAPI +CompareStringEx( + _In_opt_ LPCWSTR lpLocaleName, + _In_ DWORD dwCmpFlags, + _In_NLS_string_(cchCount1) LPCWCH lpString1, + _In_ int cchCount1, + _In_NLS_string_(cchCount2) LPCWCH lpString2, + _In_ int cchCount2, + _Reserved_ LPNLSVERSIONINFO lpVersionInformation, + _Reserved_ LPVOID lpReserved, + _Reserved_ LPARAM lParam); + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/sdk/include/psdk/synchapi.h b/sdk/include/psdk/synchapi.h new file mode 100644 index 00000000000..e9443294c10 --- /dev/null +++ b/sdk/include/psdk/synchapi.h @@ -0,0 +1,24 @@ +/* + * PROJECT: ReactOS SDK + * LICENSE: MIT (https://spdx.org/licenses/MIT) + * PURPOSE: API definitions for api-ms-win-core-synch-l1 + * COPYRIGHT: Copyright 2024 Timo Kreuzer (timo.kreuzer@reactos.org) + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +WINBASEAPI +BOOL +WINAPI +InitializeCriticalSectionEx( + _Out_ LPCRITICAL_SECTION lpCriticalSection, + _In_ DWORD dwSpinCount, + _In_ DWORD Flags); + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/sdk/include/psdk/sysinfoapi.h b/sdk/include/psdk/sysinfoapi.h new file mode 100644 index 00000000000..2542e6391d1 --- /dev/null +++ b/sdk/include/psdk/sysinfoapi.h @@ -0,0 +1,22 @@ +/* + * PROJECT: ReactOS SDK + * LICENSE: MIT (https://spdx.org/licenses/MIT) + * PURPOSE: API definitions for api-ms-win-core-sysinfo-l1 + * COPYRIGHT: Copyright 2024 Timo Kreuzer (timo.kreuzer@reactos.org) + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +WINBASEAPI +VOID +WINAPI +GetSystemTimePreciseAsFileTime( + _Out_ LPFILETIME lpSystemTimeAsFileTime); + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/sdk/include/psdk/winbase.h b/sdk/include/psdk/winbase.h index 918d3e68a21..f5eed964654 100644 --- a/sdk/include/psdk/winbase.h +++ b/sdk/include/psdk/winbase.h @@ -12,6 +12,7 @@ extern "C" { #endif #include +#include #ifdef _MSC_VER #pragma warning(push) @@ -4170,4 +4171,8 @@ WCHAR * CDECL wine_get_dos_file_name(LPCSTR str); #ifdef __cplusplus } #endif + +#include +#include + #endif /* _WINBASE_H */ diff --git a/sdk/include/winrt/roapi.h b/sdk/include/winrt/roapi.h new file mode 100644 index 00000000000..228ea890e55 --- /dev/null +++ b/sdk/include/winrt/roapi.h @@ -0,0 +1,43 @@ +/* + * PROJECT: ReactOS SDK + * LICENSE: MIT (https://spdx.org/licenses/MIT) + * PURPOSE: WinRT Runtime Object API + * COPYRIGHT: Copyright 2024 Timo Kreuzer (timo.kreuzer@reactos.org) + */ + +#pragma once +#define __ROAPI_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef _ROAPI_ + #define ROAPI +#else + #define ROAPI DECLSPEC_IMPORT +#endif + +typedef enum RO_INIT_TYPE +{ + RO_INIT_SINGLETHREADED = 0, + RO_INIT_MULTITHREADED = 1, +} RO_INIT_TYPE; + +ROAPI +_Check_return_ +HRESULT +WINAPI +RoInitialize( + _In_ RO_INIT_TYPE initType); + +ROAPI +void +WINAPI +RoUninitialize(void); + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/sdk/include/winrt/wrl/wrappers/corewrappers.h b/sdk/include/winrt/wrl/wrappers/corewrappers.h new file mode 100644 index 00000000000..875becab6bf --- /dev/null +++ b/sdk/include/winrt/wrl/wrappers/corewrappers.h @@ -0,0 +1,23 @@ +/* + * PROJECT: ReactOS SDK + * LICENSE: MIT (https://spdx.org/licenses/MIT) + * PURPOSE: WinRT core wrappers + * COPYRIGHT: Copyright 2024 Timo Kreuzer (timo.kreuzer@reactos.org) + */ + +#pragma once +#define _WRL_COREWRAPPERS_H_ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +// TBD + +#ifdef __cplusplus +} // extern "C" +#endif