28 PT_CONTROLS_NEWREGITEM,
31 L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}",
97 cchComment =
wcslen(pszComment);
100 cbData =
sizeof(pidl->mkid.cb) +
sizeof(
pData->type) +
sizeof(
pData->u.cpanel) -
sizeof(
pData->u.cpanel.szName)
107 pidl->mkid.cb = cbData;
111 pCP = &
pData->u.cpanel;
148 CComPtr<IDefaultExtractIconInit> initIcon;
153 initIcon->SetNormalIcon(
pData->szName, (
int)
pData->iconIdx != -1 ?
pData->iconIdx : 0);
167 if (applet->
info[
i].idIcon > 0)
168 iconIdx = -applet->
info[
i].idIcon;
173 applet->
info[
i].name,
174 applet->
info[
i].info,
232 if (
dwFlags & SHCONTF_NONFOLDERS)
251 if (
wcscmp(wfd.cFileName,
L"ncpa.cpl"))
271 TRACE(
"-- destroying IShellFolder(%p)\n",
this);
284 DWORD *pdwAttributes)
287 return m_regFolder->ParseDisplayName(hwndOwner, pbc, lpszDisplayName, pchEaten, ppidl, pdwAttributes);
295 CComPtr<IEnumIDList> pRegEnumerator;
354 ERR(
"Got wrong lParam!\n");
366 CComPtr<IShellView> pShellView;
375 WARN(
"IDropTarget not implemented\n");
378 WARN(
"IContextMenu not implemented\n");
385 TRACE(
"--(%p)->(interface=%p)\n",
this, ppvOut);
396 SFGAO_HASSUBFOLDER | SFGAO_FOLDER | SFGAO_CANLINK;
398 TRACE(
"(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n",
399 this, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0);
415 while(cidl > 0 && *apidl)
419 *rgfInOut &= SFGAO_CANLINK;
423 ERR(
"Got unknown pidl\n");
429 *rgfInOut &= ~SFGAO_VALIDATE;
431 TRACE(
"-- result=0x%08x\n", *rgfInOut);
453 TRACE(
"(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n",
462 for (
UINT i = 0;
i < cidl;
i++)
471 hr = ShellObjectCreatorInit<CCPLItemMenu>(cidl, apidl,
riid, &pObj);
490 TRACE(
"(%p)->hr=0x%08x\n",
this,
hr);
531 FIXME(
"(%p)->(%p,pidl=%p,%s,%u,%p)\n",
this, hwndOwner, pidl,
debugstr_w(
lpName),
dwFlags, pPidlOut);
537 FIXME(
"(%p)\n",
this);
543 FIXME(
"(%p)\n",
this);
549 TRACE(
"(%p)\n",
this);
551 if (pSort) *pSort = 0;
552 if (pDisplay) *pDisplay = 0;
558 TRACE(
"(%p)\n",
this);
568 FIXME(
"(%p)\n",
this);
585 return m_regFolder->GetDetailsOf(pidl, iColumn, psd);
608 FIXME(
"(%p)\n",
this);
617 TRACE(
"(%p)\n",
this);
621 *lpClassId = CLSID_ControlPanel;
655 TRACE(
"(%p)->(%p)\n",
this, pidl);
712 TRACE(
"(%p)->(invcom=%p verb=%p wnd=%p)\n",
this, lpcmi, lpcmi->
lpVerb, lpcmi->
hwnd);
719 PCWSTR wszFormat =
L"shell32.dll,Control_RunDLL %s,%s";
728 CComPtr<IDataObject> pDataObj;
738 CComPtr<IShellFolder> psf;
739 CComPtr<IDropTarget> pDT;
765 TRACE(
"(%p)->(idcom=%lx flags=%x %p name=%p len=%x)\n",
this, idCommand,
uFlags, lpReserved, lpszName, uMaxNameLen);
767 FIXME(
"unknown command string\n");
779 TRACE(
"ICPanel_IContextMenu_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",
this, uMsg,
wParam,
lParam);
820 wsprintfW(
key,
L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\%s\\NameSpace",
821 Wow64 ?
L"ControlPanelWOW64" :
L"ControlPanel");
921 *pView = CPVIEW_CLASSIC;
static HRESULT GetParsingName(PCIDLIST_ABSOLUTE pidl, PWSTR *Name)
static const shvheader ControlPanelSFHeader[]
@ CONTROLPANEL_COL_COMMENT
static HRESULT FindExeCplClass(LPCWSTR Canonical, HKEY hKey, BOOL Wow64, LPWSTR clsid)
static PIDLCPanelStruct * _ILGetCPanelPointer(LPCITEMIDLIST pidl)
static const REGFOLDERINFO g_RegFolderInfo
EXTERN_C void WINAPI Control_RunDLLW(HWND hWnd, HINSTANCE hInst, LPCWSTR cmd, DWORD nCmdShow)
HRESULT CCPLExtractIcon_CreateInstance(IShellFolder *psf, LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppvOut)
static HRESULT CreateCplAbsoluteParsingPath(LPCWSTR Prefix, LPCWSTR InFolderParse, PWSTR Buf, UINT cchBuf)
static LPITEMIDLIST _ILCreateCPanelApplet(LPCWSTR pszName, LPCWSTR pszDisplayName, LPCWSTR pszComment, int iIconIdx)
HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv, IShellView **ppsv)
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
static const DWORD dwControlPanelAttributes
HRESULT IDataObject_Constructor(HWND hwndOwner, PCIDLIST_ABSOLUTE pMyPidl, PCUIDLIST_RELATIVE_ARRAY apidl, UINT cidl, BOOL bExtendedObject, IDataObject **dataObject)
HRESULT WINAPI SHCreateDataObject(PCIDLIST_ABSOLUTE pidlFolder, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, IDataObject *pdtInner, REFIID riid, void **ppv)
HRESULT CRegFolder_CreateInstance(PREGFOLDERINITDATA pInit, LPCITEMIDLIST pidlRoot, REFIID riid, void **ppv)
#define shell32_hInstance
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void shell(int argc, const char *argv[])
#define RegCloseKey(hKey)
BOOL RegisterCPanelApp(LPCWSTR path)
BOOL CreateCPanelEnumList(DWORD dwFlags)
HRESULT WINAPI Initialize(DWORD dwFlags, IEnumIDList *pRegEnumerator)
int RegisterRegistryCPanelApps(HKEY hkey_root, LPCWSTR szRepPath)
STDMETHOD() GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv) override
STDMETHOD() GetCurFolder(PIDLIST_ABSOLUTE *pidl) override
CComPtr< IShellFolder2 > m_regFolder
STDMETHOD() MapColumnToSCID(UINT column, SHCOLUMNID *pscid) override
STDMETHOD() GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) override
STDMETHOD() GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags) override
STDMETHOD() GetDefaultSearchGUID(GUID *pguid) override
STDMETHOD() GetClassID(CLSID *lpClassId) override
STDMETHOD() CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2) override
STDMETHOD() CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) override
STDMETHOD() ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes) override
STDMETHOD() GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut) override
STDMETHOD() GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd) override
STDMETHOD() BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override
STDMETHOD() EnumSearches(IEnumExtraSearch **ppenum) override
STDMETHOD() EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) override
STDMETHOD() Initialize(PCIDLIST_ABSOLUTE pidl) override
STDMETHOD() GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) override
STDMETHOD() BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override
STDMETHOD() GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, LPVOID *ppvOut) override
STDMETHOD() SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut) override
BOOL AddToEnumList(LPITEMIDLIST pidl)
HRESULT AppendItemsFromEnumerator(IEnumIDList *pEnum)
STDMETHOD() GetPath(LPCWSTR pszName, LPWSTR pszPath, UINT cchPath) override
STDMETHOD() Open(LPCWSTR pszName, LPCWSTR pszPage, IUnknown *punkSite) override
STDMETHOD() GetCurrentView(CPVIEW *pView) override
void pdump(LPCITEMIDLIST pidl)
const char * shdebugstr_guid(const struct _GUID *id)
BOOL pcheck(LPCITEMIDLIST pidl)
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
#define IDS_SHV_COLUMN_NAME
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegEnumValueW(_In_ HKEY hKey, _In_ DWORD index, _Out_ LPWSTR value, _Inout_ PDWORD val_count, _Reserved_ PDWORD reserved, _Out_opt_ PDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ PDWORD count)
LONG WINAPI RegEnumKeyW(HKEY hKey, DWORD dwIndex, LPWSTR lpName, DWORD cbName)
#define INVALID_HANDLE_VALUE
#define FAILED_UNEXPECTEDLY(hr)
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
BOOL WINAPI FindClose(HANDLE hFindFile)
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
HRESULT WINAPI IIDFromString(LPCOLESTR s, IID *iid)
CPlApplet * Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel *panel)
void Control_UnloadApplet(CPlApplet *applet)
void WINAPI SHFree(LPVOID pv)
LPVOID WINAPI SHAlloc(SIZE_T len)
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
BOOL WINAPI SHSimulateDrop(IDropTarget *pDrop, IDataObject *pDataObj, DWORD grfKeyState, PPOINTL lpPt, DWORD *pdwEffect)
#define MAKE_HRESULT(sev, fac, code)
static FRESULT validate(void *obj)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define COM_INTERFACE_ENTRY_IID(iid, x)
static HMODULE MODULEINFO DWORD cb
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
static PROTOCOLDATA * pdata
unsigned __int3264 UINT_PTR
#define FILE_ATTRIBUTE_HIDDEN
#define FILE_ATTRIBUTE_DIRECTORY
interface IBindCtx * LPBC
const GUID IID_IDataObject
#define PathAddBackslashW
PITEMID_CHILD * _ILCopyaPidl(PCUITEMID_CHILD_ARRAY apidlsrc, UINT cidl)
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
void WINAPI ILFree(LPITEMIDLIST pidl)
HRESULT WINAPI SHGetNameFromIDList(PCIDLIST_ABSOLUTE pidl, SIGDN sigdnName, PWSTR *ppszName)
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
BOOL _ILIsSpecialFolder(LPCITEMIDLIST pidl)
void _ILFreeaPidl(LPITEMIDLIST *apidl, UINT cidl)
LPITEMIDLIST _ILCreateControlPanel(void)
BOOL _ILIsCPanelStruct(LPCITEMIDLIST pidl)
#define IsEqualIID(riid1, riid2)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define SEE_MASK_CLASSNAME
#define SEE_MASK_FLAG_DDEWAIT
#define MAKE_COMPARE_HRESULT(x)
HRESULT SHELL32_CompareDetails(IShellFolder2 *isf, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
void WINAPI _InsertMenuItemW(HMENU hmenu, UINT indexMenu, BOOL fByPosition, UINT wID, UINT fType, LPCWSTR dwTypeData, UINT fState)
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
struct _SFV_CREATE SFV_CREATE
#define IDS_SHV_COLUMN_COMMENTS
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const PCUITEMID_CHILD * PCUITEMID_CHILD_ARRAY
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
struct applet_info info[1]
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
static const WCHAR wszFile[]
DWORD WINAPI GetLastError(void)
_In_ LPCSTR _Out_writes_to_opt_ cchDisplayName LPSTR _Inout_ LPDWORD cchDisplayName
_In_ PSID _Out_writes_to_opt_ cchName LPSTR _Inout_ LPDWORD cchName
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define HRESULT_FROM_WIN32(x)
#define HKEY_LOCAL_MACHINE
#define HKEY_CURRENT_USER
#define HKEY_CLASSES_ROOT
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define IS_INTRESOURCE(i)
#define MAKEINTRESOURCEA(i)
#define MAKEINTRESOURCEW(i)
_In_ __drv_aliasesMem PSTRING Prefix
#define IID_PPV_ARG(Itype, ppType)