ReactOS 0.4.15-dev-8138-g1e75ea8
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
26/***********************************************************************
27* control panel implementation in shell namespace
28*/
29
31 public CEnumIDListBase
32{
33 public:
38 int RegisterRegistryCPanelApps(HKEY hkey_root, LPCWSTR szRepPath);
40
42 COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList)
44};
45
46/***********************************************************************
47* IShellFolder [ControlPanel] implementation
48*/
49
53};
54
56{
60};
61
63{
64}
65
67{
68}
69
71{
73 return E_FAIL;
74 AppendItemsFromEnumerator(pRegEnumerator);
75 return S_OK;
76}
77
78static LPITEMIDLIST _ILCreateCPanelApplet(LPCWSTR pszName, LPCWSTR pszDisplayName, LPCWSTR pszComment, int iIconIdx)
79{
81 LPITEMIDLIST pidl;
83 int cchName, cchDisplayName, cchComment, cbData;
84
85 /* Calculate lengths of given strings */
86 cchName = wcslen(pszName);
87 cchDisplayName = wcslen(pszDisplayName);
88 cchComment = wcslen(pszComment);
89
90 /* Allocate PIDL */
91 cbData = sizeof(pidl->mkid.cb) + sizeof(pData->type) + sizeof(pData->u.cpanel) - sizeof(pData->u.cpanel.szName)
92 + (cchName + cchDisplayName + cchComment + 3) * sizeof(WCHAR);
93 pidl = (LPITEMIDLIST)SHAlloc(cbData + sizeof(WORD));
94 if (!pidl)
95 return NULL;
96
97 /* Copy data to allocated memory */
98 pidl->mkid.cb = cbData;
99 pData = (PIDLDATA *)pidl->mkid.abID;
100 pData->type = PT_CPLAPPLET;
101
102 pCP = &pData->u.cpanel;
103 pCP->dummy = 0;
104 pCP->iconIdx = iIconIdx;
105 wcscpy(pCP->szName, pszName);
106 pCP->offsDispName = cchName + 1;
107 wcscpy(pCP->szName + pCP->offsDispName, pszDisplayName);
108 pCP->offsComment = pCP->offsDispName + cchDisplayName + 1;
109 wcscpy(pCP->szName + pCP->offsComment, pszComment);
110
111 /* Add PIDL NULL terminator */
112 *(WORD*)(pCP->szName + pCP->offsComment + cchComment + 1) = 0;
113
114 pcheck(pidl);
115
116 return pidl;
117}
118
119/**************************************************************************
120 * _ILGetCPanelPointer()
121 * gets a pointer to the control panel struct stored in the pidl
122 */
124{
126
127 if (pdata && pdata->type == PT_CPLAPPLET)
128 return (PIDLCPanelStruct *) & (pdata->u.cpanel);
129
130 return NULL;
131}
132
134{
136 if (!pData)
137 return E_FAIL;
138
139 CComPtr<IDefaultExtractIconInit> initIcon;
142 return hr;
143
144 initIcon->SetNormalIcon(pData->szName, (int)pData->iconIdx != -1 ? pData->iconIdx : 0);
145
146 return initIcon->QueryInterface(riid, ppvOut);
147}
148
150{
151 CPlApplet* applet = Control_LoadApplet(0, wpath, NULL);
152 int iconIdx;
153
154 if (applet)
155 {
156 for (UINT i = 0; i < applet->count; ++i)
157 {
158 if (applet->info[i].idIcon > 0)
159 iconIdx = -applet->info[i].idIcon; /* negative icon index instead of icon number */
160 else
161 iconIdx = 0;
162
164 applet->info[i].name,
165 applet->info[i].info,
166 iconIdx);
167
168 if (pidl)
169 AddToEnumList(pidl);
170 }
171 Control_UnloadApplet(applet);
172 }
173 return TRUE;
174}
175
177{
180 HKEY hkey;
181
182 int cnt = 0;
183
184 if (RegOpenKeyW(hkey_root, szRepPath, &hkey) == ERROR_SUCCESS)
185 {
186 int idx = 0;
187
188 for(; ; idx++)
189 {
190 DWORD nameLen = MAX_PATH;
191 DWORD valueLen = MAX_PATH;
193
194 if (RegEnumValueW(hkey, idx, name, &nameLen, NULL, NULL, (LPBYTE)&value, &valueLen) != ERROR_SUCCESS)
195 break;
196
198 {
200 }
201
203 ++cnt;
204 }
205 RegCloseKey(hkey);
206 }
207
208 return cnt;
209}
210
211/**************************************************************************
212 * CControlPanelEnum::CreateCPanelEnumList()
213 */
215{
219
220 TRACE("(%p)->(flags=0x%08x)\n", this, dwFlags);
221
222 /* enumerate the control panel applets */
223 if (dwFlags & SHCONTF_NONFOLDERS)
224 {
225 LPWSTR p;
226
229 wcscpy(p, L"*.cpl");
230
231 hFile = FindFirstFileW(szPath, &wfd);
232
234 {
235 do
236 {
237 if (!(dwFlags & SHCONTF_INCLUDEHIDDEN) && (wfd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN))
238 continue;
239
240 if (!(wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
241 wcscpy(p, wfd.cFileName);
242 if (wcscmp(wfd.cFileName, L"ncpa.cpl"))
244 }
245 } while(FindNextFileW(hFile, &wfd));
247 }
248
249 RegisterRegistryCPanelApps(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls");
250 RegisterRegistryCPanelApps(HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls");
251 }
252 return TRUE;
253}
254
256{
257 pidlRoot = NULL; /* absolute pidl */
258}
259
261{
262 TRACE("-- destroying IShellFolder(%p)\n", this);
264}
265
266/**************************************************************************
267* CControlPanelFolder::ParseDisplayName
268*/
270 HWND hwndOwner,
271 LPBC pbc,
272 LPOLESTR lpszDisplayName,
273 DWORD *pchEaten,
274 PIDLIST_RELATIVE *ppidl,
275 DWORD *pdwAttributes)
276{
277 /* We only support parsing guid names */
278 return m_regFolder->ParseDisplayName(hwndOwner, pbc, lpszDisplayName, pchEaten, ppidl, pdwAttributes);
279}
280
281/**************************************************************************
282* CControlPanelFolder::EnumObjects
283*/
284HRESULT WINAPI CControlPanelFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList)
285{
286 CComPtr<IEnumIDList> pRegEnumerator;
287 m_regFolder->EnumObjects(hwndOwner, dwFlags, &pRegEnumerator);
288
289 return ShellObjectCreatorInit<CControlPanelEnum>(dwFlags, pRegEnumerator, IID_PPV_ARG(IEnumIDList, ppEnumIDList));
290}
291
292/**************************************************************************
293* CControlPanelFolder::BindToObject
294*/
297 LPBC pbcReserved,
298 REFIID riid,
299 LPVOID *ppvOut)
300{
301 return m_regFolder->BindToObject(pidl, pbcReserved, riid, ppvOut);
302}
303
304/**************************************************************************
305* CControlPanelFolder::BindToStorage
306*/
309 LPBC pbcReserved,
310 REFIID riid,
311 LPVOID *ppvOut)
312{
313 FIXME("(%p)->(pidl=%p,%p,%s,%p) stub\n", this, pidl, pbcReserved, shdebugstr_guid(&riid), ppvOut);
314
315 *ppvOut = NULL;
316 return E_NOTIMPL;
317}
318
319/**************************************************************************
320* CControlPanelFolder::CompareIDs
321*/
323{
324 /* Dont use SHELL32_CompareGuidItems because it would cause guid items to come first */
325 if (_ILIsSpecialFolder(pidl1) || _ILIsSpecialFolder(pidl2))
326 {
327 return SHELL32_CompareDetails(this, lParam, pidl1, pidl2);
328 }
329 PIDLCPanelStruct *pData1 = _ILGetCPanelPointer(pidl1);
330 PIDLCPanelStruct *pData2 = _ILGetCPanelPointer(pidl2);
331
332 if (!pData1 || !pData2 || LOWORD(lParam) >= CONTROLPANEL_COL_COUNT)
333 return E_INVALIDARG;
334
335 int result;
336 switch(LOWORD(lParam))
337 {
339 result = wcsicmp(pData1->szName + pData1->offsDispName, pData2->szName + pData2->offsDispName);
340 break;
342 result = wcsicmp(pData1->szName + pData1->offsComment, pData2->szName + pData2->offsComment);
343 break;
344 default:
345 ERR("Got wrong lParam!\n");
346 return E_INVALIDARG;
347 }
348
350}
351
352/**************************************************************************
353* CControlPanelFolder::CreateViewObject
354*/
356{
357 CComPtr<IShellView> pShellView;
359
360 TRACE("(%p)->(hwnd=%p,%s,%p)\n", this, hwndOwner, shdebugstr_guid(&riid), ppvOut);
361
362 if (ppvOut) {
363 *ppvOut = NULL;
364
365 if (IsEqualIID(riid, IID_IDropTarget)) {
366 WARN("IDropTarget not implemented\n");
367 hr = E_NOTIMPL;
368 } else if (IsEqualIID(riid, IID_IContextMenu)) {
369 WARN("IContextMenu not implemented\n");
370 hr = E_NOTIMPL;
371 } else if (IsEqualIID(riid, IID_IShellView)) {
372 SFV_CREATE sfvparams = {sizeof(SFV_CREATE), this};
373 hr = SHCreateShellFolderView(&sfvparams, (IShellView**)ppvOut);
374 }
375 }
376 TRACE("--(%p)->(interface=%p)\n", this, ppvOut);
377 return hr;
378}
379
380/**************************************************************************
381* CControlPanelFolder::GetAttributesOf
382*/
384{
385 HRESULT hr = S_OK;
386 static const DWORD dwControlPanelAttributes =
387 SFGAO_HASSUBFOLDER | SFGAO_FOLDER | SFGAO_CANLINK;
388
389 TRACE("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n",
390 this, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0);
391
392 if (!rgfInOut)
393 return E_INVALIDARG;
394 if (cidl && !apidl)
395 return E_INVALIDARG;
396
397 if (*rgfInOut == 0)
398 *rgfInOut = ~0;
399
400 if (!cidl)
401 {
402 *rgfInOut &= dwControlPanelAttributes;
403 }
404 else
405 {
406 while(cidl > 0 && *apidl)
407 {
408 pdump(*apidl);
409 if (_ILIsCPanelStruct(*apidl))
410 *rgfInOut &= SFGAO_CANLINK;
411 else if (_ILIsSpecialFolder(*apidl))
412 m_regFolder->GetAttributesOf(1, apidl, rgfInOut);
413 else
414 ERR("Got unknown pidl\n");
415 apidl++;
416 cidl--;
417 }
418 }
419 /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */
420 *rgfInOut &= ~SFGAO_VALIDATE;
421
422 TRACE("-- result=0x%08x\n", *rgfInOut);
423 return hr;
424}
425
426/**************************************************************************
427* CControlPanelFolder::GetUIObjectOf
428*
429* PARAMETERS
430* HWND hwndOwner, //[in ] Parent window for any output
431* UINT cidl, //[in ] array size
432* LPCITEMIDLIST* apidl, //[in ] simple pidl array
433* REFIID riid, //[in ] Requested Interface
434* UINT* prgfInOut, //[ ] reserved
435* LPVOID* ppvObject) //[out] Resulting Interface
436*
437*/
439 UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut)
440{
441 LPVOID pObj = NULL;
443
444 TRACE("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n",
445 this, hwndOwner, cidl, apidl, shdebugstr_guid(&riid), prgfInOut, ppvOut);
446
447 if (ppvOut) {
448 *ppvOut = NULL;
449
450 if (IsEqualIID(riid, IID_IContextMenu) && (cidl >= 1)) {
451 /* HACK: We should use callbacks from CDefaultContextMenu instead of creating one on our own */
452 BOOL bHasCpl = FALSE;
453 for (UINT i = 0; i < cidl; i++)
454 {
455 if(_ILIsCPanelStruct(apidl[i]))
456 {
457 bHasCpl = TRUE;
458 }
459 }
460
461 if (bHasCpl)
462 hr = ShellObjectCreatorInit<CCPLItemMenu>(cidl, apidl, riid, &pObj);
463 else
464 hr = m_regFolder->GetUIObjectOf(hwndOwner, cidl, apidl, riid, prgfInOut, &pObj);
465 } else if (IsEqualIID(riid, IID_IDataObject) && (cidl >= 1)) {
466 hr = IDataObject_Constructor(hwndOwner, pidlRoot, apidl, cidl, TRUE, (IDataObject **)&pObj);
467 } else if ((IsEqualIID(riid, IID_IExtractIconA) || IsEqualIID(riid, IID_IExtractIconW)) && (cidl == 1)) {
468 if (_ILGetCPanelPointer(apidl[0]))
469 hr = CCPLExtractIcon_CreateInstance(this, apidl[0], riid, &pObj);
470 else
471 hr = m_regFolder->GetUIObjectOf(hwndOwner, cidl, apidl, riid, prgfInOut, &pObj);
472 } else {
474 }
475
476 if (SUCCEEDED(hr) && !pObj)
478
479 *ppvOut = pObj;
480 }
481 TRACE("(%p)->hr=0x%08x\n", this, hr);
482 return hr;
483}
484
485/**************************************************************************
486* CControlPanelFolder::GetDisplayNameOf
487*/
489{
490 if (!pidl)
491 return S_FALSE;
492
493 PIDLCPanelStruct *pCPanel = _ILGetCPanelPointer(pidl);
494
495 if (pCPanel)
496 {
497 return SHSetStrRet(strRet, pCPanel->szName + pCPanel->offsDispName);
498 }
499 else if (_ILIsSpecialFolder(pidl))
500 {
501 return m_regFolder->GetDisplayNameOf(pidl, dwFlags, strRet);
502 }
503
504 return E_FAIL;
505}
506
507/**************************************************************************
508* CControlPanelFolder::SetNameOf
509* Changes the name of a file object or subfolder, possibly changing its item
510* identifier in the process.
511*
512* PARAMETERS
513* HWND hwndOwner, //[in ] Owner window for output
514* LPCITEMIDLIST pidl, //[in ] simple pidl of item to change
515* LPCOLESTR lpszName, //[in ] the items new display name
516* DWORD dwFlags, //[in ] SHGNO formatting flags
517* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned
518*/
520 LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
521{
522 FIXME("(%p)->(%p,pidl=%p,%s,%u,%p)\n", this, hwndOwner, pidl, debugstr_w(lpName), dwFlags, pPidlOut);
523 return E_FAIL;
524}
525
527{
528 FIXME("(%p)\n", this);
529 return E_NOTIMPL;
530}
531
533{
534 FIXME("(%p)\n", this);
535 return E_NOTIMPL;
536}
537
539{
540 TRACE("(%p)\n", this);
541
542 if (pSort) *pSort = 0;
543 if (pDisplay) *pDisplay = 0;
544 return S_OK;
545}
546
548{
549 TRACE("(%p)\n", this);
550
551 if (!pcsFlags || iColumn >= CONTROLPANEL_COL_COUNT)
552 return E_INVALIDARG;
553 *pcsFlags = ControlPanelSFHeader[iColumn].colstate;
554 return S_OK;
555}
556
558{
559 FIXME("(%p)\n", this);
560 return E_NOTIMPL;
561}
562
564{
565 if (!psd || iColumn >= CONTROLPANEL_COL_COUNT)
566 return E_INVALIDARG;
567
568 if (!pidl)
569 {
570 psd->fmt = ControlPanelSFHeader[iColumn].fmt;
571 psd->cxChar = ControlPanelSFHeader[iColumn].cxChar;
572 return SHSetStrRet(&psd->str, shell32_hInstance, ControlPanelSFHeader[iColumn].colnameid);
573 }
574 else if (_ILIsSpecialFolder(pidl))
575 {
576 return m_regFolder->GetDetailsOf(pidl, iColumn, psd);
577 }
578 else
579 {
580 PIDLCPanelStruct *pCPanel = _ILGetCPanelPointer(pidl);
581
582 if (!pCPanel)
583 return E_FAIL;
584
585 switch(iColumn)
586 {
588 return SHSetStrRet(&psd->str, pCPanel->szName + pCPanel->offsDispName);
590 return SHSetStrRet(&psd->str, pCPanel->szName + pCPanel->offsComment);
591 }
592 }
593
594 return E_FAIL;
595}
596
598{
599 FIXME("(%p)\n", this);
600 return E_NOTIMPL;
601}
602
603/************************************************************************
604 * CControlPanelFolder::GetClassID
605 */
607{
608 TRACE("(%p)\n", this);
609
610 if (!lpClassId)
611 return E_POINTER;
612 *lpClassId = CLSID_ControlPanel;
613
614 return S_OK;
615}
616
617/************************************************************************
618 * CControlPanelFolder::Initialize
619 *
620 * NOTES: it makes no sense to change the pidl
621 */
623{
624 if (pidlRoot)
626
627 pidlRoot = ILClone(pidl);
628
629 /* Create the inner reg folder */
630 HRESULT hr;
631 hr = CRegFolder_CreateInstance(&CLSID_ControlPanel,
632 pidlRoot,
633 L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}",
634 L"ControlPanel",
637 return hr;
638
639 return S_OK;
640}
641
642/**************************************************************************
643 * CControlPanelFolder::GetCurFolder
644 */
646{
647 TRACE("(%p)->(%p)\n", this, pidl);
648
649 if (!pidl)
650 return E_POINTER;
651 *pidl = ILClone(pidlRoot);
652 return S_OK;
653}
654
656{
657 m_apidl = NULL;
658 m_cidl = 0;
659}
660
662{
663 m_cidl = cidl;
664 m_apidl = _ILCopyaPidl(apidl, m_cidl);
665 if (m_cidl && !m_apidl)
666 return E_OUTOFMEMORY;
667
668 return S_OK;
669}
670
672{
674}
675
677 HMENU hMenu,
678 UINT indexMenu,
679 UINT idCmdFirst,
680 UINT idCmdLast,
681 UINT uFlags)
682{
683 _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst, MFT_STRING, MAKEINTRESOURCEW(IDS_OPEN), MFS_DEFAULT);
685 _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + 1, MFT_STRING, MAKEINTRESOURCEW(IDS_CREATELINK), MFS_ENABLED);
686
687 return MAKE_HRESULT(SEVERITY_SUCCESS, 0, 2);
688}
689
692
693/**************************************************************************
694* ICPanel_IContextMenu_InvokeCommand()
695*/
697{
698 HRESULT hResult;
699
701 if(!pCPanel)
702 return E_FAIL;
703
704 TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n", this, lpcmi, lpcmi->lpVerb, lpcmi->hwnd);
705
706 if (lpcmi->lpVerb == MAKEINTRESOURCEA(0))
707 {
708 /* Hardcode the command here; Executing a cpl file would be fine but we also need to run things like console.dll */
709 WCHAR wszParams[MAX_PATH];
710 PCWSTR wszFile = L"rundll32.exe";
711 PCWSTR wszFormat = L"shell32.dll,Control_RunDLL %s,%s";
712
713 wsprintfW(wszParams, wszFormat, pCPanel->szName, pCPanel->szName + pCPanel->offsDispName);
714
715 /* Note: we pass the applet name to Control_RunDLL to distinguish between multiple applets in one .cpl file */
716 ShellExecuteW(NULL, NULL, wszFile, wszParams, NULL, 0);
717 }
718 else if (lpcmi->lpVerb == MAKEINTRESOURCEA(1)) //FIXME
719 {
720 CComPtr<IDataObject> pDataObj;
722
723 hResult = SHCreateDataObject(pidl, m_cidl, m_apidl, NULL, IID_PPV_ARG(IDataObject, &pDataObj));
724 if (FAILED(hResult))
725 return hResult;
726
727 SHFree(pidl);
728
729 //FIXME: Use SHCreateLinks
730 CComPtr<IShellFolder> psf;
731 CComPtr<IDropTarget> pDT;
732
733 hResult = SHGetDesktopFolder(&psf);
734 if (FAILED(hResult))
735 return hResult;
736
737 hResult = psf->CreateViewObject(NULL, IID_PPV_ARG(IDropTarget, &pDT));
738 if (FAILED(hResult))
739 return hResult;
740
741 SHSimulateDrop(pDT, pDataObj, MK_CONTROL|MK_SHIFT, NULL, NULL);
742 }
743 return S_OK;
744}
745
746/**************************************************************************
747 * ICPanel_IContextMenu_GetCommandString()
748 *
749 */
751 UINT_PTR idCommand,
752 UINT uFlags,
753 UINT* lpReserved,
754 LPSTR lpszName,
755 UINT uMaxNameLen)
756{
757 TRACE("(%p)->(idcom=%lx flags=%x %p name=%p len=%x)\n", this, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen);
758
759 FIXME("unknown command string\n");
760 return E_FAIL;
761}
762
763/**************************************************************************
764* ICPanel_IContextMenu_HandleMenuMsg()
765*/
767 UINT uMsg,
770{
771 TRACE("ICPanel_IContextMenu_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n", this, uMsg, wParam, lParam);
772
773 return E_NOTIMPL;
774}
775
776/**************************************************************************
777* COpenControlPanel
778*/
779
781{
782 PIDLIST_ABSOLUTE pidlFree = NULL;
783 if (IS_INTRESOURCE(pidl))
784 {
785 HRESULT hr = SHGetSpecialFolderLocation(NULL, (UINT)(SIZE_T)pidl, &pidlFree);
786 if (FAILED(hr))
787 return hr;
788 pidl = pidlFree;
789 }
790 HRESULT hr = SHGetNameFromIDList(pidl, SIGDN_DESKTOPABSOLUTEPARSING, Name);
791 ILFree(pidlFree);
792 return hr;
793}
794
796{
797 PWSTR cpfolder;
799 if (SUCCEEDED(hr))
800 {
801 hr = StringCchPrintfW(Buf, cchBuf, L"%s\\%s%s", cpfolder, Prefix, InFolderParse);
802 SHFree(cpfolder);
803 }
804 return hr;
805}
806
808{
810 HKEY hNSKey;
812 wsprintfW(key, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\%s\\NameSpace",
813 Wow64 ? L"ControlPanelWOW64" : L"ControlPanel");
814 LSTATUS error = RegOpenKeyExW(hKey, key, 0, KEY_READ, &hNSKey);
815 if (error)
817 for (DWORD i = 0; RegEnumKeyW(hNSKey, i, key, _countof(key)) == ERROR_SUCCESS; ++i)
818 {
821 {
822 wsprintfW(buf, L"CLSID\\%s", key);
823 DWORD cb = sizeof(buf);
824 if (RegGetValueW(HKEY_CLASSES_ROOT, buf, L"System.ApplicationName",
826 {
827 if (!lstrcmpiW(buf, Canonical))
828 {
830 hr = S_OK;
831 }
832 }
833 }
834 }
835 RegCloseKey(hNSKey);
836 return hr;
837}
838
840{
841 HRESULT hr = E_FAIL;
842 if (FAILED(hr))
844 if (FAILED(hr))
846 if (FAILED(hr))
848 if (FAILED(hr))
850 return hr;
851}
852
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}
887
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}
910
912{
913 *pView = CPVIEW_CLASSIC;
914 return S_OK;
915}
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)
EXTERN_C void WINAPI Control_RunDLLW(HWND hWnd, HINSTANCE hInst, LPCWSTR cmd, DWORD nCmdShow)
Definition: control.c:1172
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:3964
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(const GUID *pGuid, LPCITEMIDLIST pidlRoot, LPCWSTR lpszPath, LPCWSTR lpszEnumKeyName, REFIID riid, void **ppv)
Definition: CRegFolder.cpp:866
#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 EXTERN_C
Definition: basetyps.h:12
#define FIXME(fmt,...)
Definition: debug.h:114
#define WARN(fmt,...)
Definition: debug.h:115
#define ERR(fmt,...)
Definition: debug.h:113
#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:428
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:3260
BOOL WINAPI SHSimulateDrop(IDropTarget *pDrop, IDataObject *pDataObj, DWORD grfKeyState, PPOINTL lpPt, DWORD *pdwEffect)
Definition: ordinal.c:1824
#define MAKE_HRESULT(sev, fac, code)
Definition: dmerror.h:30
HINSTANCE hInst
Definition: dxdiag.c:13
static BOOL _ILIsSpecialFolder(LPCITEMIDLIST pidl)
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:2704
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:237
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:940
HRESULT WINAPI SHGetNameFromIDList(PCIDLIST_ABSOLUTE pidl, SIGDN sigdnName, PWSTR *ppszName)
Definition: pidl.c:1456
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2228
void _ILFreeaPidl(LPITEMIDLIST *apidl, UINT cidl)
Definition: pidl.c:2687
LPITEMIDLIST _ILCreateControlPanel(void)
Definition: pidl.c:1664
BOOL _ILIsCPanelStruct(LPCITEMIDLIST pidl)
Definition: pidl.c:2035
#define PT_CPLAPPLET
Definition: pidl.h:86
#define LVCFMT_LEFT
Definition: commctrl.h:2598
#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:577
HRESULT SHELL32_CompareDetails(IShellFolder2 *isf, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: shlfolder.cpp:247
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:2486
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
Definition: shlexec.cpp:2428
HRESULT hr
Definition: shlfolder.c:183
struct _SFV_CREATE SFV_CREATE
#define CSIDL_CONTROLS
Definition: shlobj.h:2169
#define IDS_CREATELINK
Definition: shresdef.h:221
#define IDS_SHV_COLUMN_COMMENTS
Definition: shresdef.h:69
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:115
WCHAR szName[1]
Definition: pidl.h:116
WORD offsDispName
Definition: pidl.h:114
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:2369
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
#define MFT_SEPARATOR
Definition: winuser.h:744
#define MFS_DEFAULT
Definition: winuser.h:748
#define MK_CONTROL
Definition: winuser.h:2370
#define MFS_ENABLED
Definition: winuser.h:750
#define MAKEINTRESOURCEA(i)
Definition: winuser.h:581
#define MFT_STRING
Definition: winuser.h:746
#define SW_SHOW
Definition: winuser.h:775
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
_In_ __drv_aliasesMem PSTRING Prefix
Definition: rtlfuncs.h:1630
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