Skip to content

Commit 2b8301b

Browse files
[KERNEL32_VISTA] add required functions for winhttp
1 parent 03ec8fa commit 2b8301b

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

dll/win32/kernel32/kernel32_vista/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ list(APPEND SOURCE
2121
LocaleNameToLCID.c
2222
SetThreadDescription.c
2323
sync.c
24+
threadpool.c
2425
vista.c)
2526

2627
# These functions are not exported from kernel32_vista (yet).

dll/win32/kernel32/kernel32_vista/kernel32_vista.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,5 @@
5959

6060
@ stdcall GetNamedPipeClientProcessId(ptr ptr)
6161
@ stdcall SetThreadDescription(ptr wstr) # Win 10
62+
@ stdcall TrySubmitThreadpoolCallback(ptr ptr ptr)
63+
@ stdcall FreeLibraryWhenCallbackReturns(ptr ptr) ntdll.TpCallbackUnloadDllOnCompletion
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include "k32_vista.h"
2+
3+
extern BOOL WINAPI DECLSPEC_HOTPATCH TpSimpleTryPost( PTP_SIMPLE_CALLBACK callback, PVOID userdata,
4+
TP_CALLBACK_ENVIRON *environment );
5+
/***********************************************************************
6+
* TrySubmitThreadpoolCallback (kernelbase.@)
7+
*/
8+
BOOL WINAPI DECLSPEC_HOTPATCH TrySubmitThreadpoolCallback( PTP_SIMPLE_CALLBACK callback, PVOID userdata,
9+
TP_CALLBACK_ENVIRON *environment )
10+
{
11+
NTSTATUS status = TpSimpleTryPost( callback, userdata, environment );
12+
if (!NT_SUCCESS(status))
13+
{
14+
SetLastError(RtlNtStatusToDosError(status));
15+
return FALSE;
16+
}
17+
18+
return TRUE;
19+
}

0 commit comments

Comments
 (0)