1 /**
2  * Windows API header module
3  *
4  * Translated from MinGW Windows headers
5  *
6  * Authors: Stewart Gordon
7  * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
8  * Source: $(DRUNTIMESRC core/sys/windows/_intshcut.d)
9  */
10 /// Automatically imported and edited from the druntime module
11 /// core.sys.windows.intshcut for the auto-generated win32 package.
12 module win32.intshcut;
13 //version (Windows):
14 @system:
15 
16 version (ANSI) {} else version = Unicode;
17 
18 import win32.unknwn, win32.windef;
19 
20 enum : SCODE {
21     E_FLAGS                     = 0x80041000,
22       // = MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x1000)
23     URL_E_INVALID_SYNTAX        = 0x80041001,
24       // = MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x1001)
25     URL_E_UNREGISTERED_PROTOCOL = 0x80041002, // etc.
26     IS_E_EXEC_FAILED            = 0x80042002
27 }
28 
29 enum IURL_SETURL_FLAGS {
30     IURL_SETURL_FL_GUESS_PROTOCOL = 1,
31     IURL_SETURL_FL_USE_DEFAULT_PROTOCOL,
32     ALL_IURL_SETURL_FLAGS
33 }
34 
35 enum IURL_INVOKECOMMAND_FLAGS {
36     IURL_INVOKECOMMAND_FL_ALLOW_UI = 1,
37     IURL_INVOKECOMMAND_FL_USE_DEFAULT_VERB,
38     ALL_IURL_INVOKECOMMAND_FLAGS
39 }
40 
41 enum TRANSLATEURL_IN_FLAGS {
42     TRANSLATEURL_FL_GUESS_PROTOCOL = 1,
43     TRANSLATEURL_FL_USE_DEFAULT_PROTOCOL,
44     ALL_TRANSLATEURL_FLAGS
45 }
46 
47 enum URLASSOCIATIONDIALOG_IN_FLAGS {
48     URLASSOCDLG_FL_USE_DEFAULT_NAME = 1,
49     URLASSOCDLG_FL_REGISTER_ASSOC,
50     ALL_URLASSOCDLG_FLAGS
51 }
52 
53 enum MIMEASSOCIATIONDIALOG_IN_FLAGS {
54     MIMEASSOCDLG_FL_REGISTER_ASSOC = 1,
55     ALL_MIMEASSOCDLG_FLAGS         = MIMEASSOCDLG_FL_REGISTER_ASSOC
56 }
57 
58 struct URLINVOKECOMMANDINFO {
59     DWORD dwcbSize = URLINVOKECOMMANDINFO.sizeof;
60     DWORD dwFlags;
61     HWND  hwndParent;
62     PCSTR pcszVerb;
63 }
64 alias URLINVOKECOMMANDINFO CURLINVOKECOMMANDINFO;
65 alias URLINVOKECOMMANDINFO* PURLINVOKECOMMANDINFO, PCURLINVOKECOMMANDINFO;
66 
67 interface IUniformResourceLocator : IUnknown {
68     HRESULT SetURL(PCSTR, DWORD);
69     HRESULT GetURL(PSTR*);
70     HRESULT InvokeCommand(PURLINVOKECOMMANDINFO);
71 }
72 //alias typeof(*(IUniformResourceLocator.init)) CIUniformResourceLocator; // value-type of interface not representable in D
73 alias IUniformResourceLocator PIUniformResourceLocator,
74   PCIUniformResourceLocator;
75 
76 extern (Windows) {
77     BOOL InetIsOffline(DWORD);
78     HRESULT MIMEAssociationDialogA(HWND, DWORD, PCSTR, PCSTR, PSTR, UINT);
79     HRESULT MIMEAssociationDialogW(HWND, DWORD, PCWSTR, PCWSTR, PWSTR, UINT);
80     HRESULT TranslateURLA(PCSTR, DWORD, PSTR*);
81     HRESULT TranslateURLW(PCWSTR, DWORD, PWSTR*);
82     HRESULT URLAssociationDialogA(HWND, DWORD, PCSTR, PCSTR, PSTR, UINT);
83     HRESULT URLAssociationDialogW(HWND, DWORD, PCWSTR, PCWSTR, PWSTR, UINT);
84 }
85 
86 version (Unicode) {
87     alias TranslateURLW TranslateURL;
88     alias MIMEAssociationDialogW MIMEAssociationDialog;
89     alias URLAssociationDialogW URLAssociationDialog;
90 } else {
91     alias TranslateURLA TranslateURL;
92     alias MIMEAssociationDialogA MIMEAssociationDialog;
93     alias URLAssociationDialogA URLAssociationDialog;
94 }