может кто объяснить - что надо изменить?
type
TIsPwrShutdownAllowed = function: WordBool; stdcall;
procedure PowerOff;
var
h: integer;
P: TIsPwrShutdownAllowed;
begin
try
if not IsWindowsNT then
Abort;
h := LoadLibrary('powrprof.dll');
if h = 0 then
Abort;
try
Pointer(P) := GetProcAddress(h, 'IsPwrShutdownAllowed');
if not Assigned(P) then
Abort;
if not P then
Abort;
finally
FreeLibrary(h);
end;
ExitWindowsEx(EWX_POWEROFF, 0);
except
ExitWindowsEx(EWX_SHUTDOWN, 0);
end;
end;
Ругается
Error: Operator is not overloaded: not "<procedure variable type of function:WordBool;StdCall>"