blob: f3a06b6dff86291beeb02086ad75abb1dfecf43b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/** \file
* \brief Windows Driver IupHelp
*
* See Copyright Notice in "iup.h"
*/
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
#include <shellapi.h>
#include "iup.h"
int IupHelp(const char* url)
{
int err = (int)ShellExecute(GetDesktopWindow(), "open", url, NULL, NULL, SW_SHOWNORMAL);
if (err <= 32)
{
switch (err)
{
case ERROR_FILE_NOT_FOUND:
case ERROR_PATH_NOT_FOUND:
return -2; /* File not found */
break;
default:
return -1; /* Generic error */
break;
}
}
return 1;
}
|