⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 useexitwindll.pas

📁 可以定时开关机
💻 PAS
字号:

unit useexitwindll;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type

  TPowerOffWin = function :boolean;stdcall;
  TLogOffWin = function : boolean;stdcall;
  TReStarWin = function : boolean;stdcall;

function ReStarWin:boolean;
function LogOffWin:boolean;
function PowerOffWin:boolean;

function pvInitMp3(hInstance, hWnd, DisplayW, DisplayH, bands: integer): integer; stdcall; external 'playmp3.dll';
        //free. MUST call this before exit
        procedure pvFreeMp3; stdcall; external 'playmp3.dll';
        //get the frequence and length of mp3
        procedure pvGetMp3Info(pFileName: PChar; pFreq, pLen: pointer); stdcall; external 'playmp3.dll';
        //play mp3
        function pvPlayMp3(pFileName: PChar): integer; stdcall; external 'playmp3.dll';
        //stop mp3
        procedure pvStopMp3; stdcall; external 'playmp3.dll';
        //pasue mp3
        procedure pvPauseMp3; stdcall; external 'playmp3.dll';
        //resume mp3
        procedure pvResumeMp3; stdcall; external 'playmp3.dll';
implementation

var
pPowerOffWin,pLogOffWin,pReStarWin:TFarProc;
hdll:THANDLE;
//MP3 Dll

function PowerOffWin:boolean;
begin
  result := TPowerOffWin(pPoweroffWin);
end;

function LogOffWin:boolean;
begin
  result := TLogOffWin(pLogOffWin);
end;

function ReStarWin:boolean;
begin
  result := TReStarWin(pReStarWin);
end;
begin
hdll          := Cardinal(NIL);
hdll          := LoadLibrary('exitwindll.dll');
pPowerOffWin  := GetProcAddress(hdll,'PowerOffWin');
pLogOffWin    := GetProcAddress(hdll,'LogOffWin');
pReStarWin    := GetProcAddress(hdll,'ReStarWin');
     //freeLibrary(hdll);
end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -