diff --git a/sleeper/sleeper.C b/sleeper/sleeper.C index faf5955459..e30d5d0674 100644 --- a/sleeper/sleeper.C +++ b/sleeper/sleeper.C @@ -1,9 +1,22 @@ #include "util.h" #include "boinc_api.h" -int main() { +int main(int, char**) { boinc_init(); while (1) { boinc_sleep(1); } } + +#ifdef _WIN32 + +int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR Args, int WinMode) { + LPSTR command_line; + char* argv[100]; + int argc; + + command_line = GetCommandLine(); + argc = parse_command_line( command_line, argv ); + return main(argc, argv); +} +#endif \ No newline at end of file diff --git a/win_build/samples.sln b/win_build/samples.sln index 2a61c8a86e..08acdab104 100644 --- a/win_build/samples.sln +++ b/win_build/samples.sln @@ -28,6 +28,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "upper_case", "upper_case.vc {5F065EAC-B881-4E9A-9E34-7A21D7A01D98} = {5F065EAC-B881-4E9A-9E34-7A21D7A01D98} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sleeper", "sleeper.vcproj", "{8281D898-0E64-44EB-8356-4F0336F19A35}" + ProjectSection(ProjectDependencies) = postProject + {0BC1DB36-030A-4321-B387-1CEE2611E329} = {0BC1DB36-030A-4321-B387-1CEE2611E329} + {E8F6BD7E-461A-4733-B7D8-37B09A099ED8} = {E8F6BD7E-461A-4733-B7D8-37B09A099ED8} + EndProjectSection +EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug @@ -58,6 +64,10 @@ Global {8281D898-0E64-44EB-8356-4F0336F19A35}.Debug.Build.0 = Debug|Win32 {8281D898-0E64-44EB-8356-4F0336F19A35}.Release.ActiveCfg = Release|Win32 {8281D898-0E64-44EB-8356-4F0336F19A35}.Release.Build.0 = Release|Win32 + {8281D898-0E64-44EB-8356-4F0336F19A35}.Debug.ActiveCfg = Debug|Win32 + {8281D898-0E64-44EB-8356-4F0336F19A35}.Debug.Build.0 = Debug|Win32 + {8281D898-0E64-44EB-8356-4F0336F19A35}.Release.ActiveCfg = Release|Win32 + {8281D898-0E64-44EB-8356-4F0336F19A35}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/win_build/sleeper.vcproj b/win_build/sleeper.vcproj new file mode 100644 index 0000000000..466ac85fdf --- /dev/null +++ b/win_build/sleeper.vcproj @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +