![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Worse, it is a general bug!
thaddy © (2005-10-19 19:58:00)Vladimir,
My previous post hints to a far more serious issue:
The use of GetThreadPriorityBoost break win9X compatibility!
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I suggest:
if (WinVer => WvNT) and (GetThreadPriorityBoost( fHandle, B )) then
Result := B;
thaddy (2005-10-19 20:06:00) [1]Sorry, I have a flue:
function TThread.GetPriorityBoost: Boolean;
var B: Bool;
begin
Result := TRUE;
if fHandle = 0 then Exit;
if (WinVer >= WvNT) then // only evaluate if this is true, regardless of evaluation settings
if GetThreadPriorityBoost( fHandle, B ) then
Result := B;
end;
procedure TThread.SetPriorityBoost(const Value: Boolean);
begin
if fHandle = 0 then Exit;
if WinVer >= WvNT then
SetThreadPriorityBoost( fHandle, not Value );
end;
thaddy (2005-10-19 20:03:00) [2]
function TThread.GetPriorityBoost: Boolean;
var B: Bool;
begin
Result := TRUE;
if fHandle = 0 then Exit;
if (WinVer >= WvNT) and GetThreadPriorityBoost( fHandle, B ) then
Result := B;
end;
procedure TThread.SetPriorityBoost(const Value: Boolean);
begin
if fHandle = 0 then Exit;
if (WinVer >= WvNT) and SetThreadPriorityBoost( fHandle, not Value );
end;