Expand Minimize

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.

Note  Windows XP Service Pack 2 (SP2) or later: This function is no longer supported.

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:

URLASSOCDLG_FL_USE_DEFAULT_NAME

Use the default file name (that is, "Internet Shortcut").

URLASSOCDLG_FL_REGISTER_ASSOC

Register the selected application as the handler for the protocol specified in pcszURL. The application is registered only if this flag is set and the user indicates that a persistent association is desired.

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

Note  As of Windows XP SP2, this function not supported and returns E_NOTIMPL in all situations.

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

Intshcut.h

DLL

Url.dll

Unicode and ANSI names

URLAssociationDialogW (Unicode) and URLAssociationDialogA (ANSI)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft