Вниз
Скачать: CL | DM;

Worse, it is a general bug!   Найти похожие ветки 

 
thaddy   (2005-10-19 19:58) [0]

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:03) [1]



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;


 
thaddy   (2005-10-19 20:06) [2]

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;



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.039 c
2-1150726284
Кефир87
2006-06-19 18:11
2006.07.09
HELP!!! OVERLAY.TPU


4-1143988223
spyrytus
2006-04-02 18:30
2006.07.09
Как запустить программу с грифом SYSTEM


11-1129639726
Alextp
2005-10-18 16:48
2006.07.09
Как сделать default-кнопку?


5-1135002673
Afonya
2005-12-19 17:31
2006.07.09
Добавления компонента в IDE (через создание пакета)


2-1150781796
SkyRanger
2006-06-20 09:36
2006.07.09
Адресация элемента двумерного массива




   Наверх