Поддерживает ли система hibernation? |
Previous Top Next |
Code: |
function HibernateAllowed: Boolean; type TIsPwrHibernateAllowed = function: Boolean; stdcall; var hPowrprof: HMODULE; IsPwrHibernateAllowed: TIsPwrHibernateAllowed; begin Result := False; if IsNT4Or95 then Exit; hPowrprof := LoadLibrary('powrprof.dll'); if hPowrprof <> 0 then begin try @IsPwrHibernateAllowed := GetProcAddress(hPowrprof, 'IsPwrHibernateAllowed'); if @IsPwrHibernateAllowed <> nil then begin Result := IsPwrHibernateAllowed; end; finally FreeLibrary(hPowrprof); end; end; end; |
©Drkb::01702
Взято с сайта http://www.swissdelphicenter.ch/en/tipsindex.php