diff options
Diffstat (limited to 'samples/simple/sleep5.cpp')
-rw-r--r-- | samples/simple/sleep5.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/samples/simple/sleep5.cpp b/samples/simple/sleep5.cpp new file mode 100644 index 0000000..bb28226 --- /dev/null +++ b/samples/simple/sleep5.cpp @@ -0,0 +1,29 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Detours Test Program (sleep5.cpp of sleep5.exe) +// +// Microsoft Research Detours Package +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// + +#include <windows.h> +#include <stdio.h> +#include <stdlib.h> + +int __cdecl main(int argc, char ** argv) +{ + if (argc == 2) { + Sleep(atoi(argv[1]) * 1000); + } + else { + printf("sleep5.exe: Starting.\n"); + + Sleep(5000); + + printf("sleep5.exe: Done sleeping.\n"); + } + return 0; +} +// +///////////////////////////////////////////////////////////////// End of File. |