Hello,
For some reason the definition of Windows user32 API,
GetGUIDThreadInfo GetGUIThreadInfo in redef.inc is commented out. This is a problem when attempting to use the function.
The function and the structure it uses could be defined as follows (parallel to MSDN):
type
PGUITHREADINFO = ^TGUITHREADINFO;
TGUITHREADINFO = record
cbSize : DWORD; { must be initialized before the call }
flags : DWORD;
hwndActive : HWND;
hwndFocus : HWND;
hwndCapture : HWND;
hwndMenuOwner : HWND;
hwndMoveSize : HWND;
hwndCaret : HWND;
rcCaret : TRECT;
end;
function GetGUIThreadInfo
(
InThreadId : DWORD;
InoutGuiThreadInfo : PGUITHREADINFO
)
: BOOL; stdcall; external 'user32';
function GetGUIThreadInfo
(
InThreadId : DWORD;
var InoutGuiThreadInfo : TGUITHREADINFO
)
: BOOL; stdcall; external 'user32'; overload;
the first definition exactly mirrors the C definition. The second definition is "Pascalish" in that it uses "var" (which in this case is appropriate since the structure must be initialized before being used.)
HTH.
ETA:Corrected the function's name.