Skip to content

Commit

Permalink
win: prevent node from running on Windows Vista or earlier
Browse files Browse the repository at this point in the history
Ref: #3804

PR-URL: #5167
Reviewed-By: rvagg - Rod Vagg <rod@vagg.org>
Reviewed-By: joaocgreis - João Reis <reis@janeasystems.com>
  • Loading branch information
orangemocha committed Mar 18, 2016
1 parent 55db190 commit 1cf26c0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/node_main.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
#include "node.h"

#ifdef _WIN32
#include <VersionHelpers.h>

int wmain(int argc, wchar_t *wargv[]) {
if (!IsWindows7OrGreater()) {
fprintf(stderr, "This application is only supported on Windows 7, "
"Windows Server 2008 R2, or higher.");
exit(1);
}

// Convert argv to to UTF8
char** argv = new char*[argc];
for (int i = 0; i < argc; i++) {
Expand Down

0 comments on commit 1cf26c0

Please sign in to comment.