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

#include <nt.h>
#include <ntrtl.h>
#include <stdlib.h>
#define SecToNano(_sec) (LONGLONG)((_sec) * 1000 * 1000 * 10)
int __cdecl
main(
int argc,
char** argv,
char** envp,
ULONG DebugParameter
)
{
LARGE_INTEGER TimeOut;
ULONG Seconds;
if (argc == 2) {
Seconds = atol(argv[1]);
} else {
Seconds = 60;
}
DbgPrint( "Delaying boot for [%d] seconds\n", Seconds );
TimeOut.QuadPart = -SecToNano(Seconds);
NtDelayExecution( 0, &TimeOut );
DbgPrint( "Resuming boot...\n" );
return 0;
}