Επεξεργασία

Κοινή χρήση μέσω


IOpenControlPanel::Open method (shobjidl_core.h)

Opens the specified Control Panel item, optionally to a specific page.

Syntax

HRESULT Open(
  [in] LPCWSTR  pszName,
  [in] LPCWSTR  pszPage,
  [in] IUnknown *punkSite
);

Parameters

[in] pszName

Type: LPCWSTR

A pointer to the item's canonical name as a Unicode string. This parameter is optional and can be NULL. If the calling application passes NULL, then the Control Panel itself opens. For a complete list of Control Panel item canonical names, see Canonical Names of Control Panel Items.

[in] pszPage

Type: LPCWSTR

A pointer to the name of the page within the item to display. This string is appended to the end of the path for Shell folder Control Panel items or appended as a command-line parameter for Control Panel (.cpl) file items. This parameter can be NULL, in which case the first page is shown.

[in] punkSite

Type: IUnknown*

A pointer to the site for navigating in-frame for Shell folder Control Panel items. This parameter can be NULL.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)

See also

Developing for the Control Panel

IOpenControlPanel