Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
608 B

  1. #include <nt.h>
  2. #include <ntrtl.h>
  3. #include <stdlib.h>
  4. #define SecToNano(_sec) (LONGLONG)((_sec) * 1000 * 1000 * 10)
  5. int __cdecl
  6. main(
  7. int argc,
  8. char** argv,
  9. char** envp,
  10. ULONG DebugParameter
  11. )
  12. {
  13. LARGE_INTEGER TimeOut;
  14. ULONG Seconds;
  15. if (argc == 2) {
  16. Seconds = atol(argv[1]);
  17. } else {
  18. Seconds = 60;
  19. }
  20. DbgPrint( "Delaying boot for [%d] seconds\n", Seconds );
  21. TimeOut.QuadPart = -SecToNano(Seconds);
  22. NtDelayExecution( 0, &TimeOut );
  23. DbgPrint( "Resuming boot...\n" );
  24. return 0;
  25. }