ReactOS 0.4.16-dev-59-gd481587
CControlPanelFolder.cpp
Go to the documentation of this file.
1/*
2 * Control panel folder
3 *
4 * Copyright 2003 Martin Fuchs
5 * Copyright 2009 Andrew Hill
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22#include <precomp.h>
23
25
27{
28 PT_CONTROLS_NEWREGITEM,
29 0, NULL,
30 CLSID_ControlPanel,
31 L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}",
32 L"ControlPanel",
33};
34
35/***********************************************************************
36* control panel implementation in shell namespace
37*/
38
40 public CEnumIDListBase
41{
42 public:
47 int RegisterRegistryCPanelApps(HKEY hkey_root, LPCWSTR szRepPath);
49
51 COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList)
53};
54
55/***********************************************************************
56* IShellFolder [ControlPanel] implementation
57*/
58
62};
63
65{
69};
70
72{
73}
74
76{
77}
78
80{
82 return E_FAIL;
83 AppendItemsFromEnumerator(pRegEnumerator);
84 return S_OK;
85}
86
87static LPITEMIDLIST _ILCreateCPanelApplet(LPCWSTR pszName, LPCWSTR pszDisplayName, LPCWSTR pszComment, int iIconIdx)
88{
90 LPITEMIDLIST pidl;
92 int cchName, cchDisplayName, cchComment, cbData;
93
94 /* Calculate lengths of given strings */
95 cchName = wcslen(pszName);
96 cchDisplayName = wcslen(pszDisplayName);
97 cchComment = wcslen(pszComment);
98
99 /* Allocate PIDL */
100 cbData = sizeof(pidl->mkid.cb) + sizeof(pData->type) + sizeof(pData->u.cpanel) - sizeof(pData->u.cpanel.szName)
101 + (cchName + cchDisplayName + cchComment + 3) * sizeof(WCHAR);
102 pidl = (LPITEMIDLIST)SHAlloc(cbData + sizeof(WORD));
103 if (!pidl)
104 return NULL;
105
106 /* Copy data to allocated memory */
107 pidl->mkid.cb = cbData;
108 pData = (PIDLDATA *)pidl->mkid.abID;
109 pData->type = PT_CPLAPPLET;
110
111 pCP = &pData->u.cpanel;
112 pCP->dummy = 0;
113 pCP->iconIdx = iIconIdx;
114 wcscpy(pCP->szName, pszName);
115 pCP->offsDispName = cchName + 1;
116 wcscpy(pCP->szName + pCP->offsDispName, pszDisplayName);
117 pCP->offsComment = pCP->offsDispName + cchDisplayName + 1;
118 wcscpy(pCP->szName + pCP->offsComment, pszComment);
119
120 /* Add PIDL NULL terminator */
121 *(WORD*)(pCP->szName + pCP->offsComment + cchComment + 1) = 0;
122
123 pcheck(pidl);
124
125 return pidl;
126}
127
128/**************************************************************************
129 * _ILGetCPanelPointer()
130 * gets a pointer to the control panel struct stored in the pidl
131 */
133{
135
136 if (pdata && pdata->type == PT_CPLAPPLET)
137 return (PIDLCPanelStruct *) & (pdata->u.cpanel);
138
139 return NULL;
140}
141
143{
145 if (!pData)
146 return E_FAIL;
147
148 CComPtr<IDefaultExtractIconInit> initIcon;
151 return hr;
152
153 initIcon->SetNormalIcon(pData->szName, (int)pData->iconIdx != -1 ? pData->iconIdx : 0);
154
155 return initIcon->QueryInterface(riid, ppvOut);
156}
157
159{
160 CPlApplet* applet = Control_LoadApplet(0, wpath, NULL);
161 int iconIdx;
162
163 if (applet)
164 {
165 for (UINT i = 0; i < applet->count; ++i)
166 {
167 if (applet->info[i].idIcon > 0)
168 iconIdx = -applet->info[i].idIcon; /* negative icon index instead of icon number */
169 else
170 iconIdx = 0;
171
173 applet->info[i].name,
174 applet->info[i].info,
175 iconIdx);
176
177 if (pidl)
178 AddToEnumList(pidl);
179 }
180 Control_UnloadApplet(applet);
181 }
182 return TRUE;
183}
184
186{
189 HKEY hkey;
190
191 int cnt = 0;
192
193 if (RegOpenKeyW(hkey_root, szRepPath, &hkey) == ERROR_SUCCESS)
194 {
195 int idx = 0;
196
197 for(; ; idx++)
198 {
199 DWORD nameLen = MAX_PATH;
200 DWORD valueLen = MAX_PATH;
202
203 if (RegEnumValueW(hkey, idx, name, &nameLen, NULL, NULL, (LPBYTE)&value, &valueLen) != ERROR_SUCCESS)
204 break;
205
207 {
209 }
210
212 ++cnt;
213 }
214 RegCloseKey(hkey);
215 }
216
217 return cnt;
218}
219
220/**************************************************************************
221 * CControlPanelEnum::CreateCPanelEnumList()
222 */
224{
228
229 TRACE("(%p)->(flags=0x%08x)\n", this, dwFlags);
230
231 /* enumerate the control panel applets */
232 if (dwFlags & SHCONTF_NONFOLDERS)
233 {
234 LPWSTR p;
235
238 wcscpy(p, L"*.cpl");
239
240 hFile = FindFirstFileW(szPath, &wfd);
241
243 {
244 do
245 {
246 if (!(dwFlags & SHCONTF_INCLUDEHIDDEN) && (wfd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN))
247 continue;
248
249 if (!(wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
250 wcscpy(p, wfd.cFileName);
251 if (wcscmp(wfd.cFileName, L"ncpa.cpl"))
253 }
254 } while(FindNextFileW(hFile, &wfd));
256 }
257
258 RegisterRegistryCPanelApps(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls");
259 RegisterRegistryCPanelApps(HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls");
260 }
261 return TRUE;
262}
263
265{
266 pidlRoot = NULL; /* absolute pidl */
267}
268
270{
271 TRACE("-- destroying IShellFolder(%p)\n", this);
273}
274
275/**************************************************************************
276* CControlPanelFolder::ParseDisplayName
277*/
279 HWND hwndOwner,
280 LPBC pbc,
281 LPOLESTR lpszDisplayName,
282 DWORD *pchEaten,
283 PIDLIST_RELATIVE *ppidl,
284 DWORD *pdwAttributes)
285{
286 /* We only support parsing guid names */
287 return m_regFolder->ParseDisplayName(hwndOwner, pbc, lpszDisplayName, pchEaten, ppidl, pdwAttributes);
288}
289
290/**************************************************************************
291* CControlPanelFolder::EnumObjects
292*/
293HRESULT WINAPI CControlPanelFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList)
294{
295 CComPtr<IEnumIDList> pRegEnumerator;
296 m_regFolder->EnumObjects(hwndOwner, dwFlags, &pRegEnumerator);
297
298 return ShellObjectCreatorInit<CControlPanelEnum>(dwFlags, pRegEnumerator, IID_PPV_ARG(IEnumIDList, ppEnumIDList));
299}
300
301/**************************************************************************
302* CControlPanelFolder::BindToObject
303*/
306 LPBC pbcReserved,
307 REFIID riid,
308 LPVOID *ppvOut)
309{
310 return m_regFolder->BindToObject(pidl, pbcReserved, riid, ppvOut);
311}
312
313/**************************************************************************
314* CControlPanelFolder::BindToStorage
315*/
318 LPBC pbcReserved,
319 REFIID riid,
320 LPVOID *ppvOut)
321{
322 FIXME("(%p)->(pidl=%p,%p,%s,%p) stub\n", this, pidl, pbcReserved, shdebugstr_guid(&riid), ppvOut);
323
324 *ppvOut = NULL;
325 return E_NOTIMPL;
326}
327
328/**************************************************************************
329* CControlPanelFolder::CompareIDs
330*/
332{
333 /* Dont use SHELL32_CompareGuidItems because it would cause guid items to come first */
334 if (_ILIsSpecialFolder(pidl1) || _ILIsSpecialFolder(pidl2))
335 {
336 return SHELL32_CompareDetails(this, lParam, pidl1, pidl2);
337 }
338 PIDLCPanelStruct *pData1 = _ILGetCPanelPointer(pidl1);
339 PIDLCPanelStruct *pData2 = _ILGetCPanelPointer(pidl2);
340
341 if (!pData1 || !pData2 || LOWORD(lParam) >= CONTROLPANEL_COL_COUNT)
342 return E_INVALIDARG;
343
344 int result;
345 switch(LOWORD(lParam))
346 {
348 result = wcsicmp(pData1->szName + pData1->offsDispName, pData2->szName + pData2->offsDispName);
349 break;
351 result = wcsicmp(pData1->szName + pData1->offsComment, pData2->szName + pData2->offsComment);
352 break;
353 default:
354 ERR("Got wrong lParam!\n");
355 return E_INVALIDARG;
356 }
357
359}
360
361/**************************************************************************
362* CControlPanelFolder::CreateViewObject
363*/
365{
366 CComPtr<IShellView> pShellView;
368
369 TRACE("(%p)->(hwnd=%p,%s,%p)\n", this, hwndOwner, shdebugstr_guid(&riid), ppvOut);
370
371 if (ppvOut) {
372 *ppvOut = NULL;
373
374 if (IsEqualIID(riid, IID_IDropTarget)) {
375 WARN("IDropTarget not implemented\n");
376 hr = E_NOTIMPL;
377 } else if (IsEqualIID(riid, IID_IContextMenu)) {
378 WARN("IContextMenu not implemented\n");
379 hr = E_NOTIMPL;
380 } else if (IsEqualIID(riid, IID_IShellView)) {
381 SFV_CREATE sfvparams = {sizeof(SFV_CREATE), this};
382 hr = SHCreateShellFolderView(&sfvparams, (IShellView**)ppvOut);
383 }
384 }
385 TRACE("--(%p)->(interface=%p)\n", this, ppvOut);
386 return hr;
387}
388
389/**************************************************************************
390* CControlPanelFolder::GetAttributesOf
391*/
393{
394 HRESULT hr = S_OK;
395 static const DWORD dwControlPanelAttributes =
396 SFGAO_HASSUBFOLDER | SFGAO_FOLDER | SFGAO_CANLINK;
397
398 TRACE("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n",
399 this, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0);
400
401 if (!rgfInOut)
402 return E_INVALIDARG;
403 if (cidl && !apidl)
404 return E_INVALIDARG;
405
406 if (*rgfInOut == 0)
407 *rgfInOut = ~0;
408
409 if (!cidl)
410 {
411 *rgfInOut &= dwControlPanelAttributes;
412 }
413 else
414 {
415 while(cidl > 0 && *apidl)
416 {
417 pdump(*apidl);
418 if (_ILIsCPanelStruct(*apidl))
419 *rgfInOut &= SFGAO_CANLINK;
420 else if (_ILIsSpecialFolder(*apidl))
421 m_regFolder->GetAttributesOf(1, apidl, rgfInOut);
422 else
423 ERR("Got unknown pidl\n");
424 apidl++;
425 cidl--;
426 }
427 }
428 /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */
429 *rgfInOut &= ~SFGAO_VALIDATE;
430
431 TRACE("-- result=0x%08x\n", *rgfInOut);
432 return hr;
433}
434
435/**************************************************************************
436* CControlPanelFolder::GetUIObjectOf
437*
438* PARAMETERS
439* HWND hwndOwner, //[in ] Parent window for any output
440* UINT cidl, //[in ] array size
441* LPCITEMIDLIST* apidl, //[in ] simple pidl array
442* REFIID riid, //[in ] Requested Interface
443* UINT* prgfInOut, //[ ] reserved
444* LPVOID* ppvObject) //[out] Resulting Interface
445*
446*/
448 UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut)
449{
450 LPVOID pObj = NULL;
452
453 TRACE("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n",
454 this, hwndOwner, cidl, apidl, shdebugstr_guid(&riid), prgfInOut, ppvOut);
455
456 if (ppvOut) {
457 *ppvOut = NULL;
458
459 if (IsEqualIID(riid, IID_IContextMenu) && (cidl >= 1)) {
460 /* HACK: We should use callbacks from CDefaultContextMenu instead of creating one on our own */
461 BOOL bHasCpl = FALSE;
462 for (UINT i = 0; i < cidl; i++)
463 {
464 if(_ILIsCPanelStruct(apidl[i]))
465 {
466 bHasCpl = TRUE;
467 }
468 }
469
470 if (bHasCpl)
471 hr = ShellObjectCreatorInit<CCPLItemMenu>(cidl, apidl, riid, &pObj);
472 else
473 hr = m_regFolder->GetUIObjectOf(hwndOwner, cidl, apidl, riid, prgfInOut, &pObj);
474 } else if (IsEqualIID(riid, IID_IDataObject) && (cidl >= 1)) {
475 hr = IDataObject_Constructor(hwndOwner, pidlRoot, apidl, cidl, TRUE, (IDataObject **)&pObj);
476 } else if ((IsEqualIID(riid, IID_IExtractIconA) || IsEqualIID(riid, IID_IExtractIconW)) && (cidl == 1)) {
477 if (_ILGetCPanelPointer(apidl[0]))
478 hr = CCPLExtractIcon_CreateInstance(this, apidl[0], riid, &pObj);
479 else
480 hr = m_regFolder->GetUIObjectOf(hwndOwner, cidl, apidl, riid, prgfInOut, &pObj);
481 } else {
483 }
484
485 if (SUCCEEDED(hr) && !pObj)
487
488 *ppvOut = pObj;
489 }
490 TRACE("(%p)->hr=0x%08x\n", this, hr);
491 return hr;
492}
493
494/**************************************************************************
495* CControlPanelFolder::GetDisplayNameOf
496*/
498{
499 if (!pidl)
500 return S_FALSE;
501
502 PIDLCPanelStruct *pCPanel = _ILGetCPanelPointer(pidl);
503
504 if (pCPanel)
505 {
506 return SHSetStrRet(strRet, pCPanel->szName + pCPanel->offsDispName);
507 }
508 else if (_ILIsSpecialFolder(pidl))
509 {
510 return m_regFolder->GetDisplayNameOf(pidl, dwFlags, strRet);
511 }
512
513 return E_FAIL;
514}
515
516/**************************************************************************
517* CControlPanelFolder::SetNameOf
518* Changes the name of a file object or subfolder, possibly changing its item
519* identifier in the process.
520*
521* PARAMETERS
522* HWND hwndOwner, //[in ] Owner window for output
523* LPCITEMIDLIST pidl, //[in ] simple pidl of item to change
524* LPCOLESTR lpszName, //[in ] the items new display name
525* DWORD dwFlags, //[in ] SHGNO formatting flags
526* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned
527*/
529 LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
530{
531 FIXME("(%p)->(%p,pidl=%p,%s,%u,%p)\n", this, hwndOwner, pidl, debugstr_w(lpName), dwFlags, pPidlOut);
532 return E_FAIL;
533}
534
536{
537 FIXME("(%p)\n", this);
538 return E_NOTIMPL;
539}
540
542{
543 FIXME("(%p)\n", this);
544 return E_NOTIMPL;
545}
546
548{
549 TRACE("(%p)\n", this);
550
551 if (pSort) *pSort = 0;
552 if (pDisplay) *pDisplay = 0;
553 return S_OK;
554}
555
557{
558 TRACE("(%p)\n", this);
559
560 if (!pcsFlags || iColumn >= CONTROLPANEL_COL_COUNT)
561 return E_INVALIDARG;
562 *pcsFlags = ControlPanelSFHeader[iColumn].colstate;
563 return S_OK;
564}
565
567{
568 FIXME("(%p)\n", this);
569 return E_NOTIMPL;
570}
571
573{
574 if (!psd || iColumn >= CONTROLPANEL_COL_COUNT)
575 return E_INVALIDARG;
576
577 if (!pidl)
578 {
579 psd->fmt = ControlPanelSFHeader[iColumn].fmt;
580 psd->cxChar = ControlPanelSFHeader[iColumn].cxChar;
581 return SHSetStrRet(&psd->str, shell32_hInstance, ControlPanelSFHeader[iColumn].colnameid);
582 }
583 else if (_ILIsSpecialFolder(pidl))
584 {
585 return m_regFolder->GetDetailsOf(pidl, iColumn, psd);
586 }
587 else
588 {
589 PIDLCPanelStruct *pCPanel = _ILGetCPanelPointer(pidl);
590
591 if (!pCPanel)
592 return E_FAIL;
593
594 switch(iColumn)
595 {
597 return SHSetStrRet(&psd->str, pCPanel->szName + pCPanel->offsDispName);
599 return SHSetStrRet(&psd->str, pCPanel->szName + pCPanel->offsComment);
600 }
601 }
602
603 return E_FAIL;
604}
605
607{
608 FIXME("(%p)\n", this);
609 return E_NOTIMPL;
610}
611
612/************************************************************************
613 * CControlPanelFolder::GetClassID
614 */
616{
617 TRACE("(%p)\n", this);
618
619 if (!lpClassId)
620 return E_POINTER;
621 *lpClassId = CLSID_ControlPanel;
622
623 return S_OK;
624}
625
626/************************************************************************
627 * CControlPanelFolder::Initialize
628 *
629 * NOTES: it makes no sense to change the pidl
630 */
632{
633 if (pidlRoot)
635
636 pidlRoot = ILClone(pidl);
637
638 /* Create the inner reg folder */
639 REGFOLDERINITDATA RegInit = { static_cast<IShellFolder*>(this), &g_RegFolderInfo };
640 HRESULT hr;
641 hr = CRegFolder_CreateInstance(&RegInit,
642 pidlRoot,
645 return hr;
646
647 return S_OK;
648}
649
650/**************************************************************************
651 * CControlPanelFolder::GetCurFolder
652 */
654{
655 TRACE("(%p)->(%p)\n", this, pidl);
656
657 if (!pidl)
658 return E_POINTER;
659 *pidl = ILClone(pidlRoot);
660 return S_OK;
661}
662
664{
665 m_apidl = NULL;
666 m_cidl = 0;
667}
668
670{
671 m_cidl = cidl;
672 m_apidl = _ILCopyaPidl(apidl, m_cidl);
673 if (m_cidl && !m_apidl)
674 return E_OUTOFMEMORY;
675
676 return S_OK;
677}
678
680{
682}
683
685 HMENU hMenu,
686 UINT indexMenu,
687 UINT idCmdFirst,
688 UINT idCmdLast,
689 UINT uFlags)
690{
691 _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst, MFT_STRING, MAKEINTRESOURCEW(IDS_OPEN), MFS_DEFAULT);
693 _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + 1, MFT_STRING, MAKEINTRESOURCEW(IDS_CREATELINK), MFS_ENABLED);
694
695 return MAKE_HRESULT(SEVERITY_SUCCESS, 0, 2);
696}
697
700
701/**************************************************************************
702* ICPanel_IContextMenu_InvokeCommand()
703*/
705{
706 HRESULT hResult;
707
709 if(!pCPanel)
710 return E_FAIL;
711
712 TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n", this, lpcmi, lpcmi->lpVerb, lpcmi->hwnd);
713
714 if (lpcmi->lpVerb == MAKEINTRESOURCEA(0))
715 {
716 /* Hardcode the command here; Executing a cpl file would be fine but we also need to run things like console.dll */
717 WCHAR wszParams[MAX_PATH];
718 PCWSTR wszFile = L"rundll32.exe";
719 PCWSTR wszFormat = L"shell32.dll,Control_RunDLL %s,%s";
720
721 wsprintfW(wszParams, wszFormat, pCPanel->szName, pCPanel->szName + pCPanel->offsDispName);
722
723 /* Note: we pass the applet name to Control_RunDLL to distinguish between multiple applets in one .cpl file */
724 ShellExecuteW(NULL, NULL, wszFile, wszParams, NULL, 0);
725 }
726 else if (lpcmi->lpVerb == MAKEINTRESOURCEA(1)) //FIXME
727 {
728 CComPtr<IDataObject> pDataObj;
730
731 hResult = SHCreateDataObject(pidl, m_cidl, m_apidl, NULL, IID_PPV_ARG(IDataObject, &pDataObj));
732 if (FAILED(hResult))
733 return hResult;
734
735 SHFree(pidl);
736
737 //FIXME: Use SHCreateLinks
738 CComPtr<IShellFolder> psf;
739 CComPtr<IDropTarget> pDT;
740
741 hResult = SHGetDesktopFolder(&psf);
742 if (FAILED(hResult))
743 return hResult;
744
745 hResult = psf->CreateViewObject(NULL, IID_PPV_ARG(IDropTarget, &pDT));
746 if (FAILED(hResult))
747 return hResult;
748
749 SHSimulateDrop(pDT, pDataObj, MK_CONTROL|MK_SHIFT, NULL, NULL);
750 }
751 return S_OK;
752}
753
754/**************************************************************************
755 * ICPanel_IContextMenu_GetCommandString()
756 *
757 */
759 UINT_PTR idCommand,
760 UINT uFlags,
761 UINT* lpReserved,
762 LPSTR lpszName,
763 UINT uMaxNameLen)
764{
765 TRACE("(%p)->(idcom=%lx flags=%x %p name=%p len=%x)\n", this, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen);
766
767 FIXME("unknown command string\n");
768 return E_FAIL;
769}
770
771/**************************************************************************
772* ICPanel_IContextMenu_HandleMenuMsg()
773*/
775 UINT uMsg,
778{
779 TRACE("ICPanel_IContextMenu_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n", this, uMsg, wParam, lParam);
780
781 return E_NOTIMPL;
782}
783
784/**************************************************************************
785* COpenControlPanel
786*/
787
789{
790 PIDLIST_ABSOLUTE pidlFree = NULL;
791 if (IS_INTRESOURCE(pidl))
792 {
793 HRESULT hr = SHGetSpecialFolderLocation(NULL, (UINT)(SIZE_T)pidl, &pidlFree);
794 if (FAILED(hr))
795 return hr;
796 pidl = pidlFree;
797 }
798 HRESULT hr = SHGetNameFromIDList(pidl, SIGDN_DESKTOPABSOLUTEPARSING, Name);
799 ILFree(pidlFree);
800 return hr;
801}
802
804{
805 PWSTR cpfolder;
807 if (SUCCEEDED(hr))
808 {
809 hr = StringCchPrintfW(Buf, cchBuf, L"%s\\%s%s", cpfolder, Prefix, InFolderParse);
810 SHFree(cpfolder);
811 }
812 return hr;
813}
814
816{
818 HKEY hNSKey;
820 wsprintfW(key, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\%s\\NameSpace",
821 Wow64 ? L"ControlPanelWOW64" : L"ControlPanel");
822 LSTATUS error = RegOpenKeyExW(hKey, key, 0, KEY_READ, &hNSKey);
823 if (error)
825 for (DWORD i = 0; RegEnumKeyW(hNSKey, i, key, _countof(key)) == ERROR_SUCCESS; ++i)
826 {
829 {
830 wsprintfW(buf, L"CLSID\\%s", key);
831 DWORD cb = sizeof(buf);
832 if (RegGetValueW(HKEY_CLASSES_ROOT, buf, L"System.ApplicationName",
834 {
835 if (!lstrcmpiW(buf, Canonical))
836 {
838 hr = S_OK;
839 }
840 }
841 }
842 }
843 RegCloseKey(hNSKey);
844 return hr;
845}
846
848{
849 HRESULT hr = E_FAIL;
850 if (FAILED(hr))
852 if (FAILED(hr))
854 if (FAILED(hr))
856 if (FAILED(hr))
858 return hr;
859}
860
862{
863 WCHAR path[MAX_PATH], clspath[MAX_PATH];
864 HRESULT hr = S_OK;
865 SHELLEXECUTEINFOW sei = { sizeof(sei), SEE_MASK_FLAG_DDEWAIT };
866 sei.lpFile = path;
867 sei.nShow = SW_SHOW;
868 if (!pszName)
869 {
871 PathAppendW(path, L"control.exe");
872 }
873 else
874 {
875 LPWSTR clsid = clspath + wsprintfW(clspath, L"CLSID\\");
876 if (SUCCEEDED(hr = FindExeCplClass(pszName, clsid)))
877 {
879 {
880 // NT6 will execute "::{26EE0668-A00A-44D7-9371-BEB064C98683}\0\::{clsid}[\pszPage]"
881 // but we don't support parsing that so we force the class instead.
883 sei.lpClass = clspath;
884 }
885 }
886 }
887
888 if (SUCCEEDED(hr))
889 {
892 }
893 return hr;
894}
895
897{
898 HRESULT hr;
899 if (!pszName)
900 {
901 PWSTR cpfolder;
903 {
904 hr = StringCchCopyW(pszPath, cchPath, cpfolder);
905 SHFree(cpfolder);
906 }
907 }
908 else
909 {
910 WCHAR clsid[38 + 1];
911 if (SUCCEEDED(hr = FindExeCplClass(pszName, clsid)))
912 {
913 hr = CreateCplAbsoluteParsingPath(L"::", clsid, pszPath, cchPath);
914 }
915 }
916 return hr;
917}
918
920{
921 *pView = CPVIEW_CLASSIC;
922 return S_OK;
923}
static HRESULT GetParsingName(PCIDLIST_ABSOLUTE pidl, PWSTR *Name)
static const shvheader ControlPanelSFHeader[]
controlpanel_columns
@ CONTROLPANEL_COL_NAME
@ CONTROLPANEL_COL_COMMENT
@ CONTROLPANEL_COL_COUNT
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)
Definition: control.c:1173
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)
Definition: CDefView.cpp:4659
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
static const DWORD dwControlPanelAttributes
HRESULT WINAPI SHCreateDefaultExtractIcon(REFIID riid, void **ppv)
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)
Definition: CRegFolder.cpp:943
#define shell32_hInstance
#define IDC_STATIC
Definition: resource.h:4
HWND hWnd
Definition: settings.c:17
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define IDS_OPEN
Definition: resource.h:18
void shell(int argc, const char *argv[])
Definition: cmds.c:1231
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
#define EXTERN_C
Definition: basetyps.h:12
#define RegCloseKey(hKey)
Definition: registry.h:49
STDMETHOD() GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) override
STDMETHOD() QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override
HRESULT WINAPI Initialize(UINT cidl, PCUITEMID_CHILD_ARRAY apidl)
PITEMID_CHILD * m_apidl
STDMETHOD() HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam) override
STDMETHOD() InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) override
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
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
void pdump(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:311
const char * shdebugstr_guid(const struct _GUID *id)
Definition: debughlp.cpp:427
BOOL pcheck(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:349
#define ERROR_SUCCESS
Definition: deptool.c:10
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int idx
Definition: utils.c:41
#define IDS_SHV_COLUMN_NAME
Definition: resource.h:74
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
Definition: reg.c:1931
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3268
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)
Definition: reg.c:2830
LONG WINAPI RegEnumKeyW(HKEY hKey, DWORD dwIndex, LPWSTR lpName, DWORD cbName)
Definition: reg.c:2393
UINT uFlags
Definition: api.c:59
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define MAX_PATH
Definition: compat.h:34
#define lstrcpyW
Definition: compat.h:749
#define wcsicmp
Definition: compat.h:15
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
Definition: environ.c:519
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:320
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:382
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2313
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4261
HRESULT WINAPI IIDFromString(LPCOLESTR s, IID *iid)
Definition: compobj.c:2374
#define RRF_RT_REG_SZ
Definition: driver.c:575
CPlApplet * Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel *panel)
Definition: control.c:61
void Control_UnloadApplet(CPlApplet *applet)
Definition: control.c:45
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:326
LPVOID WINAPI SHAlloc(SIZE_T len)
Definition: shellole.c:304
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
Definition: shellpath.c:3257
BOOL WINAPI SHSimulateDrop(IDropTarget *pDrop, IDataObject *pDataObj, DWORD grfKeyState, PPOINTL lpPt, DWORD *pdwEffect)
Definition: ordinal.c:1828
#define MAKE_HRESULT(sev, fac, code)
Definition: dmerror.h:30
HINSTANCE hInst
Definition: dxdiag.c:13
static FRESULT validate(void *obj)
Definition: ff.c:2372
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
FxAutoRegKey hKey
GLuint buffer
Definition: glext.h:5915
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLfloat GLfloat p
Definition: glext.h:8902
GLuint64EXT * result
Definition: glext.h:11304
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
Definition: glfuncs.h:248
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
REFIID riid
Definition: atlbase.h:39
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_w
Definition: kernel32.h:32
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:581
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:601
#define END_COM_MAP()
Definition: atlcom.h:592
#define error(str)
Definition: mkdosfs.c:1605
LPCWSTR szPath
Definition: env.c:37
static HMODULE MODULEINFO DWORD cb
Definition: module.c:33
static LPOLESTR
Definition: stg_prop.c:27
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
static PROTOCOLDATA * pdata
Definition: protocol.c:158
REFCLSID clsid
Definition: msctf.c:82
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
_In_ HANDLE hFile
Definition: mswsock.h:90
unsigned int UINT
Definition: ndis.h:50
#define KEY_READ
Definition: nt_native.h:1023
#define FILE_ATTRIBUTE_HIDDEN
Definition: nt_native.h:703
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
#define L(x)
Definition: ntvdm.h:50
interface IBindCtx * LPBC
Definition: objfwd.h:18
const GUID IID_IDataObject
#define PathAddBackslashW
Definition: pathcch.h:301
#define PathAppendW
Definition: pathcch.h:309
#define LOWORD(l)
Definition: pedump.c:82
PITEMID_CHILD * _ILCopyaPidl(PCUITEMID_CHILD_ARRAY apidlsrc, UINT cidl)
Definition: pidl.c:2617
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:237
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:946
HRESULT WINAPI SHGetNameFromIDList(PCIDLIST_ABSOLUTE pidl, SIGDN sigdnName, PWSTR *ppszName)
Definition: pidl.c:1462
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2160
BOOL _ILIsSpecialFolder(LPCITEMIDLIST pidl)
Definition: pidl.c:1998
void _ILFreeaPidl(LPITEMIDLIST *apidl, UINT cidl)
Definition: pidl.c:2600
LPITEMIDLIST _ILCreateControlPanel(void)
Definition: pidl.c:1670
BOOL _ILIsCPanelStruct(LPCITEMIDLIST pidl)
Definition: pidl.c:2039
#define PT_CPLAPPLET
Definition: pidl.h:86
#define LVCFMT_LEFT
Definition: commctrl.h:2603
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
_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
Definition: shellapi.h:25
#define SEE_MASK_FLAG_DDEWAIT
Definition: shellapi.h:34
#define MAKE_COMPARE_HRESULT(x)
Definition: shellutils.h:621
HRESULT SHELL32_CompareDetails(IShellFolder2 *isf, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: shlfolder.cpp:275
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)
Definition: shlexec.cpp:2482
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
Definition: shlexec.cpp:2424
HRESULT hr
Definition: shlfolder.c:183
struct _SFV_CREATE SFV_CREATE
#define CSIDL_CONTROLS
Definition: shlobj.h:2176
#define IDS_CREATELINK
Definition: shresdef.h:222
#define IDS_SHV_COLUMN_COMMENTS
Definition: shresdef.h:67
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
const PCUITEMID_CHILD * PCUITEMID_CHILD_ARRAY
Definition: shtypes.idl:71
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
Definition: shtypes.idl:70
@ SHCOLSTATE_TYPE_STR
Definition: shtypes.idl:121
@ SHCOLSTATE_ONBYDEFAULT
Definition: shtypes.idl:125
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
Definition: shtypes.idl:57
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
#define _countof(array)
Definition: sndvol32.h:70
#define TRACE(s)
Definition: solgame.cpp:4
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:530
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
struct applet_info info[1]
Definition: cpanel.h:52
unsigned count
Definition: cpanel.h:49
STRRET str
Definition: shtypes.idl:108
Definition: ftp_var.h:139
Definition: copy.c:22
Definition: name.c:39
WORD colstate
Definition: shfldr.h:31
WORD offsComment
Definition: pidl.h:127
WCHAR szName[1]
Definition: pidl.h:128
WORD offsDispName
Definition: pidl.h:126
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
uint16_t * PWSTR
Definition: typedefs.h:56
const uint16_t * PCWSTR
Definition: typedefs.h:57
unsigned char * LPBYTE
Definition: typedefs.h:53
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint32_t ULONG
Definition: typedefs.h:59
Definition: pdh_main.c:94
static const WCHAR wszFile[]
Definition: urlmon_main.c:386
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
_In_ LPCSTR lpName
Definition: winbase.h:2789
_In_ LPCSTR _Out_writes_to_opt_ cchDisplayName LPSTR _Inout_ LPDWORD cchDisplayName
Definition: winbase.h:2791
_In_ PSID _Out_writes_to_opt_ cchName LPSTR _Inout_ LPDWORD cchName
Definition: winbase.h:2767
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define E_NOINTERFACE
Definition: winerror.h:2364
#define SEVERITY_SUCCESS
Definition: winerror.h:64
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define E_POINTER
Definition: winerror.h:2365
#define ERROR_NOT_FOUND
Definition: winerror.h:690
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define HKEY_CURRENT_USER
Definition: winreg.h:11
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
#define MK_SHIFT
Definition: winuser.h:2372
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
#define MFT_SEPARATOR
Definition: winuser.h:747
#define MFS_DEFAULT
Definition: winuser.h:751
#define MK_CONTROL
Definition: winuser.h:2373
#define MFS_ENABLED
Definition: winuser.h:753
#define MAKEINTRESOURCEA(i)
Definition: winuser.h:581
#define MFT_STRING
Definition: winuser.h:749
#define SW_SHOW
Definition: winuser.h:778
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
_In_ __drv_aliasesMem PSTRING Prefix
Definition: rtlfuncs.h:1644
static void Initialize()
Definition: xlate.c:212
#define IID_PPV_ARG(Itype, ppType)
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185