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