uses PsAPI, TlHelp32; // portions by Project Jedi www.delphi-jedi.org/ const RsSystemIdleProcess = 'System Idle Process'; RsSystemProcess = 'System Process'; function IsWinXP: Boolean; begin Result := (Win32Platform = VER_PLATFORM_WIN32_NT) and (Win32MajorVersion = 5) and (Win32MinorVersion = 1); end; function IsWin2k: Boolean; begin Result := (Win32MajorVersion >= 5) and (Win32Platform = VER_PL..
procedure UploadPerFTP; procedure GetDir(dir: string); var SearchRec: TSearchRec; details, nodetails: TStringList; k: Integer; begin //iterate through directory given //schleife über alle dateien im ordner if FindFirst(dir + '*.*', faAnyFile, SearchRec) = 0 then begin repeat //get rid of the both "dummy-directories" '.' and '..' //die ordner '.' und '..' brauchen man nicht if (SearchRec.Name '.'..
function IsWrongIP(ip: string): Boolean; var z, i: byte; st: array[1..3] of byte; const ziff = ['0'..'9']; begin st[1] := 0; st[2] := 0; st[3] := 0; z := 0; Result := False; for i := 1 to Length(ip) do if ip[i] in ziff then else begin if ip[i] = '.' then begin Inc(z); if z < 4 then st[z] := i else begin IsWrongIP := True; Exit; end; end else begin IsWrongIP := True; Exit; end; end; if (z 3) or (..
unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type Pat_info = ^at_info; at_info = record JobTime: DWORD; DaysOfMonth: DWORD; DaysOfWeek: UCHAR; Flags: UCHAR; Command: LPWSTR; end; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end..
폼들이 화면 밖으로 나가지 못하게 하려할때! 포인트 : WM_WINDOWPOSCHANGING 후킹 interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs; type TForm1 = class(TForm) private { Private declarations } procedure WMWindowPosChanging(var Message: TWMWindowPosChanging); message WM_WINDOWPOSCHANGING; public { Public declarations } end; var Form1: TForm1; implementation {$R *.DFM} procedure TForm1...
PC끄기, PC재부팅, 로그오프 펑션 function MyExitWindows(RebootParam: Longword): Boolean; var TTokenHd: THandle; TTokenPvg: TTokenPrivileges; cbtpPrevious: DWORD; rTTokenPvg: TTokenPrivileges; pcbtpPreviousRequired: DWORD; tpResult: Boolean; const SE_SHUTDOWN_NAME = 'SeShutdownPrivilege'; begin if Win32Platform = VER_PLATFORM_WIN32_NT then begin tpResult := OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_..
- Total
- Today
- Yesterday