TLama

Untitled

Apr 14th, 2013
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.88 KB | None | 0 0
  1. function InstallScreenSaverA(hWindow: HWND; hInstance: HINST;
  2.   pszFile: PAnsiChar; nCmdShow: UINT): BOOL; stdcall;
  3.   external 'desk.cpl' name 'InstallScreenSaverA';
  4. function InstallScreenSaverW(hWindow: HWND; hInstance: HINST;
  5.   pszFile: PWideChar; nCmdShow: UINT): BOOL; stdcall;
  6.   external 'desk.cpl' name 'InstallScreenSaverW';
  7. {$IFNDEF UNICODE}
  8. function InstallScreenSaver(hWindow: HWND; hInstance: HINST;
  9.   pszFile: PAnsiChar; nCmdShow: UINT): BOOL; stdcall;
  10.   external 'desk.cpl' name 'InstallScreenSaverA';
  11. {$ELSE}
  12. function InstallScreenSaver(hWindow: HWND; hInstance: HINST;
  13.   pszFile: PWideChar; nCmdShow: UINT): BOOL; stdcall;
  14.   external 'desk.cpl' name 'InstallScreenSaverW';
  15. {$ENDIF UNICODE}
  16.  
  17. function InstallScreenSaverEx(const AFileName: string): Boolean;
  18. begin
  19.   Result := InstallScreenSaver(Application.Handle, MainInstance,
  20.     PChar(AFileName), SW_SHOWNORMAL);
  21. end;
Advertisement
Add Comment
Please, Sign In to add comment