ReactOS 0.4.16-dev-2284-g3529151
addresseditbox.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Explorer
3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4 * PURPOSE: The combo box of the address band
5 * COPYRIGHT: Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
6 * Copyright 2023-2026 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
7 */
8
9#include "precomp.h"
10
11/*
12TODO:
13 Add drag and drop of icon in edit box
14 Handle change notifies to update appropriately
15*/
16
18 fCombobox(WC_COMBOBOXEXW, this),
19 fEditWindow(WC_EDITW, this),
20 fSite(NULL)
21{
22}
23
25{
26}
27
29{
30 if (!pOwner)
31 {
32 CComPtr<IBrowserService> browserService;
34 if (SUCCEEDED(hResult))
35 AtlUnadvise(browserService, DIID_DWebBrowserEvents, fAdviseCookie);
36 fSite = NULL;
37 }
38 // connect to browser connection point
39 return 0;
40}
41
43{
44 return E_NOTIMPL;
45}
46
48{
49 return E_NOTIMPL;
50}
51
52HRESULT STDMETHODCALLTYPE CAddressEditBox::Init(HWND comboboxEx, HWND editControl, long param14, IUnknown *param18)
53{
54 CComPtr<IBrowserService> browserService;
55
56 fCombobox.SubclassWindow(comboboxEx);
57 fEditWindow.SubclassWindow(editControl);
58 fSite = param18;
59 hComboBoxEx = comboboxEx;
60
62
63 // take advice to watch events
64 HRESULT hResult = IUnknown_QueryService(param18, SID_SShellBrowser, IID_PPV_ARG(IBrowserService, &browserService));
65 if (SUCCEEDED(hResult))
66 {
67 hResult = AtlAdvise(browserService, static_cast<IDispatch *>(this), DIID_DWebBrowserEvents, &fAdviseCookie);
68 }
69
70 return hResult;
71}
72
74{
75 m_pidlLastParsed.Free();
76 m_pidlLastParsed.Attach(ILCreateFromPathW(pszPath));
78}
79
81{
82 pszText.Free();
84 if (!pszText.Allocate(cchMax))
85 return FALSE;
86 return fCombobox.GetWindowText(pszText, cchMax);
87}
88
90{
91 /* Get the current pidl of the browser */
92 CComHeapPtr<ITEMIDLIST> absolutePIDL;
93 HRESULT hr = GetAbsolutePidl(&absolutePIDL);
95 return hr;
96
97 /* Fill the combobox */
98 ATLASSERT(absolutePIDL != NULL);
99 PopulateComboBox(absolutePIDL);
100
101 /* Get pShellFolder and pidlChild */
102 CComPtr<IShellFolder> pShellFolder;
103 PCITEMID_CHILD pidlChild;
104 hr = SHBindToParent(absolutePIDL, IID_PPV_ARG(IShellFolder, &pShellFolder), &pidlChild);
106 return hr;
107
108 /* Get ready to set the displayed item */
110 item.iItem = -1; /* -1 to specify the displayed item */
111 item.iImage = SHMapPIDLToSystemImageListIndex(pShellFolder, pidlChild, &item.iSelectedImage);
112
113 /* Set the path if filesystem; otherwise use the name */
114 WCHAR szPathOrName[MAX_PATH];
115 SHGDNF flags = SHGDN_FORADDRESSBAR;
117 flags |= SHGDN_FORPARSING;
118
119 if (SUCCEEDED(IEGetNameAndFlags(absolutePIDL, flags, szPathOrName, _countof(szPathOrName), NULL)))
120 item.pszText = szPathOrName;
121
122 /* Ownership of absolutePIDL will be moved to fCombobox. See CBEN_DELETEITEM */
123 item.lParam = reinterpret_cast<LPARAM>(absolutePIDL.Detach());
124
125 fCombobox.SendMessage(CBEM_SETITEM, 0, reinterpret_cast<LPARAM>(&item)); /* Set it! */
126 return S_OK;
127}
128
130{
132 HRESULT hr = IUnknown_QueryService(fSite, SID_STopLevelBrowser, IID_PPV_ARG(IBrowserService, &isb));
134 return hr;
135
136 hr = isb->GetPidl(pAbsolutePIDL);
138 return hr;
139
140 return S_OK;
141}
142
143/* Execute command line from address bar */
145{
146 /* Get command line */
147 CComHeapPtr<WCHAR> pszCmdLine;
148 if (!GetComboBoxText(pszCmdLine))
149 return FALSE;
150
151 /* Split 1st parameter from trailing arguments */
152 PWCHAR args = PathGetArgsW(pszCmdLine);
153 PathRemoveArgsW(pszCmdLine);
154
155 PathUnquoteSpacesW(pszCmdLine); /* Unquote the 1st parameter */
156
157 /* Get ready for execution */
158 SHELLEXECUTEINFOW info = { sizeof(info), SEE_MASK_FLAG_NO_UI, m_hWnd };
159 info.lpFile = pszCmdLine;
160 info.lpParameters = args;
161 info.nShow = SW_SHOWNORMAL;
162
163 /* Set current directory */
164 WCHAR dir[MAX_PATH] = L"";
166 if (SUCCEEDED(GetAbsolutePidl(&pidl)))
167 {
169 info.lpDirectory = dir;
170 }
171
172 if (!::ShellExecuteExW(&info)) /* Execute! */
173 return FALSE;
174
176 return TRUE;
177}
178
180{
181 ULONG eaten, attributes;
184 CComPtr<IShellFolder> psfCurrent;
185 HRESULT hr;
186
187 m_pidlLastParsed.Free();
188
192 return hr;
193
194 HWND topLevelWindow;
195 hr = IUnknown_GetWindow(pbs, &topLevelWindow);
197 return hr;
198
199 /* Get the path to browse and expand it if needed */
202 return E_FAIL;
203
204 INT addressLength = (wcschr(input, L'%') ? ::SHExpandEnvironmentStringsW(input, NULL, 0) : 0);
205 if (addressLength <= 0 ||
206 !address.Allocate(addressLength + 1) ||
208 {
209 address.Free();
210 address.Attach(input.Detach());
211 }
212
213 /* Try to parse a relative path and if it fails, try to browse an absolute path */
214 CComPtr<IShellFolder> psfDesktop;
215 hr = SHGetDesktopFolder(&psfDesktop);
217 return hr;
218
219 hr = pbs->GetPidl(&pidlCurrent);
221 goto parseabsolute;
222
223 if (!pidlCurrent->mkid.cb)
224 {
225 psfCurrent = psfDesktop;
226 }
227 else
228 {
229 hr = psfDesktop->BindToObject(pidlCurrent, NULL, IID_PPV_ARG(IShellFolder, &psfCurrent));
231 goto parseabsolute;
232
234
235 WCHAR szPath[MAX_PATH], szFullPath[MAX_PATH];
236 if (SHGetPathFromIDListW(pidlCurrent, szPath)) // File-system?
237 {
238 if (PathIsRelativeW(address)) // Relative path?
239 {
241 if (GetFullPathNameW(szPath, _countof(szFullPath), szFullPath, NULL))
242 {
243 address.Free();
244 SHStrDupW(szFullPath, &address);
245 }
246 }
247 else if (address[0] == L'\\' && address[1] != L'\\') // Drive letter omitted?
248 {
249 // GetFullPathNameW won't resolve drive letter
251 if (iDrive >= 0)
252 {
253 PathBuildRootW(szPath, iDrive);
255 if (GetFullPathNameW(szPath, _countof(szFullPath), szFullPath, NULL))
256 {
257 address.Free();
258 SHStrDupW(szFullPath, &address);
259 }
260 }
261 }
262 else if (StrChrW(address, L'.') && PathFileExistsW(address)) // Trailing relative path?
263 {
264 if (GetFullPathNameW(address, _countof(szFullPath), szFullPath, NULL))
265 {
266 address.Free();
267 SHStrDupW(szFullPath, &address);
268 }
269 }
270 }
271 }
272
273 hr = psfCurrent->ParseDisplayName(topLevelWindow, NULL, address, &eaten, &pidlRelative, &attributes);
274 if (SUCCEEDED(hr))
275 {
276 m_pidlLastParsed.Attach(ILCombine(pidlCurrent, pidlRelative));
277 return S_OK;
278 }
279
280parseabsolute:
281 /* We couldn't parse a relative path, attempt to parse an absolute path */
282 hr = psfDesktop->ParseDisplayName(topLevelWindow, NULL, address, &eaten, &m_pidlLastParsed, &attributes);
283 return hr;
284}
285
287{
290 return E_FAIL;
291
293
294 return hRet;
295}
296
298{
299 BOOL bParsedForExec = FALSE;
300 HRESULT hr;
301
302 /*
303 * Parse the path if it wasn't parsed
304 */
305 if (!m_pidlLastParsed)
306 {
307 hr = ParseNow(0);
308
309 /* If the destination path doesn't exist then display an error message */
311 {
312 if (ExecuteCommandLine())
313 return S_OK;
314
316 }
317
318 if (!m_pidlLastParsed)
319 return E_FAIL;
320
321 bParsedForExec = TRUE;
322 }
323
324 /*
325 * Get the IShellBrowser and IBrowserService interfaces of the shell browser
326 */
330 return hr;
331
332 /*
333 * Get the current pidl of the shellbrowser and check if it is the same with the parsed one
334 */
335 PIDLIST_ABSOLUTE pidl;
336 hr = GetAbsolutePidl(&pidl);
338 {
339 m_pidlLastParsed.Free();
340 return hr;
341 }
342
343 BOOL bEqual = ILIsEqual(pidl, m_pidlLastParsed);
344 ILFree(pidl);
345 if (bEqual)
346 {
347 m_pidlLastParsed.Free();
348 return S_OK;
349 }
350
351 /*
352 * Attempt to browse to the parsed pidl
353 */
354 hr = pisb->BrowseObject(m_pidlLastParsed, SBSP_SAMEBROWSER | SBSP_ABSOLUTE);
355 if (SUCCEEDED(hr))
356 return hr;
357
358 /*
359 * Browsing to the pidl failed so it's not a folder. So invoke its default command.
360 */
361 HWND hWnd;
362 if (FAILED(IUnknown_GetWindow(pisb, &hWnd)))
363 hWnd = NULL;
364
365 LPCITEMIDLIST pidlChild;
368 if (SUCCEEDED(hr))
369 hr = SHInvokeDefaultCommand(hWnd, sf, pidlChild);
370
371 if (bParsedForExec)
372 m_pidlLastParsed.Free(); // Throw away the non-folder item we just parsed
373
374 RefreshAddress(); // Set the address back to a valid folder
375 return hr;
376}
377
379{
380 return E_NOTIMPL;
381}
382
384 HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
385{
386 LPNMHDR hdr;
387
388 if (theResult)
389 *theResult = 0;
390
391 switch (uMsg)
392 {
393 case WM_COMMAND:
394 {
396 {
398 PIDLIST_ABSOLUTE pidl =
400 m_pidlLastParsed.Free();
401 if (pidl)
402 m_pidlLastParsed.Attach(ILClone(pidl));
403
404 Execute(0);
405 }
406 break;
407 }
408 case WM_NOTIFY:
409 {
410 hdr = (LPNMHDR) lParam;
411 if (hdr->code == CBEN_ENDEDIT)
412 {
413 NMCBEENDEDITW *endEdit = (NMCBEENDEDITW*) lParam;
414 if (endEdit->iWhy == CBENF_RETURN)
415 {
416 Execute(0);
417 }
418 else if (endEdit->iWhy == CBENF_ESCAPE)
419 {
420 /* Reset the contents of the combo box */
422 }
423 }
424 else if (hdr->code == CBEN_DELETEITEM)
425 {
427 LPITEMIDLIST itemPidl = (LPITEMIDLIST)pCBEx->ceItem.lParam;
428 if (itemPidl)
429 {
430 ILFree(itemPidl);
431 }
432 }
433 break;
434 }
435 }
436 return S_OK;
437}
438
440{
441 if (fCombobox.m_hWnd == hWnd)
442 return S_OK;
443 if (fEditWindow.m_hWnd == hWnd)
444 return S_OK;
445 return S_FALSE;
446}
447
449 const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText)
450{
451 return E_NOTIMPL;
452}
453
455 DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
456{
457 return E_NOTIMPL;
458}
459
461{
462 return E_NOTIMPL;
463}
464
466{
467 return E_NOTIMPL;
468}
469
471 REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
472{
473 return E_NOTIMPL;
474}
475
477 WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
478{
479 if (pDispParams == NULL)
480 return E_INVALIDARG;
481
482 switch (dispIdMember)
483 {
486 m_pidlLastParsed.Free();
488 break;
489 }
490 return S_OK;
491}
492
494{
495 if (pClassID == NULL)
496 return E_POINTER;
497 *pClassID = CLSID_AddressEditBox;
498 return S_OK;
499}
500
502{
503 return E_NOTIMPL;
504}
505
507{
508 return E_NOTIMPL;
509}
510
512{
513 return E_NOTIMPL;
514}
515
517{
518 return E_NOTIMPL;
519}
520
522{
523 HRESULT hr;
524 LPITEMIDLIST pidl;
525 int indent = 0;
526 int index;
527
529 for (int i = 0; i < index; i++)
532
533 /* Calculate the indent level. No need to clone the pidl */
534 pidl = pidlCurrent;
535 do
536 {
537 if(!pidl->mkid.cb)
538 break;
539 pidl = ILGetNext(pidl);
540 indent++;
541 } while (pidl);
542 index = indent;
543
544 /* Add every id from the pidl in the combo box */
545 pidl = ILClone(pidlCurrent);
546 do
547 {
548 AddComboBoxItem(pidl, 0, index);
549 ILRemoveLastID(pidl);
550 index--;
551 } while (index >= 0);
552 ILFree(pidl);
553
554 /* Add the items of the desktop */
555 FillOneLevel(0, 1, indent);
556
557 /* Add the items of My Computer */
560 return;
561
563 {
564 if (ILIsEqual(i, pidl))
565 {
567 break;
568 }
569 index++;
570 }
571 ILFree(pidl);
572}
573
575{
576 HRESULT hr;
577 WCHAR buf[4096];
578
579 LPCITEMIDLIST pidlChild;
581 hr = SHBindToParent(pidl, IID_PPV_ARG(IShellFolder, &sf), &pidlChild);
583 return;
584
585 STRRET strret;
586 hr = sf->GetDisplayNameOf(pidlChild, SHGDN_FORADDRESSBAR, &strret);
588 return;
589
590 hr = StrRetToBufW(&strret, pidlChild, buf, 4095);
592 return;
593
594 COMBOBOXEXITEMW item = {0};
596 item.iImage = SHMapPIDLToSystemImageListIndex(sf, pidlChild, &item.iSelectedImage);
597 item.pszText = buf;
598 item.lParam = (LPARAM)(ILClone(pidl));
599 item.iIndent = indent;
600 item.iItem = index;
602}
603
604void CAddressEditBox::FillOneLevel(int index, int levelIndent, int indent)
605{
606 HRESULT hr;
607 ULONG numObj;
608 int count;
609 LPITEMIDLIST pidl, pidl2, pidl3, pidl4;
610
611 count = index + 1;
612 pidl = GetItemData(index);
613 pidl2 = GetItemData(count);
614 if(pidl)
615 {
616 CComPtr<IShellFolder> psfDesktop;
617 CComPtr<IShellFolder> psfItem;
618
619 hr = SHGetDesktopFolder(&psfDesktop);
621 return;
622
623 if (!pidl->mkid.cb)
624 {
625 psfItem = psfDesktop;
626 }
627 else
628 {
629 hr = psfDesktop->BindToObject(pidl, NULL, IID_PPV_ARG(IShellFolder, &psfItem));
631 return;
632 }
633
634 CComPtr<IEnumIDList> pEnumIDList;
635 hr = psfItem->EnumObjects(0, SHCONTF_FOLDERS | SHCONTF_INCLUDEHIDDEN, &pEnumIDList);
637 return;
638
639 do
640 {
641 hr = pEnumIDList->Next(1, &pidl3, &numObj);
642 if(hr != S_OK || !numObj)
643 break;
644
645 pidl4 = ILCombine(pidl, pidl3);
646 if (pidl2 && ILIsEqual(pidl4, pidl2))
647 count += (indent - levelIndent);
648 else
649 AddComboBoxItem(pidl4, count, levelIndent);
650 count++;
651 ILFree(pidl3);
652 ILFree(pidl4);
653 } while (true);
654 }
655}
656
658{
660
661 memset(&item, 0, sizeof(COMBOBOXEXITEMW));
662 item.mask = CBEIF_LPARAM;
663 item.iItem = index;
665 return (LPITEMIDLIST)item.lParam;
666}
667
669{
671 return NO_ERROR;
672}
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
UINT cchMax
unsigned int dir
Definition: maze.c:112
HWND hWnd
Definition: settings.c:17
#define index(s, c)
Definition: various.h:29
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
HRESULT IEGetNameAndFlags(LPITEMIDLIST pidl, SHGDNF uFlags, LPWSTR pszBuf, UINT cchBuf, SFGAOF *rgfInOut)
BOOL SubclassWindow(HWND hWnd)
Definition: atlwin.h:1796
int GetWindowTextLength() const
Definition: atlwin.h:860
int GetWindowText(_Out_writes_to_(nMaxCount, return+1) LPTSTR lpszStringBuf, _In_ int nMaxCount) const
Definition: atlwin.h:828
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1116
HWND m_hWnd
Definition: atlwin.h:273
STDMETHOD() GetClassID(CLSID *pClassID) override
HRESULT RefreshAddress()
STDMETHOD() GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) override
void FillOneLevel(int index, int levelIndent, int indent)
CContainedWindow fEditWindow
HRESULT GetAbsolutePidl(PIDLIST_ABSOLUTE *pAbsolutePIDL)
STDMETHOD() ParseNow(long paramC) override
CContainedWindow fCombobox
CComPtr< IUnknown > fSite
CComHeapPtr< ITEMIDLIST_ABSOLUTE > m_pidlLastParsed
HRESULT STDMETHODCALLTYPE ShowFileNotFoundError(HRESULT hRet)
STDMETHOD() SetCurrentDir(PCWSTR pszPath) override
STDMETHOD() Init(HWND comboboxEx, HWND editControl, long param14, IUnknown *param18) override
STDMETHOD() QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText) override
LPITEMIDLIST GetItemData(int index)
STDMETHOD() GetTypeInfoCount(UINT *pctinfo) override
STDMETHOD() Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) override
LRESULT OnSettingChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
STDMETHOD() IsWindowOwner(HWND hWnd) override
void AddComboBoxItem(LPITEMIDLIST pidl, int index, int indent)
STDMETHOD() Save(long paramC) override
STDMETHOD() SetOwner(IUnknown *) override
STDMETHOD() Execute(long paramC) override
STDMETHOD() IsDirty() override
void PopulateComboBox(LPITEMIDLIST pidl)
STDMETHOD() OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override
STDMETHOD() Load(IStream *pStm) override
STDMETHOD() Refresh(long param8) override
BOOL GetComboBoxText(CComHeapPtr< WCHAR > &pszText)
STDMETHOD() GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) override
STDMETHOD() GetSizeMax(ULARGE_INTEGER *pcbSize) override
STDMETHOD() FileSysChange(long param8, long paramC) override
STDMETHOD() Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override
void Free()
Definition: atlalloc.h:153
T * Detach()
Definition: atlalloc.h:168
bool Allocate(_In_ size_t nElements=1)
Definition: atlalloc.h:143
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define NO_ERROR
Definition: dderror.h:5
#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
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HRESULT WINAPI AtlAdvise(IUnknown *pUnkCP, IUnknown *pUnk, const IID *iid, DWORD *pdw)
Definition: atl.c:45
HRESULT WINAPI AtlUnadvise(IUnknown *pUnkCP, const IID *iid, DWORD dw)
Definition: atl.c:73
#define IDS_PARSE_ADDR_ERR_TITLE
Definition: resource.h:184
#define IDS_PARSE_ADDR_ERR_TEXT
Definition: resource.h:185
CabinetStateSettings gCabinetState
Definition: settings.cpp:10
LPWSTR WINAPI StrChrW(LPCWSTR lpszStr, WCHAR ch)
Definition: string.c:464
static const WCHAR indent[]
Definition: object.c:1156
#define wcschr
Definition: compat.h:17
#define MAX_PATH
Definition: compat.h:34
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
Definition: path.c:1106
LCID lcid
Definition: locale.c:5656
void WINAPI PathUnquoteSpacesW(WCHAR *path)
Definition: path.c:2006
int WINAPI PathGetDriveNumberW(const WCHAR *path)
Definition: path.c:1810
BOOL WINAPI PathIsRelativeW(const WCHAR *path)
Definition: path.c:1030
WCHAR *WINAPI PathGetArgsW(const WCHAR *path)
Definition: path.c:1740
BOOL WINAPI PathFileExistsW(const WCHAR *path)
Definition: path.c:2607
#define ShellMessageBoxW
Definition: precomp.h:63
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
Definition: shellpath.c:3384
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1501
HRESULT WINAPI SHInvokeDefaultCommand(HWND hWnd, IShellFolder *lpFolder, LPCITEMIDLIST lpApidl)
Definition: ordinal.c:3183
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
Definition: ordinal.c:1336
void WINAPI PathRemoveArgsW(LPWSTR lpszPath)
Definition: path.c:779
LPWSTR WINAPI PathBuildRootW(LPWSTR lpszPath, int drive)
Definition: path.c:348
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
Definition: path.c:1729
HRESULT WINAPI SHStrDupW(LPCWSTR src, LPWSTR *dest)
Definition: string.c:2148
HRESULT WINAPI StrRetToBufW(LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest, UINT len)
Definition: string.c:1660
#define FAILED_UNEXPECTEDLY
Definition: utils.cpp:30
#define L(x)
Definition: resources.c:13
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLuint address
Definition: glext.h:9393
GLuint index
Definition: glext.h:6031
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLbitfield flags
Definition: glext.h:7161
GLenum GLenum GLenum input
Definition: glext.h:9031
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
int WINAPI SHMapPIDLToSystemImageListIndex(IShellFolder *sh, LPCITEMIDLIST pidl, int *pIndex)
Definition: iconcache.cpp:772
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
char hdr[14]
Definition: iptest.cpp:33
if(dx< 0)
Definition: linetemp.h:194
LONG_PTR LPARAM
Definition: minwindef.h:175
LONG_PTR LRESULT
Definition: minwindef.h:176
UINT_PTR WPARAM
Definition: minwindef.h:174
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
LPCWSTR szPath
Definition: env.c:37
static LPOLESTR
Definition: stg_prop.c:27
static VARIANTARG static DISPID
Definition: ordinal.c:49
unsigned int UINT
Definition: ndis.h:50
#define UNICODE_NULL
#define PathAppendW
Definition: pathcch.h:310
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:238
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:1051
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:817
BOOL WINAPI ILRemoveLastID(LPITEMIDLIST pidl)
Definition: pidl.c:222
HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast)
Definition: pidl.c:1504
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1496
LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl)
Definition: pidl.c:977
LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path)
Definition: pidl.c:1108
BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:583
#define INT
Definition: polytest.cpp:20
#define CBEM_SETITEM
Definition: commctrl.h:3851
#define CBEN_ENDEDIT
Definition: commctrl.h:3890
#define CBEIF_IMAGE
Definition: commctrl.h:3792
#define CBENF_RETURN
Definition: commctrl.h:3893
#define WC_EDITW
Definition: commctrl.h:4692
#define CBEM_GETITEMW
Definition: commctrl.h:3848
#define CBEIF_SELECTEDIMAGE
Definition: commctrl.h:3793
#define WC_COMBOBOXEXW
Definition: commctrl.h:3786
#define CBEIF_TEXT
Definition: commctrl.h:3791
#define CBENF_ESCAPE
Definition: commctrl.h:3894
#define CBEM_DELETEITEM
Definition: commctrl.h:3836
#define CBEN_DELETEITEM
Definition: commctrl.h:3878
#define CBEIF_INDENT
Definition: commctrl.h:3795
#define CBEM_INSERTITEMW
Definition: commctrl.h:3846
#define CBEIF_LPARAM
Definition: commctrl.h:3796
#define PNMCOMBOBOXEX
Definition: commctrl.h:3873
#define REFIID
Definition: guiddef.h:118
#define SHACF_FILESYSTEM
Definition: shlwapi.h:46
#define SHACF_USETAB
Definition: shlwapi.h:50
#define SHACF_URLALL
Definition: shlwapi.h:49
#define WM_NOTIFY
Definition: richedit.h:61
DWORD LCID
Definition: nls.h:13
#define memset(x, y, z)
Definition: compat.h:39
#define SEE_MASK_FLAG_NO_UI
Definition: shellapi.h:38
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
Definition: shlexec.cpp:2723
HRESULT hr
Definition: shlfolder.c:183
#define SID_SShellBrowser
Definition: shlguid.h:128
#define CSIDL_DRIVES
Definition: shlobj.h:2197
HRESULT WINAPI SHAutoComplete(HWND hwndEdit, DWORD dwFlags)
Definition: autocomp.cpp:191
DWORD WINAPI SHExpandEnvironmentStringsW(LPCWSTR, LPWSTR, DWORD)
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
ITEMIDLIST_ABSOLUTE * PIDLIST_ABSOLUTE
Definition: shtypes.idl:60
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
#define _countof(array)
Definition: sndvol32.h:70
Definition: match.c:390
const uint16_t * PCWSTR
Definition: typedefs.h:57
int32_t INT
Definition: typedefs.h:58
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
#define HIWORD(l)
Definition: typedefs.h:247
#define DISPID_NAVIGATECOMPLETE2
Definition: webchild.h:54
#define DISPID_DOCUMENTCOMPLETE
Definition: webchild.h:61
WINBASEAPI _In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon_undoc.h:337
#define S_FALSE
Definition: winerror.h:3451
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
Definition: winerror.h:210
#define E_POINTER
Definition: winerror.h:3480
#define ERROR_INVALID_DRIVE
Definition: winerror.h:240
#define SW_SHOWNORMAL
Definition: winuser.h:781
#define WM_COMMAND
Definition: winuser.h:1768
#define CB_RESETCONTENT
Definition: winuser.h:1988
#define CB_GETCOUNT
Definition: winuser.h:1971
#define CBN_SELCHANGE
Definition: winuser.h:2008
#define MB_ICONERROR
Definition: winuser.h:798
struct tagNMHDR * LPNMHDR
#define CB_GETITEMDATA
Definition: winuser.h:1979
#define MB_OK
Definition: winuser.h:801
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define CB_GETCURSEL
Definition: winuser.h:1972
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IID_PPV_ARG(Itype, ppType)
__wchar_t WCHAR
Definition: xmlstorage.h:180