Skip to content

Commit 91b57fa

Browse files
committed
WDK 10.0.22621.0
MSVC 14.33.31629
1 parent 43ce703 commit 91b57fa

File tree

21 files changed

+344
-25
lines changed

21 files changed

+344
-25
lines changed

Diff for: CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ else()
3939
set(LDK_USE_RAISE_EXCEPTION OFF)
4040
set(LDK_USE_RTL_RAISE_EXCEPTION OFF)
4141
endif()
42-
CPMAddPackage("gh:ntoskrnl7/[email protected].4")
42+
CPMAddPackage("gh:ntoskrnl7/[email protected].5")
4343

4444
CPMAddPackage("gh:ntoskrnl7/FindWDK#master")
4545
list(APPEND CMAKE_MODULE_PATH "${FindWDK_SOURCE_DIR}/cmake")

Diff for: README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,12 @@ Provides features to support a better development environment in the kernel.
206206
* 14.26.28801
207207
* 14.29.30133
208208
* 14.31.31103
209+
* 14.33.31629
209210
* Windows Kits (SDK, WDK)
210211
* 10.0.17763.0
211212
* 10.0.18362.0
212213
* 10.0.22000.0
214+
* 10.0.22621.0
213215

214216
If the SDK and WDK versions are different, builds are more likely to fail. **If possible, it is recommended to build in the same environment as the SDK and WDK versions.**
215217

@@ -300,7 +302,7 @@ If the SDK and WDK versions are different, builds are more likely to fail. **If
300302
include(cmake/CPM.cmake)
301303
302304
set(CRTSYS_NTL_MAIN ON) # use ntl::main
303-
CPMAddPackage("gh:ntoskrnl7/[email protected].9")
305+
CPMAddPackage("gh:ntoskrnl7/[email protected].10")
304306
include(${crtsys_SOURCE_DIR}/cmake/CrtSys.cmake)
305307
306308
# add driver

Diff for: docs/ko-kr.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,12 @@ crtsys의 장점은 아래와 같습니다.
206206
* 14.26.28801
207207
* 14.29.30133
208208
* 14.31.31103
209+
* 14.33.31629
209210
* Windows Kits (SDK, WDK)
210211
* 10.0.17763.0
211212
* 10.0.18362.0
212213
* 10.0.22000.0
214+
* 10.0.22621.0
213215

214216
SDK와 WDK의 버전이 다르면 빌드가 실패할 가능성이 높으므로 **가능하다면 SDK와 WDK의 버전이 같은 환경에서 빌드하는것을 권장합니다.**
215217

@@ -300,7 +302,7 @@ SDK와 WDK의 버전이 다르면 빌드가 실패할 가능성이 높으므로
300302
include(cmake/CPM.cmake)
301303
302304
set(CRTSYS_NTL_MAIN ON) # use ntl::main
303-
CPMAddPackage("gh:ntoskrnl7/[email protected].9")
305+
CPMAddPackage("gh:ntoskrnl7/[email protected].10")
304306
include(${crtsys_SOURCE_DIR}/cmake/CrtSys.cmake)
305307
306308
# add driver

Diff for: include/.internal/version

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ Environment:
2626

2727
#define CRTSYS_VERSION_MAJOR 0
2828
#define CRTSYS_VERSION_MINOR 1
29-
#define CRTSYS_VERSION_PATCH 9
29+
#define CRTSYS_VERSION_PATCH 10
3030

3131
#endif // _CRTSYS_VERSION_

Diff for: src/custom/crt/fenv/fenv.c

