Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

367 lines
12 KiB

  1. /*
  2. @doc EXTERNAL
  3. @const HRESULT | E_FLAGS | The flag combination is invalid.
  4. */
  5. /*
  6. @doc EXTERNAL INTSHCUTAPI
  7. @const HRESULT | IS_E_EXEC_FAILED | The URL's protocol handler failed to
  8. run.
  9. */
  10. /*
  11. @doc EXTERNAL INTSHCUTAPI
  12. @const HRESULT | URL_E_INVALID_SYNTAX | The URL's syntax is invalid.
  13. */
  14. /*
  15. @doc EXTERNAL INTSHCUTAPI
  16. @const HRESULT | URL_E_UNREGISTERED_PROTOCOL | The URL's protocol does not
  17. have a registered protocol handler.
  18. */
  19. /******************************************************************************
  20. @doc EXTERNAL INTSHCUTIFACE
  21. @interface IUniformResourceLocator | Methods for manipulating a uniform
  22. resource locator (URL).
  23. @xref <f URLAssociationDialog> <f TranslateURL>
  24. ******************************************************************************/
  25. /*
  26. @doc EXTERNAL INTSHCUTIFACE
  27. @enum IURL_SETURL_FLAGS | IUniformResourceLocator::SetURL() input flags.
  28. */
  29. /*
  30. @emem IURL_SETURL_FL_GUESS_PROTOCOL | If set, guess protocol if missing.
  31. If clear, do not guess protocol.
  32. */
  33. /*
  34. @emem IURL_SETURL_FL_USE_DEFAULT_PROTOCOL | If set, use default protocol
  35. if missing. If clear, do not use default protocol.
  36. */
  37. /*
  38. @doc EXTERNAL INTSHCUTIFACE
  39. @enum IURL_INVOKECOMMAND_FLAGS | IUniformResourceLocator::InvokeCommand()
  40. input flags.
  41. */
  42. /*
  43. @emem IURL_INVOKECOMMAND_FL_ALLOW_UI | If set, interaction with the user
  44. is allowed. hwndParent is valid. If clear, interaction with the user is
  45. not allowed. hwndParent is ignored.
  46. */
  47. /*
  48. @emem IURL_INVOKECOMMAND_FL_USE_DEFAULT_VERB | If set, the default verb
  49. for the Internet Shortcut's protocol is to be used. pcszVerb is ignored.
  50. If clear, the verb is specified by pcszVerb.
  51. */
  52. /*
  53. @doc EXTERNAL INTSHCUTIFACE
  54. @struct URLINVOKECOMMANDINFO | Information describing the command to be
  55. invoked via IUniformResourceLocator::InvokeCommand().
  56. */
  57. /*
  58. @field DWORD | dwcbSize | Length of URLINVOKECOMMANDINFO structure in
  59. bytes. Should be filled in with sizeof(URLINVOKECOMMANDINFO) before
  60. passing to IUniformResourceLocator::InvokeCommand().
  61. */
  62. /*
  63. @field DWORD | dwFlags | A bit mask of flags from the
  64. <t IURL_INVOKECOMMAND_FLAGS> enumeration.
  65. */
  66. /*
  67. @field HWND | hwndParent | A handle to the parent window of any windows
  68. posted during IUniformResourceLocator::InvokeCommand(). Should be a
  69. valid window handle if IURL_INVOKECOMMAND_FL_ALLOW_UI is set in dwFlags.
  70. Ignored if IURL_INVOKECOMMAND_FL_ALLOW_UI is clear in dwFlags.
  71. */
  72. /*
  73. @field PCSTR | pcszVerb | The verb to invoke. Must be valid if
  74. IURL_INVOKECOMMAND_FL_USE_DEFAULT_VERB is clear in dwFlags. Ignored if
  75. IURL_INVOKECOMMAND_FL_USE_DEFAULT_VERB is set in dwFlags.
  76. */
  77. /******************************************************************************
  78. @doc EXTERNAL INTSHCUTIFACE
  79. @method HRESULT | IUniformResourceLocator | SetURL | Sets an object's URL.
  80. @parm PCSTR | pcszURL | The URL to be used by the object.
  81. @parm DWORD | dwInFlags | A bit mask of flags from the <t IURL_SETURL_FLAGS>
  82. enumeration.
  83. @rdesc Returns one of the following return codes on success:
  84. @flag S_OK | The object's URL was set successfully.
  85. otherwise returns one of the following return codes on error:
  86. @flag E_OUTOFMEMORY | There is not enough memory to complete the operation.
  87. @flag URL_E_INVALID_SYNTAX | The URL's syntax is invalid.
  88. ******************************************************************************/
  89. /******************************************************************************
  90. @doc EXTERNAL INTSHCUTIFACE
  91. @method HRESULT | IUniformResourceLocator | GetURL | Retrieves an object's URL.
  92. @parm PSTR * | ppszURL | A pointer to a PSTR to be filled in with a pointer to
  93. the object's URL. When finished, this string should be freed by calling
  94. IMalloc::Free().
  95. @rdesc Returns one of the following return codes on success:
  96. @flag S_OK | The object's URL was retrieved successfully. *ppszURL points to
  97. the URL string.
  98. @flag S_FALSE | The object does not have a URL associated with it. *ppszURL is
  99. NULL.
  100. otherwise returns one of the following return codes on error:
  101. @flag E_OUTOFMEMORY | There is not enough memory to complete the operation.
  102. ******************************************************************************/
  103. /******************************************************************************
  104. @doc EXTERNAL INTSHCUTIFACE
  105. @method HRESULT | IUniformResourceLocator | InvokeCommand | Invokes a command
  106. on an object's URL.
  107. @parm PURLINVOKECOMMANDINFO | purlici | A pointer to a <t URLINVOKECOMMANDINFO>
  108. structure describing the command to be invoked.
  109. @rdesc Returns one of the following return codes on success:
  110. @flag S_OK | The object's URL was opened successfully.
  111. @flag S_FALSE | The object does not have a URL associated with it.
  112. otherwise returns one of the following return codes on error:
  113. @flag E_OUTOFMEMORY | There is not enough memory to complete the operation.
  114. @flag IS_E_EXEC_FAILED | The URL's protocol handler failed to run.
  115. @flag URL_E_INVALID_SYNTAX | The URL's syntax is invalid.
  116. @flag URL_E_UNREGISTERED_PROTOCOL | The URL's protocol does not have a
  117. registered protocol handler.
  118. ******************************************************************************/
  119. /*
  120. @doc EXTERNAL INTSHCUTAPI
  121. @enum TRANSLATEURL_IN_FLAGS | TranslateURL() input flags.
  122. */
  123. /*
  124. @emem TRANSLATEURL_FL_GUESS_PROTOCOL | If set, guess protocol if missing.
  125. If clear, do not guess protocol.
  126. */
  127. /*
  128. @emem TRANSLATEURL_FL_USE_DEFAULT_PROTOCOL | If set, use default protocol
  129. if missing. If clear, do not use default protocol.
  130. */
  131. /******************************************************************************
  132. @doc EXTERNAL INTSHCUTAPI
  133. @func HRESULT | TranslateURL | Applies common translations to a URL string,
  134. creating a new URL string.
  135. @parm PCSTR | pcszURL | A pointer to the URL string to be translated.
  136. @parm DWORD | dwInFlags | A bit mask of flags from the
  137. <t TRANSLATEURL_IN_FLAGS> enumeration.
  138. @parm PSTR * | ppszTranslatedURL | A pointer to the newly created translated
  139. URL string, if any. *ppszTranslatedURL is only valid if S_OK is returned.
  140. If valid, *ppszTranslatedURL should be freed by calling LocalFree().
  141. *ppszTranslatedURL is NULL on error.
  142. @rdesc Returns one of the following return codes on success:
  143. @flag S_OK | The URL string was translated successfully, and *ppszTranslatedURL
  144. points to the translated URL string.
  145. @flag S_FALSE | The URL string did not require translation. *ppszTranslatedURL
  146. is NULL.
  147. otherwise returns one of the following return codes on error:
  148. @flag E_FLAGS | The flag combination passed in dwFlags is invalid.
  149. @flag E_OUTOFMEMORY | There is not enough memory to complete the operation.
  150. @flag E_POINTER | One of the input pointers was invalid.
  151. @comm TranslateURL() does not perform any validation on the syntax of the input
  152. URL string. A successful return value does not indicate that the input or
  153. output URL strings are valid URLs.
  154. ******************************************************************************/
  155. /*
  156. @doc EXTERNAL INTSHCUTAPI
  157. @enum URLASSOCIATIONDIALOG_IN_FLAGS | URLAssociationDialog() input flags.
  158. */
  159. /*
  160. @emem URLASSOCDLG_FL_USE_DEFAULT_NAME | If set, pcszFile is not valid.
  161. The default URL file name should be used. If clear, pcszFile is valid.
  162. */
  163. /*
  164. @emem URLASSOCDLG_FL_REGISTER_ASSOC | If set, the application selected is
  165. to be registered as the handler for URLs of pcszURL's protocol. If
  166. clear, no association is to be registered. An application is only
  167. registered if this flag is set, and the user indicates that a persistent
  168. association is to be made. Registration is only possible if
  169. URLASSOCDLG_FL_USE_DEFAULT_NAME is clear.
  170. */
  171. /******************************************************************************
  172. @doc EXTERNAL INTSHCUTAPI
  173. @func HRESULT | URLAssociationDialog | Invokes the unregistered URL protocol
  174. dialog box.
  175. @parm HWND | hwndParent | A handle to the window to be used as the parent
  176. window of any posted child windows.
  177. @parm DWORD | dwInFlags | A bit mask of flags from the
  178. <t URLASSOCIATIONDIALOG_IN_FLAGS> enumeration.
  179. @parm PSTR | pszAppBuf | A buffer to be filled in on success with the path of
  180. the application selected by the user. pszAppBuf's buffer is filled in with the
  181. empty string on failure.
  182. @parm UINT | ucAppBufLen | The length of pszAppBuf's buffer.
  183. @rdesc Returns one of the following return codes on success:
  184. @flag S_OK | Application registered with URL protocol.
  185. @flag S_FALSE | Nothing registered. One-time execution via selected
  186. application requested.
  187. otherwise returns one of the following return codes on error:
  188. @flag E_ABORT | The user cancelled the operation.
  189. @flag E_FLAGS | The flag combination passed in dwFlags is invalid.
  190. @flag E_OUTOFMEMORY | There is not enough memory to complete the operation.
  191. @flag E_POINTER | One of the input pointers is invalid.
  192. @flag URL_E_INVALID_SYNTAX | The URL's syntax is invalid.
  193. ******************************************************************************/
  194. /*
  195. @doc EXTERNAL MIMEAPI
  196. @enum MIMEASSOCIATIONDIALOG_IN_FLAGS | MIMEAssociationDialog() input flags.
  197. */
  198. /*
  199. @emem TRANSLATEURL_FL_GUESS_PROTOCOL | If set, the application selected
  200. is to be registered as the handler for files of the given MIME type. If
  201. clear, no association is to be registered. An application is only
  202. registered if this flag is set, and the user indicates that a persistent
  203. association is to be made. Registration is only possible if pcszFile
  204. contains an extension.
  205. */
  206. /******************************************************************************
  207. @doc EXTERNAL MIMEAPI
  208. @func HRESULT | MIMEAssociationDialog | Invokes the unregistered MIME content
  209. type dialog box.
  210. @parm HWND | hwndParent | A handle to the window to be used as the parent
  211. window of any posted child windows.
  212. @parm DWORD | dwInFlags | A bit mask of flags from the
  213. <t MIMEASSOCIATIONDIALOG_IN_FLAGS> enumeration.
  214. @parm PCSTR | pcszFile | A pointer to a string indicating the name of the file
  215. containing data of pcszMIMEContentType's content type. Ignored if
  216. MIMEASSOCDLG_FL_USE_DEFAULT_NAME is set.
  217. @parm PCSTR | pcszMIMEContentType | A pointer to a string indicating the
  218. content type for which an application is sought.
  219. @parm PSTR | pszAppBuf | A buffer to be filled in on success with the path of
  220. the application selected by the user. pszAppBuf's buffer is filled in with the
  221. empty string on failure.
  222. @parm UINT | ucAppBufLen | The length of pszAppBuf's buffer.
  223. @rdesc Returns one of the following return codes on success:
  224. @flag S_OK | MIME content type associated with extension. Extension associated
  225. as default extension for content type. Application associated with extension.
  226. @flag S_FALSE | Nothing registered. One-time execution via selected
  227. application requested.
  228. otherwise returns one of the following return codes on error:
  229. @flag E_ABORT | The user cancelled the operation.
  230. @flag E_FLAGS | The flag combination passed in dwFlags is invalid.
  231. @flag E_OUTOFMEMORY | There is not enough memory to complete the operation.
  232. @flag E_POINTER | One of the input pointers is invalid.
  233. @comm MIMEAssociationDialog() does not perform any validation on the syntax of
  234. the input content type string. A successful return value does not indicate
  235. that the input MIME content type string is a valid content type.
  236. ******************************************************************************/
  237. /******************************************************************************
  238. @doc EXTERNAL INTSHCUTAPI
  239. @func BOOL | InetIsOffline | Determines if the user wants to be "offline" (get
  240. all information from cache).
  241. @parm DWORD | dwFlags | A bit mask of flags. No flags are currently defined.
  242. This parameter must be 0.
  243. @rdesc Returns TRUE to indicate that the local system is not currently
  244. connected to the Internet. Returns FALSE to indicate that either the local
  245. system is connected to the Internet, or no attempt has yet been made to connect
  246. the local system to the Internet. Applications that wish to support an
  247. off-line mode should do so if InetIsOffline() returns TRUE.
  248. @comm Off-line mode begins when the user has been prompted to dial-in to the
  249. Internet, but canceled the attempt.
  250. ******************************************************************************/