ReactOS 0.4.15-dev-8002-gbbb3b00
COpenControlPanel Class Reference

#include <CControlPanelFolder.h>

Inheritance diagram for COpenControlPanel:
Collaboration diagram for COpenControlPanel:

Public Member Functions

STDMETHOD() Open (LPCWSTR pszName, LPCWSTR pszPage, IUnknown *punkSite) override
 
STDMETHOD() GetPath (LPCWSTR pszName, LPWSTR pszPath, UINT cchPath) override
 
STDMETHOD() GetCurrentView (CPVIEW *pView) override
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComMultiThreadModelNoCS >
 ~CComObjectRootEx ()
 
ULONG InternalAddRef ()
 
ULONG InternalRelease ()
 
void Lock ()
 
void Unlock ()
 
HRESULT _AtlInitialConstruct ()
 
- Public Member Functions inherited from ATL::CComObjectRootBase
 CComObjectRootBase ()
 
 ~CComObjectRootBase ()
 
void SetVoid (void *)
 
HRESULT _AtlFinalConstruct ()
 
HRESULT FinalConstruct ()
 
void InternalFinalConstructAddRef ()
 
void InternalFinalConstructRelease ()
 
void FinalRelease ()
 

Static Public Member Functions

static HRESULT WINAPI UpdateRegistry (BOOL bRegister)
 
- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRYGetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 

Additional Inherited Members

- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 

Detailed Description

Definition at line 114 of file CControlPanelFolder.h.

Member Function Documentation

◆ GetCurrentView()

HRESULT WINAPI COpenControlPanel::GetCurrentView ( CPVIEW *  pView)
override

Definition at line 911 of file CControlPanelFolder.cpp.

912{
913 *pView = CPVIEW_CLASSIC;
914 return S_OK;
915}
#define S_OK
Definition: intsafe.h:52

◆ GetPath()

HRESULT WINAPI COpenControlPanel::GetPath ( LPCWSTR  pszName,
LPWSTR  pszPath,
UINT  cchPath 
)
override

Definition at line 888 of file CControlPanelFolder.cpp.

889{
890 HRESULT hr;
891 if (!pszName)
892 {
893 PWSTR cpfolder;
895 {
896 hr = StringCchCopyW(pszPath, cchPath, cpfolder);
897 SHFree(cpfolder);
898 }
899 }
900 else
901 {
902 WCHAR clsid[38 + 1];
903 if (SUCCEEDED(hr = FindExeCplClass(pszName, clsid)))
904 {
905 hr = CreateCplAbsoluteParsingPath(L"::", clsid, pszPath, cchPath);
906 }
907 }
908 return hr;
909}
static HRESULT GetParsingName(PCIDLIST_ABSOLUTE pidl, PWSTR *Name)
static HRESULT FindExeCplClass(LPCWSTR Canonical, HKEY hKey, BOOL Wow64, LPWSTR clsid)
static HRESULT CreateCplAbsoluteParsingPath(LPCWSTR Prefix, LPCWSTR InFolderParse, PWSTR Buf, UINT cchBuf)
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:326
#define SUCCEEDED(hr)
Definition: intsafe.h:50
REFCLSID clsid
Definition: msctf.c:82
#define L(x)
Definition: ntvdm.h:50
HRESULT hr
Definition: shlfolder.c:183
#define CSIDL_CONTROLS
Definition: shlobj.h:2161
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
uint16_t * PWSTR
Definition: typedefs.h:56
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ Open()

HRESULT WINAPI COpenControlPanel::Open ( LPCWSTR  pszName,
LPCWSTR  pszPage,
IUnknown punkSite 
)
override

Definition at line 853 of file CControlPanelFolder.cpp.

854{
855 WCHAR path[MAX_PATH], clspath[MAX_PATH];
856 HRESULT hr = S_OK;
857 SHELLEXECUTEINFOW sei = { sizeof(sei), SEE_MASK_FLAG_DDEWAIT };
858 sei.lpFile = path;
859 sei.nShow = SW_SHOW;
860 if (!pszName)
861 {
863 PathAppendW(path, L"control.exe");
864 }
865 else
866 {
867 LPWSTR clsid = clspath + wsprintfW(clspath, L"CLSID\\");
868 if (SUCCEEDED(hr = FindExeCplClass(pszName, clsid)))
869 {
871 {
872 // NT6 will execute "::{26EE0668-A00A-44D7-9371-BEB064C98683}\0\::{clsid}[\pszPage]"
873 // but we don't support parsing that so we force the class instead.
875 sei.lpClass = clspath;
876 }
877 }
878 }
879
880 if (SUCCEEDED(hr))
881 {
884 }
885 return hr;
886}
#define ERROR_SUCCESS
Definition: deptool.c:10
#define MAX_PATH
Definition: compat.h:34
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2313
unsigned long DWORD
Definition: ntddk_ex.h:95
#define error(str)
Definition: mkdosfs.c:1605
#define PathAppendW
Definition: pathcch.h:309
#define SEE_MASK_CLASSNAME
Definition: shellapi.h:25
#define SEE_MASK_FLAG_DDEWAIT
Definition: shellapi.h:34
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
Definition: shlexec.cpp:2391
#define _countof(array)
Definition: sndvol32.h:68
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define SW_SHOW
Definition: winuser.h:775
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ UpdateRegistry()

static HRESULT WINAPI COpenControlPanel::UpdateRegistry ( BOOL  bRegister)
inlinestatic

Definition at line 125 of file CControlPanelFolder.h.

125{ return S_OK; } // CControlPanelFolder does it for us

The documentation for this class was generated from the following files: