1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 #ifndef __INTSHCUT_H__ 7 #define __INTSHCUT_H__ 8 9 #include <_mingw_unicode.h> 10 #include <isguids.h> 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 #ifdef _INTSHCUT_ 17 #define INTSHCUTAPI 18 #else 19 #define INTSHCUTAPI DECLSPEC_IMPORT 20 #endif 21 22 #define E_FLAGS MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x1000) 23 #define IS_E_EXEC_FAILED MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x2002) 24 #define URL_E_INVALID_SYNTAX MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x1001) 25 #define URL_E_UNREGISTERED_PROTOCOL MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x1002) 26 27 typedef enum iurl_seturl_flags { 28 IURL_SETURL_FL_GUESS_PROTOCOL = 0x0001,IURL_SETURL_FL_USE_DEFAULT_PROTOCOL = 0x0002 29 } IURL_SETURL_FLAGS; 30 31 typedef enum iurl_invokecommand_flags { 32 IURL_INVOKECOMMAND_FL_ALLOW_UI = 0x0001,IURL_INVOKECOMMAND_FL_USE_DEFAULT_VERB = 0x0002,IURL_INVOKECOMMAND_FL_DDEWAIT = 0x0004 33 } IURL_INVOKECOMMAND_FLAGS; 34 35 typedef struct urlinvokecommandinfoA { 36 DWORD dwcbSize; 37 DWORD dwFlags; 38 HWND hwndParent; 39 LPCSTR pcszVerb; 40 } URLINVOKECOMMANDINFOA; 41 42 typedef URLINVOKECOMMANDINFOA *PURLINVOKECOMMANDINFOA; 43 typedef const URLINVOKECOMMANDINFOA CURLINVOKECOMMANDINFOA; 44 typedef const URLINVOKECOMMANDINFOA *PCURLINVOKECOMMANDINFOA; 45 46 typedef struct urlinvokecommandinfoW { 47 DWORD dwcbSize; 48 DWORD dwFlags; 49 HWND hwndParent; 50 LPCWSTR pcszVerb; 51 } URLINVOKECOMMANDINFOW; 52 53 typedef URLINVOKECOMMANDINFOW *PURLINVOKECOMMANDINFOW; 54 typedef const URLINVOKECOMMANDINFOW CURLINVOKECOMMANDINFOW; 55 typedef const URLINVOKECOMMANDINFOW *PCURLINVOKECOMMANDINFOW; 56 57 #define URLINVOKECOMMANDINFO __MINGW_NAME_AW(URLINVOKECOMMANDINFO) 58 #define PURLINVOKECOMMANDINFO __MINGW_NAME_AW(PURLINVOKECOMMANDINFO) 59 #define CURLINVOKECOMMANDINFO __MINGW_NAME_AW(CURLINVOKECOMMANDINFO) 60 #define PCURLINVOKECOMMANDINFO __MINGW_NAME_AW(PCURLINVOKECOMMANDINFO) 61 62 #undef INTERFACE 63 #define INTERFACE IUniformResourceLocatorA 64 65 DECLARE_INTERFACE_(IUniformResourceLocatorA,IUnknown) { 66 STDMETHOD(QueryInterface)(THIS_ REFIID riid,PVOID *ppvObject) PURE; 67 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 68 STDMETHOD_(ULONG,Release)(THIS) PURE; 69 STDMETHOD(SetURL)(THIS_ LPCSTR pcszURL,DWORD dwInFlags) PURE; 70 STDMETHOD(GetURL)(THIS_ LPSTR *ppszURL) PURE; 71 STDMETHOD(InvokeCommand)(THIS_ PURLINVOKECOMMANDINFOA purlici) PURE; 72 }; 73 74 #undef INTERFACE 75 #define INTERFACE IUniformResourceLocatorW 76 DECLARE_INTERFACE_(IUniformResourceLocatorW,IUnknown) { 77 STDMETHOD(QueryInterface)(THIS_ REFIID riid,PVOID *ppvObject) PURE; 78 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 79 STDMETHOD_(ULONG,Release)(THIS) PURE; 80 STDMETHOD(SetURL)(THIS_ LPCWSTR pcszURL,DWORD dwInFlags) PURE; 81 STDMETHOD(GetURL)(THIS_ LPWSTR *ppszURL) PURE; 82 STDMETHOD(InvokeCommand)(THIS_ PURLINVOKECOMMANDINFOW purlici) PURE; 83 }; 84 85 #define IUniformResourceLocator __MINGW_NAME_AW(IUniformResourceLocator) 86 87 #define IUniformResourceLocatorVtbl __MINGW_NAME_AW_EXT(IUniformResourceLocator,Vtbl) 88 89 typedef IUniformResourceLocator *PIUniformResourceLocator; 90 typedef const IUniformResourceLocator CIUniformResourceLocator; 91 typedef const IUniformResourceLocator *PCIUniformResourceLocator; 92 93 typedef enum translateurl_in_flags { 94 TRANSLATEURL_FL_GUESS_PROTOCOL = 0x0001,TRANSLATEURL_FL_USE_DEFAULT_PROTOCOL = 0x0002 95 } TRANSLATEURL_IN_FLAGS; 96 97 INTSHCUTAPI HRESULT WINAPI TranslateURLA(PCSTR pcszURL,DWORD dwInFlags,PSTR *ppszTranslatedURL); 98 INTSHCUTAPI HRESULT WINAPI TranslateURLW(PCWSTR pcszURL,DWORD dwInFlags,PWSTR UNALIGNED *ppszTranslatedURL); 99 100 #define TranslateURL __MINGW_NAME_AW(TranslateURL) 101 102 typedef enum urlassociationdialog_in_flags { 103 URLASSOCDLG_FL_USE_DEFAULT_NAME = 0x0001,URLASSOCDLG_FL_REGISTER_ASSOC = 0x0002 104 } URLASSOCIATIONDIALOG_IN_FLAGS; 105 106 INTSHCUTAPI HRESULT WINAPI URLAssociationDialogA(HWND hwndParent,DWORD dwInFlags,PCSTR pcszFile,PCSTR pcszURL,PSTR pszAppBuf,UINT ucAppBufLen); 107 INTSHCUTAPI HRESULT WINAPI URLAssociationDialogW(HWND hwndParent,DWORD dwInFlags,PCWSTR pcszFile,PCWSTR pcszURL,PWSTR pszAppBuf,UINT ucAppBufLen); 108 109 #define URLAssociationDialog __MINGW_NAME_AW(URLAssociationDialog) 110 111 typedef enum mimeassociationdialog_in_flags { 112 MIMEASSOCDLG_FL_REGISTER_ASSOC = 0x0001 113 } MIMEASSOCIATIONDIALOG_IN_FLAGS; 114 115 INTSHCUTAPI HRESULT WINAPI MIMEAssociationDialogA(HWND hwndParent,DWORD dwInFlags,PCSTR pcszFile,PCSTR pcszMIMEContentType,PSTR pszAppBuf,UINT ucAppBufLen); 116 INTSHCUTAPI HRESULT WINAPI MIMEAssociationDialogW(HWND hwndParent,DWORD dwInFlags,PCWSTR pcszFile,PCWSTR pcszMIMEContentType,PWSTR pszAppBuf,UINT ucAppBufLen); 117 118 #define MIMEAssociationDialog __MINGW_NAME_AW(MIMEAssociationDialog) 119 120 INTSHCUTAPI WINBOOL WINAPI InetIsOffline(DWORD dwFlags); 121 122 #ifdef __cplusplus 123 } 124 #endif 125 #endif 126