S skyhacker Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-10 #1 要求:开机自动运行(后台,按DEL+CTRL+ALT看不到),监视系统,如果a.txt被修改,当修改保存后,自动马上恢 复为原来的内容。 我有急用,请各位快点好吗!
无 无疯无禄 Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-10 #2 Fyx (2001-1-13 14:13:00) RegisterServiceProcess(GetCurrentProcessID, 1)在Nt下是不能用,那就这样做,98和NT都能用: type TRegisterServiceProcess = function (dwProcessID, dwTypeWord) : DWORD; stdcall; {$R *.DFM} procedure TForm1.FormCreate(Sender: TObject); var H :THandle; RegisterServiceProcess: TRegisterServiceProcess; begin H:=LoadLibrary('KERNEL32.DLL'); RegisterServiceProcess:=GetProcAddress(H, 'RegisterServiceProcess'); RegisterServiceProcess (GetCurrentProcessID, 1); FreeLibrary(H); end;
Fyx (2001-1-13 14:13:00) RegisterServiceProcess(GetCurrentProcessID, 1)在Nt下是不能用,那就这样做,98和NT都能用: type TRegisterServiceProcess = function (dwProcessID, dwTypeWord) : DWORD; stdcall; {$R *.DFM} procedure TForm1.FormCreate(Sender: TObject); var H :THandle; RegisterServiceProcess: TRegisterServiceProcess; begin H:=LoadLibrary('KERNEL32.DLL'); RegisterServiceProcess:=GetProcAddress(H, 'RegisterServiceProcess'); RegisterServiceProcess (GetCurrentProcessID, 1); FreeLibrary(H); end;