* also add other threadpool functions

(cherry picked from commit 53d745962f)
This commit is contained in:
marcoonthegit 2022-08-09 11:27:23 +02:00
parent 0f6deab1d9
commit ea5ac5bbf0
2 changed files with 14 additions and 0 deletions

View File

@ -54,6 +54,10 @@
WINBOOL = longbool;
BOOL = WINBOOL;
// newer APIs (e.g. threadpool) have this:
// can't find exact true/false conventions here, so for now keep it byte
WINAPIBOOLEAN = Byte;
CALTYPE = cardinal;
CALID = cardinal;
@ -750,6 +754,8 @@
PFNPROCESSPOLICIES = function (_para1:HWND; _para2:LPCTSTR; _para3:LPCTSTR; _para4:LPCTSTR; _para5:DWORD):WINBOOL;stdcall;
TIMEFMT_ENUMPROCEX = function (TimeFormat : LPWSTR; AppData : LPARAM) : BOOL; stdcall;
WAITORTIMERCALLBACK = procedure (arg1:PVoid;arg2:WINAPIBOOLEAN); stdcall;
(* Not convertable by H2PAS
#define SECURITY_NULL_SID_AUTHORITY {0,0,0,0,0,0}
#define SECURITY_WORLD_SID_AUTHORITY {0,0,0,0,0,1}

View File

@ -1330,7 +1330,15 @@ function CONSOLE_REAL_OUTPUT_HANDLE : HANDLE;
function RealChildWindowFromPoint(Parent : HWND; Pt : TPOINT): HWND; stdcall; external 'user32.dll' name 'RealChildWindowFromPoint';
function GetGuiResources(ProcessHandle : THANDLE; ResourceType : DWORD): DWORD; stdcall; external 'user32.dll' name 'GetGuiResources';
function SendInput(InputsCount : UINT; InputsPtr : PINPUT; Size : WINT) : UINT; stdcall; external 'user32.dll' name 'SendInput';
// legacy threadpool
function QueueUserWorkItem(func: LPTHREAD_START_ROUTINE; Context: pointer; Flags: ULONG): BOOL; stdcall; external 'kernel32' name 'QueueUserWorkItem';
function UnregisterWaitEx(WaitHandle : THandle; CompletionEvent : THandle):WinBool; stdcall; external 'kernel32.dll' name 'UnregisterWaitEx';
function CreateTimerQueue : THandle; stdcall; external 'kernel32.dll' name 'CreateTimerQueue';
function CreateTimerQueueTimer(phNewTimer:PHandle;TimerQueue:THandle;Callback:WAITORTIMERCALLBACK;Parameter:PVOID;DueTime,Period : DWord;Flags:ULong) : THandle; stdcall; external 'kernel32.dll' name 'CreateTimerQueueTimer';
function ChangeTimerQueueTimer(TimerQueue:THandle;Timer:THandle;DueTime,Period : DWord) : BOOL; stdcall; external 'kernel32.dll' name 'ChangeTimerQueueTimer';
function DeleteTimerQueueTimer(TimerQueue:THandle;Timer:THandle;CompletionEvent: THandle) : BOOL; stdcall; external 'kernel32.dll' name 'DeleteTimerQueueTimer';
function DeleteTimerQueueEx(TimerQueue:THandle;CompletionEvent: THandle) : BOOL; stdcall; external 'kernel32.dll' name 'DeleteTimerQueueEx';
// only in widechar variant.
function GetDateFormatEx(LocaleName : pwidechar;Flags : DWORD;Date : PSYSTEMTIME; Format : pwidechar; DateBuffer : pwidechar; BufferLen : longint; Calendar : pwidechar) : BOOL; stdcall; external 'kernel32' name 'GetDateFormatEx';