URLAssociationDialog function
Invokes the unregistered URL protocol dialog box. This dialog box allows the user to select an application to associate with a previously unknown protocol.
Syntax
HRESULT URLAssociationDialog( HWND hwndParent, DWORD dwInFlags, PTCSTR pcszFile, PTCSTR pcszURL, _Out_ PTSTR pszAppBuf, UINT ucAppBufLen );
Parameters
- hwndParent
-
Type: HWND
A handle to the parent window.
- dwInFlags
-
Type: DWORD
The bit flags that specify the behavior of the function. This value can be a combination of the following:
- pcszFile
-
Type: PTCSTR
The address of a constant zero-terminated string that contains the file name to associate with the URLs protocol.
- pcszURL
-
Type: PTCSTR
The address of a constant zero-terminated string that contains the URL with an unknown protocol.
- pszAppBuf [out]
-
Type: PTSTR
The address of a buffer that receives the path of the application specified by the user.
- ucAppBufLen
-
Type: UINT
The size of pszAppBuf, in characters.
Return value
Type: HRESULT
In supported systems, returns S_OK if the application is registered with the URL protocol, or S_FALSE if nothing is registered. For example, the function returns S_FALSE when the user elects to perform a one-time execution via the selected application.
Requirements
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
DLL |
|
|
Unicode and ANSI names |
URLAssociationDialogW (Unicode) and URLAssociationDialogA (ANSI) |