1 out of 2 rated this helpful - Rate this topic

IOpenControlPanel::Open method

Applies to: desktop apps only

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

Syntax

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

Parameters

pszName [in]

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.

pszPage [in]

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.

punkSite [in]

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

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Shobjidl.h

IDL

Shobjidl.idl

See also

IOpenControlPanel
Developing for the Control Panel

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Need example about argument page
Need an example tells how to provide the string for page, such as if want to open Mouse with the pointers page.