+2
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,11 @@ CrtSyspSaveXState (
5656
{
5757
PXSTATE_SAVE StateSave = (PXSTATE_SAVE)FlsGetValue( CrtSyspFlsXStateSaveIndex );
5858
if (StateSave == NULL) {
59+
#pragma warning(disable:4996)
5960
StateSave = ExAllocatePoolWithTag( NonPagedPool,
6061
sizeof(XSTATE_SAVE),
6162
'ttsX' );
63+
#pragma warning(default:4996)
6264
if (StateSave == NULL) {
6365
return NULL;
6466
}

Diff for: src/custom/misc/winapi.cpp

+107-1
Original file line numberDiff line numberDiff line change
@@ -220,4 +220,110 @@ EnumSystemLocalesW (
220220
return FALSE;
221221
}
222222

223-
EXTERN_C_END
223+
//
224+
// https://github.com/ntoskrnl7/crtsys/issues/23
225+
//
226+
// Windows Kits\10\Include\10.0.22621.0\winrt\wrl\wrappers\corewrappers.h
227+
// Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.34.31721\crt\src\stl\ppltasks.cpp
228+
//
229+
// MutexTraits::Lock, SemaphoreTraits::Lock
230+
//
231+
WINBASEAPI
232+
BOOL
233+
WINAPI
234+
ReleaseSemaphore (
235+
_In_ HANDLE hSemaphore,
236+
_In_ LONG lReleaseCount,
237+
_Out_opt_ LPLONG lpPreviousCount
238+
)
239+
{
240+
KdBreakPoint();
241+
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
242+
return FALSE;
243+
}
244+
245+
WINBASEAPI
246+
BOOL
247+
WINAPI
248+
ReleaseMutex (
249+
_In_ HANDLE hMutex
250+
)
251+
{
252+
KdBreakPoint();
253+
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
254+
return FALSE;
255+
}
256+
257+
#ifdef WINOLEAPI
258+
#undef WINOLEAPI
259+
#endif
260+
#ifdef WINOLEAPI_
261+
#undef WINOLEAPI_
262+
#endif
263+
264+
#ifdef _OLE32_
265+
#define WINOLEAPI STDAPI
266+
#define WINOLEAPI_(type) STDAPI_(type)
267+
#else
268+
269+
#ifdef _68K_
270+
#ifndef REQUIRESAPPLEPASCAL
271+
#define WINOLEAPI EXTERN_C HRESULT PASCAL
272+
#define WINOLEAPI_(type) EXTERN_C type PASCAL
273+
#else
274+
#define WINOLEAPI EXTERN_C PASCAL HRESULT
275+
#define WINOLEAPI_(type) EXTERN_C PASCAL type
276+
#endif
277+
#else
278+
#define WINOLEAPI EXTERN_C HRESULT STDAPICALLTYPE
279+
#define WINOLEAPI_(type) EXTERN_C type STDAPICALLTYPE
280+
#endif
281+
282+
#endif
283+
284+
_Check_return_
285+
WINOLEAPI
286+
CoGetObjectContext(
287+
_In_ REFIID riid,
288+
_Outptr_ LPVOID FAR * ppv
289+
)
290+
{
291+
KdBreakPoint();
292+
return E_NOTIMPL;
293+
}
294+
295+
typedef
296+
enum _APTTYPEQUALIFIER
297+
{
298+
APTTYPEQUALIFIER_NONE = 0,
299+
APTTYPEQUALIFIER_IMPLICIT_MTA = 1,
300+
APTTYPEQUALIFIER_NA_ON_MTA = 2,
301+
APTTYPEQUALIFIER_NA_ON_STA = 3,
302+
APTTYPEQUALIFIER_NA_ON_IMPLICIT_MTA = 4,
303+
APTTYPEQUALIFIER_NA_ON_MAINSTA = 5,
304+
APTTYPEQUALIFIER_APPLICATION_STA = 6,
305+
APTTYPEQUALIFIER_RESERVED_1 = 7
306+
} APTTYPEQUALIFIER;
307+
308+
typedef
309+
enum _APTTYPE
310+
{
311+
APTTYPE_CURRENT = -1,
312+
APTTYPE_STA = 0,
313+
APTTYPE_MTA = 1,
314+
APTTYPE_NA = 2,
315+
APTTYPE_MAINSTA = 3
316+
} APTTYPE;
317+
318+
_Check_return_
319+
WINOLEAPI
320+
CoGetApartmentType(
321+
_Out_ APTTYPE* pAptType,
322+
_Out_ APTTYPEQUALIFIER* pAptQualifier
323+
)
324+
{
325+
KdBreakPoint();
326+
return E_NOTIMPL;
327+
}
328+
329+
EXTERN_C_END

Diff for: src/custom/msvc/143/crt/src/vcruntime/frame_redirect.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
#include <eh.h>
1+
//
2+
// MSVC\14.33.31629\include\eh.h
3+
// _VCRT_COMPILER_PREPROCESSOR가 1이면서 _VCRT_BUILD가 정의되어있어야 unexpected 함수가 정의됩니다.
4+
//
5+
#define _VCRT_COMPILER_PREPROCESSOR 1
6+
#define _VCRT_BUILD
7+
8+
#include <eh.h>
29
#include <ehassert.h>
310
#include <ehdata.h>
411
#include <ehdata4.h>

Diff for: src/custom/msvc/crt.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<CallingConvention>Cdecl</CallingConvention>
1919
</ClCompile>
2020
</ItemGroup>
21-
<ItemGroup Condition="'$(Platform)'=='x64'">
21+
<ItemGroup>
2222
<ClCompile Include="$(MSBuildThisFileDirectory)$(PlatformToolsetVersion)\crt\src\vcruntime\frame_redirect.cpp">
2323
<CallingConvention>Cdecl</CallingConvention>
2424
</ClCompile>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#pragma once
2+
3+
#define __acrt_select_exit_lock() __acrt_exit_lock
4+
5+
#pragma warning(disable : 4101)
6+
#ifdef __cplusplus
7+
8+
extern "C++"
9+
{
10+
namespace __crt_state_management
11+
{
12+
struct scoped_global_state_reset
13+
{
14+
};
15+
16+
const size_t state_index_count = 2;
17+
18+
inline bool initialize_global_state_isolation()
19+
{
20+
return true;
21+
}
22+
23+
inline void uninitialize_global_state_isolation(bool const terminating)
24+
{
25+
terminating;
26+
}
27+
28+
inline int get_current_state_index()
29+
{
30+
return 0;
31+
}
32+
33+
inline int get_current_state_index(__crt_scoped_get_last_error_reset const &last_error_reset)
34+
{
35+
last_error_reset;
36+
return 0;
37+
}
38+
39+
template <typename T> class dual_state_global
40+
{
41+
public:
42+
T &value()
43+
{
44+
return _value[0];
45+
}
46+
47+
T &value_explicit(size_t const current_global_state_index)
48+
{
49+
return _value[current_global_state_index];
50+
}
51+
52+
T &value(__crt_cached_ptd_host &ptd) throw();
53+
54+
T const &value(__crt_cached_ptd_host &ptd) const throw();
55+
56+
void initialize(const T &value)
57+
{
58+
for (size_t i = 0; i != state_index_count; i++)
59+
_value[i] = value;
60+
}
61+
62+
template <typename Ta> void initialize_from_array(Ta (&arr)[2])
63+
{
64+
for (size_t i = 0; i != state_index_count; i++)
65+
_value[i] = arr[i];
66+
}
67+
68+
template <class Fn> void uninitialize(Fn &&fn)
69+
{
70+
for (size_t i = 0; i != state_index_count; i++)
71+
fn(_value[i]);
72+
}
73+
74+
T *const dangerous_get_state_array()
75+
{
76+
return reinterpret_cast<T *const>(&_value);
77+
}
78+
79+
T _value[state_index_count];
80+
};
81+
} // namespace __crt_state_management
82+
}
83+
#endif

Diff for: src/custom/ucrt/10.0.22621.0/inc/nt.h

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#pragma once
2+
3+
#include <windows.h>
4+
#include <peb.h>
5+
#include <teb.h>

Diff for: src/custom/ucrt/10.0.22621.0/inc/ntrtl.h

Whitespace-only changes.

Diff for: src/custom/ucrt/10.0.22621.0/inc/nturtl.h

Whitespace-only changes.

Diff for: src/custom/winsdk/include/um/crtsys/Windows.h

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// winbase.h
1212
#include <wincontypes.h> // consoleapi.h
1313
#include "fileapi.h"
14+
#include "synchapi.h"
1415
#include "processthreadsapi.h"
1516
// winbase.h
1617

Diff for: src/custom/winsdk/include/um/crtsys/combaseapi.h

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#ifndef _CRTSYS_COMBASEAPI
2+
#define _CRTSYS_COMBASEAPI
3+
4+
#pragma once
5+
6+
#undef DECLSPEC_IMPORT
7+
#define DECLSPEC_IMPORT
8+
#include <../um/combaseapi.h>
9+
10+
#endif // _CRTSYS_COMBASEAPI

Diff for: src/custom/winsdk/include/um/crtsys/fileapi.h

+36
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,42 @@
88

99
EXTERN_C_START
1010

11+
WINBASEAPI
12+
DWORD
13+
WINAPI
14+
GetTempPathA(
15+
_In_ DWORD nBufferLength,
16+
_Out_writes_to_opt_(nBufferLength,return + 1) LPSTR lpBuffer
17+
);
18+
19+
WINBASEAPI
20+
DWORD
21+
WINAPI
22+
GetTempPathW(
23+
_In_ DWORD nBufferLength,
24+
_Out_writes_to_opt_(nBufferLength,return + 1) LPWSTR lpBuffer
25+
);
26+
27+
WINBASEAPI
28+
UINT
29+
WINAPI
30+
GetTempFileNameA(
31+
_In_ LPCSTR lpPathName,
32+
_In_ LPCSTR lpPrefixString,
33+
_In_ UINT uUnique,
34+
_Out_writes_(MAX_PATH) LPSTR lpTempFileName
35+
);
36+
37+
WINBASEAPI
38+
UINT
39+
WINAPI
40+
GetTempFileNameW(
41+
_In_ LPCWSTR lpPathName,
42+
_In_ LPCWSTR lpPrefixString,
43+
_In_ UINT uUnique,
44+
_Out_writes_(MAX_PATH) LPWSTR lpTempFileName
45+
);
46+
1147
// ucrt/inc/corecrt_internal.h
1248
WINBASEAPI
1349
BOOL

Diff for: src/custom/winsdk/include/um/crtsys/synchapi.h

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#ifndef _CRTSYS_SYNCHAPI_H_
2+
#define _CRTSYS_SYNCHAPI_H_
3+
4+
#pragma once
5+
6+
#include <apiset.h>
7+
#include <apisetcconv.h>
8+
#include <minwindef.h>
9+
#include <minwinbase.h>
10+
11+
EXTERN_C_START
12+
13+
WINBASEAPI
14+
BOOL
15+
WINAPI
16+
ReleaseSemaphore (
17+
_In_ HANDLE hSemaphore,
18+
_In_ LONG lReleaseCount,
19+
_Out_opt_ LPLONG lpPreviousCount
20+
);
21+
22+
WINBASEAPI
23+
BOOL
24+
WINAPI
25+
ReleaseMutex (
26+
_In_ HANDLE hMutex
27+
);
28+
29+
EXTERN_C_END
30+
31+
#include <../Ldk/synchapi.h>
32+
33+
#endif // _CRTSYS_SYNCHAPI_H_

0 commit comments

Comments
 (0)