IApplicationAssociationRegistrationUI::LaunchAdvancedAssociationUI Method

Launches an advanced association dialog box through which the user can customize the associations for the application specified in pszAppRegName.

Syntax

HRESULT LaunchAdvancedAssociationUI(      
    LPCWSTR pszAppRegName );

Parameters

pszAppRegName
[in] A pointer to a null-terminated Unicode string that specifies the registered name of the application. This value is only valid if it matches one of the application strings registered under HKLM\Software\RegisteredApplications .

Return Value

Returns S_OK if successful, or an error value otherwise.

See Also

Default Programs
Tags :


Community Content

David M. Kean - MSFT
Common HRESULTS
Returns E_INVALIDARG (0x80070057) if pszAppRegName is not the name of a registered application.
Returns HRESULT_FROM_WIN32(ERROR_FILENAME_EXCED_RANGE) (0x800700CE) if pszAppRegName is greater than 32766 characters.

Otherwise, returns S_OK (0).
Tags : contentbug

David M. Kean - MSFT
Calling this method from managed code

To call this method from managed code, such as C# or Visual Basic, see the following blog post:

http://davesbox.com/archive/2008/12/03/programmatically-opening-the-default-programs-window.aspx

Tags :

David M. Kean - MSFT
Opens 'Set Default Programs' window, despite being passed the name of a non-registered application
This method currently has undocumented behavior in Windows Vista where it will open the the Set Default Programs window when passed the name of a non-registered application, despite returning E_INVALIDARG. Do not rely on this behavior as it fixed in Windows 7 and above.
Tags : contentbug

Page view tracker