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
19 int platform_open_url(const char *url)
23 // make sure it's a valid www address
24 if ( !SDL_strncasecmp(url, "http://", 7) || !SDL_strncasecmp(url, "https://", 8) ) {
25 SDL_strlcpy(s_url, url, SDL_arraysize(s_url));
27 SDL_strlcpy(s_url, "http://", SDL_arraysize(s_url));
28 SDL_strlcat(s_url, url, SDL_arraysize(s_url));
31 int rval = (int) ShellExecute(NULL, (LPCTSTR)"open", (LPCTSTR)s_url, NULL, NULL, SW_SHOW);
36 case ERROR_BAD_FORMAT:
37 case SE_ERR_ACCESSDENIED:
38 case SE_ERR_ASSOCINCOMPLETE:
41 case SE_ERR_DDETIMEOUT:
42 case SE_ERR_DLLNOTFOUND:
46 case ERROR_FILE_NOT_FOUND:
47 case ERROR_PATH_NOT_FOUND: