谁能帮我做这样一个东西:<br>1。运行时不出现在桌面和任务栏上。<br> function RegisterServiceProcess(dwProcessID, dwType: Integer): Integer; <br> stdcall; external 'KERNEL32.DLL';<br>implementation<br> RegisterServiceProcess(GetCurrentProcessID, 1); <br><br>2。if 按下回车键 and 拨号网络在运行 then<br> 10钟后 nt4.0重启动<br><br>拨号网络在运行<br> RAS函数RasEnumConnections枚举当前拨号连接。<br>var<br> conEntries: Array[1..20] of TRasConn;<br> Stat: TRasConnStatus;<br> bufSize :LongInt;<br> numConEntries: Longint;<br>begin<br> conEntries[1].dwSize := SizeOf(TRasConn);<br> bufSize := SizeOf(TRasConn) * 100;<br> FillChar(Stat, Sizeof(TRasConnStatus), 0);<br> Stat.dwSize := Sizeof(TRasConnStatus);<br> numConEntries := 10 ;<br> if RasEnumConnections(@conEntries[1], bufSize, numConEntries)=0 then begin<br> showmessage(inttostr(numConEntries)) ;<br> end;<br>end; <br><br> WinInet函数InternetCheckConnection和InternetQueryOption检查Internet连接也行。<br> if InternetCheckConnection('http://www.yahoo.com/', 1, 0) then<br> ShowMessage( 'Connected')<br> else<br> ShowMessage( 'Disconnected');<br><br>function TForm1.CheckOffline: boolean;<br>var<br> ConnectState: DWORD;<br> StateSize: DWORD;<br>begin<br> ConnectState:= 0;<br> StateSize:= SizeOf(ConnectState);<br> result:= false;<br>if InternetQueryOption(nil, INTERNET_OPTION_CONNECTED_STATE, @ConnectState, StateSize) then<br> if (ConnectState and INTERNET_STATE_DISCONNECTED) <> 2 then result:= true;<br>end;<br><br>NT4.0重启动,需要先取得权限<br> TOKEN_PRIVILEGES NewState; <br> DWORD ProcessId, ReturnLength = 0; <br> LUID luidPrivilegeLUID; <br> ProcessId = GetCurrentProcessId(); <br> hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, ProcessId); <br> OpenProcessToken(hProcess, TOKEN_ADJUST_PRIVILEGES, &hToken); <br> LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, &luidPrivilegeLUID); <br> NewState.PrivilegeCount = 1; <br> NewState.Privileges[0].Luid = luidPrivilegeLUID; <br> NewState.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; <br> if(AdjustTokenPrivileges(hToken, FALSE, &NewState, NULL, NULL, NULL)) */<br> ExitWindowsEx(EWX_FORCE | EWX_REBOOT, 0); (VC实现)<br>