2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
4 * All source code herein is the property of Volition, Inc. You may not sell
5 * or otherwise commercially exploit the source or things you created based on
11 #define WIN32_LEAN_AND_MEAN
17 int platform_open_url(const char *url)
21 // make sure it's a valid www address
22 if ( !SDL_strncasecmp(url, "http://", 7) || !SDL_strncasecmp(url, "https://", 8) ) {
23 SDL_strlcpy(s_url, url, SDL_arraysize(s_url));
25 SDL_strlcpy(s_url, "http://", SDL_arraysize(s_url));
26 SDL_strlcat(s_url, url, SDL_arraysize(s_url));
29 int rval = (int) ShellExecute(NULL, "open", s_url, NULL, NULL, SW_SHOW);
34 case ERROR_BAD_FORMAT:
35 case SE_ERR_ACCESSDENIED:
36 case SE_ERR_ASSOCINCOMPLETE:
39 case SE_ERR_DDETIMEOUT:
40 case SE_ERR_DLLNOTFOUND:
44 case ERROR_FILE_NOT_FOUND:
45 case ERROR_PATH_NOT_FOUND: