ReactOS 0.4.15-dev-8417-gb6b82fe
browseui_undoc.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  IEThreadParamBlock
 
struct  ExplorerCommandLineParseResults
 

Macros

#define FCW_ADDRESSBAR   9
 
#define SH_EXPLORER_CMDLINE_FLAG_NEWWND   0x00000001
 
#define SH_EXPLORER_CMDLINE_FLAG_S   0x00000002
 
#define SH_EXPLORER_CMDLINE_FLAG_E   0x00000008
 
#define SH_EXPLORER_CMDLINE_FLAG_SELECT   0x00000040
 
#define SH_EXPLORER_CMDLINE_FLAG_EMBED   0x00000080
 
#define SH_EXPLORER_CMDLINE_FLAG_IDLIST   0x00000200
 
#define SH_EXPLORER_CMDLINE_FLAG_INPROC   0x00000400
 
#define SH_EXPLORER_CMDLINE_FLAG_NOUI   0x00001000
 
#define SH_EXPLORER_CMDLINE_FLAG_NOREUSE   0x00004000
 
#define SH_EXPLORER_CMDLINE_FLAG_SEPARATE   0x00020000
 
#define SH_EXPLORER_CMDLINE_FLAG_STRING   0x02000000
 
#define WM_EXPLORER_OPEN_NEW_WINDOW   (WM_USER+11)
 
#define WM_EXPLORER_1037   (WM_USER+13)
 
#define INTERFACE   IACLCustomMRU
 

Typedefs

typedef struct IEThreadParamBlock IE_THREAD_PARAM_BLOCK
 
typedef struct IEThreadParamBlockPIE_THREAD_PARAM_BLOCK
 
typedef struct ExplorerCommandLineParseResults EXPLORER_CMDLINE_PARSE_RESULTS
 
typedef struct ExplorerCommandLineParseResultsPEXPLORER_CMDLINE_PARSE_RESULTS
 

Functions

void WINAPI InitOCHostClass (long param8)
 
long WINAPI SHOpenFolderWindow (PIE_THREAD_PARAM_BLOCK parameters)
 
void WINAPI SHCreateSavedWindows (void)
 
BOOL WINAPI SHCreateFromDesktop (_In_ PEXPLORER_CMDLINE_PARSE_RESULTS parseResults)
 
UINT_PTR WINAPI SHExplorerParseCmdLine (_Out_ PEXPLORER_CMDLINE_PARSE_RESULTS pInfo)
 
void WINAPI UEMRegisterNotify (long param8, long paramC)
 
HRESULT WINAPI SHCreateBandForPidl (LPCITEMIDLIST param8, IUnknown *paramC, BOOL param10)
 
HRESULT WINAPI SHPidlFromDataObject (IDataObject *param8, long *paramC, long param10, FILEDESCRIPTORW *param14)
 
long WINAPI IDataObject_GetDeskBandState (long param8)
 
PIE_THREAD_PARAM_BLOCK WINAPI SHCreateIETHREADPARAM (long param8, long paramC, IUnknown *param10, IUnknown *param14)
 
PIE_THREAD_PARAM_BLOCK WINAPI SHCloneIETHREADPARAM (PIE_THREAD_PARAM_BLOCK param)
 
long WINAPI SHParseIECommandLine (long param8, long paramC)
 
void WINAPI SHDestroyIETHREADPARAM (PIE_THREAD_PARAM_BLOCK param)
 
BOOL WINAPI SHOnCWMCommandLine (HANDLE hSharedInfo)
 
LPITEMIDLIST WINAPI Channel_GetFolderPidl (void)
 
IUnknown *WINAPI ChannelBand_Create (LPITEMIDLIST pidl)
 
HRESULT WINAPI Channels_SetBandInfoSFB (IUnknown *param8)
 
HRESULT WINAPI IUnknown_SetBandInfoSFB (IUnknown *param8, long paramC)
 
HRESULT WINAPI Channel_QuickLaunch (void)
 
HRESULT WINAPI SHGetNavigateTarget (long param8, long paramC, long param10, long param14)
 
HRESULT WINAPI GetInfoTip (IUnknown *param8, long paramC, LPTSTR *param10, long cchMax)
 
HRESULT WINAPI SHEnumClassesOfCategories (ULONG cImplemented, CATID *pImplemented, ULONG cRequired, CATID *pRequired, IEnumGUID **out)
 
HRESULT WINAPI SHWriteClassesOfCategories (long param8, long paramC, long param10, long param14, long param18, long param1C, long param20)
 
BOOL WINAPI SHIsExplorerBrowser (void)
 
HRESULT WINAPI SHOpenNewFrame (LPITEMIDLIST pidl, IUnknown *paramC, long param10, DWORD dwFlags)
 
 DECLARE_INTERFACE_IID_ (IACLCustomMRU, IUnknown, "F729FC5E-8769-4F3E-BDB2-D7B50FD2275B")
 

Macro Definition Documentation

◆ FCW_ADDRESSBAR

#define FCW_ADDRESSBAR   9

Definition at line 28 of file browseui_undoc.h.

◆ INTERFACE

#define INTERFACE   IACLCustomMRU

Definition at line 175 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_E

#define SH_EXPLORER_CMDLINE_FLAG_E   0x00000008

Definition at line 121 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_EMBED

#define SH_EXPLORER_CMDLINE_FLAG_EMBED   0x00000080

Definition at line 125 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_IDLIST

#define SH_EXPLORER_CMDLINE_FLAG_IDLIST   0x00000200

Definition at line 127 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_INPROC

#define SH_EXPLORER_CMDLINE_FLAG_INPROC   0x00000400

Definition at line 128 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_NEWWND

#define SH_EXPLORER_CMDLINE_FLAG_NEWWND   0x00000001

Definition at line 118 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_NOREUSE

#define SH_EXPLORER_CMDLINE_FLAG_NOREUSE   0x00004000

Definition at line 132 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_NOUI

#define SH_EXPLORER_CMDLINE_FLAG_NOUI   0x00001000

Definition at line 130 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_S

#define SH_EXPLORER_CMDLINE_FLAG_S   0x00000002

Definition at line 119 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_SELECT

#define SH_EXPLORER_CMDLINE_FLAG_SELECT   0x00000040

Definition at line 124 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_SEPARATE

#define SH_EXPLORER_CMDLINE_FLAG_SEPARATE   0x00020000

Definition at line 135 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_STRING

#define SH_EXPLORER_CMDLINE_FLAG_STRING   0x02000000

Definition at line 143 of file browseui_undoc.h.

◆ WM_EXPLORER_1037

#define WM_EXPLORER_1037   (WM_USER+13)

Definition at line 146 of file browseui_undoc.h.

◆ WM_EXPLORER_OPEN_NEW_WINDOW

#define WM_EXPLORER_OPEN_NEW_WINDOW   (WM_USER+11)

Definition at line 145 of file browseui_undoc.h.

Typedef Documentation

◆ EXPLORER_CMDLINE_PARSE_RESULTS

◆ IE_THREAD_PARAM_BLOCK

◆ PEXPLORER_CMDLINE_PARSE_RESULTS

◆ PIE_THREAD_PARAM_BLOCK

Function Documentation

◆ Channel_GetFolderPidl()

LPITEMIDLIST WINAPI Channel_GetFolderPidl ( void  )

Definition at line 86 of file browseuiord.cpp.

87{
88 return NULL;
89}
#define NULL
Definition: types.h:112

◆ Channel_QuickLaunch()

HRESULT WINAPI Channel_QuickLaunch ( void  )

Definition at line 118 of file browseuiord.cpp.

119{
120 return E_NOTIMPL;
121}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ChannelBand_Create()

IUnknown *WINAPI ChannelBand_Create ( LPITEMIDLIST  pidl)

Definition at line 94 of file browseuiord.cpp.

95{
96 return NULL;
97}

◆ Channels_SetBandInfoSFB()

HRESULT WINAPI Channels_SetBandInfoSFB ( IUnknown param8)

Definition at line 102 of file browseuiord.cpp.

103{
104 return E_NOTIMPL;
105}

◆ DECLARE_INTERFACE_IID_()

DECLARE_INTERFACE_IID_ ( IACLCustomMRU  ,
IUnknown  ,
"F729FC5E-8769-4F3E-BDB2-D7B50FD2275B"   
)

Definition at line 176 of file browseui_undoc.h.

177{
178 // *** IUnknown methods ***
182
183 // *** IACLCustomMRU specific methods ***
184 STDMETHOD(Initialize) (THIS_ LPCWSTR pwszMRURegKey, DWORD dwMax) PURE;
186};
#define PURE
Definition: basetyps.h:64
#define THIS_
Definition: basetyps.h:65
#define THIS
Definition: basetyps.h:66
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
#define STDMETHOD(m)
Definition: basetyps.h:62
_In_ BOOLEAN Release
Definition: cdrom.h:920
#define AddMRUString
unsigned long DWORD
Definition: ntddk_ex.h:95
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT QueryInterface(REFIID, void **)
Definition: events.c:2587
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
#define REFIID
Definition: guiddef.h:118
uint32_t ULONG
Definition: typedefs.h:59
static void Initialize()
Definition: xlate.c:212
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

◆ GetInfoTip()

HRESULT WINAPI GetInfoTip ( IUnknown param8,
long  paramC,
LPTSTR param10,
long  cchMax 
)

Definition at line 134 of file browseuiord.cpp.

135{
136 return E_NOTIMPL;
137}

Referenced by DECLARE_INTERFACE_().

◆ IDataObject_GetDeskBandState()

long WINAPI IDataObject_GetDeskBandState ( long  param8)

Definition at line 70 of file browseuiord.cpp.

71{
72 return -1;
73}

◆ InitOCHostClass()

void WINAPI InitOCHostClass ( long  param8)

Definition at line 26 of file browseuiord.cpp.

27{
28 // forwards to shdocvw
29}

◆ IUnknown_SetBandInfoSFB()

HRESULT WINAPI IUnknown_SetBandInfoSFB ( IUnknown param8,
long  paramC 
)

Definition at line 110 of file browseuiord.cpp.

111{
112 return E_NOTIMPL;
113}

◆ SHCloneIETHREADPARAM()

PIE_THREAD_PARAM_BLOCK WINAPI SHCloneIETHREADPARAM ( PIE_THREAD_PARAM_BLOCK  param)

◆ SHCreateBandForPidl()

HRESULT WINAPI SHCreateBandForPidl ( LPCITEMIDLIST  param8,
IUnknown paramC,
BOOL  param10 
)

Definition at line 54 of file browseuiord.cpp.

55{
56 return E_NOTIMPL;
57}

◆ SHCreateFromDesktop()

BOOL WINAPI SHCreateFromDesktop ( _In_ PEXPLORER_CMDLINE_PARSE_RESULTS  parseResults)

Definition at line 619 of file desktopipc.cpp.

620{
621 TRACE("SHCreateFromDesktop\n");
622
623 IEThreadParamBlock * parameters = SHCreateIETHREADPARAM(0, 0, 0, 0);
624 if (!parameters)
625 return FALSE;
626
627 PCWSTR strPath = NULL;
628 if (parseResults->dwFlags & SH_EXPLORER_CMDLINE_FLAG_STRING)
629 {
630 if (parseResults->pidlPath)
631 {
632 WARN("strPath and pidlPath are both assigned. This shouldn't happen.\n");
633 }
634
635 strPath = parseResults->strPath;
636 }
637
638 parameters->dwFlags = parseResults->dwFlags;
639 parameters->offset8 = parseResults->nCmdShow;
640
641 LPITEMIDLIST pidl = parseResults->pidlPath ? ILClone(parseResults->pidlPath) : NULL;
642 if (!pidl && parseResults->dwFlags & SH_EXPLORER_CMDLINE_FLAG_STRING)
643 {
644 if (parseResults->strPath && parseResults->strPath[0])
645 {
646 pidl = ILCreateFromPathW(parseResults->strPath);
647 }
648 }
649
650 // HACK! This shouldn't happen! SHExplorerParseCmdLine needs fixing.
651 if (!pidl)
652 {
654 }
655
656 parameters->directoryPIDL = pidl;
657
658 // Try to find the owner of the idlist, if we aren't running /SEPARATE
659 HWND desktop = NULL;
660 if (!(parseResults->dwFlags & SH_EXPLORER_CMDLINE_FLAG_SEPARATE))
661 desktop = FindShellProxy(parameters->directoryPIDL);
662
663 // If found, ask it to open the new window
664 if (desktop)
665 {
666 TRACE("Found desktop hwnd=%p\n", desktop);
667
668 DWORD dwProcessId;
669
670 GetWindowThreadProcessId(desktop, &dwProcessId);
671 AllowSetForegroundWindow(dwProcessId);
672
673 HANDLE hShared = MakeSharedPacket(parameters, strPath, dwProcessId);
674 if (hShared)
675 {
676 TRACE("Sending open message...\n");
677
678 PostMessageW(desktop, WM_EXPLORER_OPEN_NEW_WINDOW, 0, (LPARAM) hShared);
679 }
680
681 SHDestroyIETHREADPARAM(parameters);
682 return TRUE;
683 }
684
685 TRACE("Desktop not found or separate flag requested.\n");
686
687 // Else, start our own message loop!
689 CProxyDesktop * proxy = new CProxyDesktop(parameters);
690 if (proxy)
691 {
692 g_hwndProxyDesktop = proxy->Create(0);
693
694 LONG refCount;
696 if (SHCreateThreadRef(&refCount, &thread) >= 0)
697 {
699 if (strPath)
700 parameters->directoryPIDL = ILCreateFromPath(strPath);
701 SHOpenFolderWindow(parameters);
702 parameters = NULL;
703 thread.Release();
704 }
705
706 MSG Msg;
707 while (GetMessageW(&Msg, 0, 0, 0) && refCount)
708 {
711 }
712
714
715 delete proxy;
716 }
717
718 if (SUCCEEDED(hr))
720
721 SHDestroyIETHREADPARAM(parameters);
722
723 return TRUE;
724}
#define WARN(fmt,...)
Definition: precomp.h:61
static HANDLE thread
Definition: service.c:33
#define WM_EXPLORER_OPEN_NEW_WINDOW
#define SH_EXPLORER_CMDLINE_FLAG_STRING
#define SH_EXPLORER_CMDLINE_FLAG_SEPARATE
struct @1628 Msg[]
HWND g_hwndProxyDesktop
Definition: desktopipc.cpp:8
HWND FindShellProxy(LPITEMIDLIST pidl)
Definition: desktopipc.cpp:69
HRESULT WINAPI SHOpenFolderWindow(PIE_THREAD_PARAM_BLOCK parameters)
Definition: desktopipc.cpp:555
IEThreadParamBlock *WINAPI SHCreateIETHREADPARAM(long param8, long paramC, IUnknown *param10, IUnknown *param14)
Definition: desktopipc.cpp:457
void WINAPI SHDestroyIETHREADPARAM(IEThreadParamBlock *param)
Definition: desktopipc.cpp:509
HANDLE MakeSharedPacket(IEThreadParamBlock *threadParams, LPCWSTR strPath, int dwProcessId)
Definition: desktopipc.cpp:102
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
HRESULT WINAPI SHGetFolderLocation(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwReserved, LPITEMIDLIST *ppidl)
Definition: shellpath.c:3150
HRESULT WINAPI SHCreateThreadRef(LONG *lprefcount, IUnknown **lppUnknown)
Definition: thread.c:198
int proxy
Definition: main.c:67
nsrefcnt Release()
#define SUCCEEDED(hr)
Definition: intsafe.h:50
long LONG
Definition: pedump.c:60
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:237
LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path)
Definition: pidl.c:997
VOID WINAPI SHSetInstanceExplorer(LPUNKNOWN lpUnknown)
Definition: shellord.c:1688
HRESULT hr
Definition: shlfolder.c:183
#define ILCreateFromPath
Definition: shlobj.h:2505
#define CSIDL_PERSONAL
Definition: shlobj.h:2177
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
#define TRACE(s)
Definition: solgame.cpp:4
LPITEMIDLIST directoryPIDL
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
const uint16_t * PCWSTR
Definition: typedefs.h:57
BOOL WINAPI AllowSetForegroundWindow(DWORD dwProcessId)
Definition: window.c:49
DWORD WINAPI GetWindowThreadProcessId(HWND hWnd, PDWORD lpdwProcessId)
LONG_PTR LPARAM
Definition: windef.h:208
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
BOOL WINAPI DestroyWindow(_In_ HWND)

Referenced by _tmain(), and StartWithCommandLine().

◆ SHCreateIETHREADPARAM()

PIE_THREAD_PARAM_BLOCK WINAPI SHCreateIETHREADPARAM ( long  param8,
long  paramC,
IUnknown param10,
IUnknown param14 
)

Definition at line 457 of file desktopipc.cpp.

459{
461
462 TRACE("SHCreateIETHREADPARAM\n");
463
465 if (result == NULL)
466 return NULL;
467 result->offset0 = param8;
468 result->offset8 = paramC;
469 result->offsetC = param10;
470 if (param10 != NULL)
471 param10->AddRef();
472 result->offset14 = param14;
473 if (param14 != NULL)
474 param14->AddRef();
475 return result;
476}
GLuint64EXT * result
Definition: glext.h:11304
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1390
ULONG AddRef()
#define LMEM_ZEROINIT
Definition: winbase.h:375

Referenced by ParseSharedPacket(), SHCreateFromDesktop(), and SHOpenNewFrame().

◆ SHCreateSavedWindows()

void WINAPI SHCreateSavedWindows ( void  )

Definition at line 35 of file browseuiord.cpp.

36{
37}

◆ SHDestroyIETHREADPARAM()

void WINAPI SHDestroyIETHREADPARAM ( PIE_THREAD_PARAM_BLOCK  param)

◆ SHEnumClassesOfCategories()

HRESULT WINAPI SHEnumClassesOfCategories ( ULONG  cImplemented,
CATID pImplemented,
ULONG  cRequired,
CATID pRequired,
IEnumGUID **  out 
)

Definition at line 337 of file CSHEnumClassesOfCategories.cpp.

338{
339 HRESULT hr;
340
341 if (!out)
342 return E_INVALIDARG;
343
344 hr = ShellObjectCreatorInit<CSHEnumClassesOfCategories>(
345 cImplemented, pImplemented, cRequired, pRequired, IID_PPV_ARG(IEnumGUID, out));
347 return hr;
348 return S_OK;
349}
#define E_INVALIDARG
Definition: ddrawi.h:101
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
#define S_OK
Definition: intsafe.h:52
static FILE * out
Definition: regtests2xml.c:44
#define IID_PPV_ARG(Itype, ppType)

Referenced by CBandSiteMenu::_CreateMenuPart(), and CShellBrowser::BuildExplorerBandCategory().

◆ SHExplorerParseCmdLine()

UINT_PTR WINAPI SHExplorerParseCmdLine ( _Out_ PEXPLORER_CMDLINE_PARSE_RESULTS  pInfo)

Definition at line 232 of file parsecmdline.cpp.

233{
234 WCHAR strField[MAX_PATH];
235 WCHAR strDir[MAX_PATH];
236
237 PCWSTR strCmdLine = GetCommandLineW();
238 PCWSTR strFieldArray = PathGetArgsW(strCmdLine);
239
240 if (!*strFieldArray)
241 {
242 pInfo->dwFlags = 9;
243 pInfo->pidlPath = _GetDocumentsPidl();
244 if (!pInfo->pidlPath)
245 {
247 PathStripToRootW(strDir);
248 pInfo->pidlPath = ILCreateFromPathW(strDir);
249 }
250 return (UINT_PTR)pInfo->pidlPath;
251 }
252
253 PCWSTR strNextArg = _FindFirstField(strFieldArray);
254
255 BOOL hasNext = _ReadNextArg(&strNextArg, strField, _countof(strField));
256
257 while (TRUE)
258 {
259 // Basic flags-only params first
260 if (!StrCmpIW(strField, L"/N"))
261 {
263 TRACE("CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
264 }
265 else if (!StrCmpIW(strField, L"/S"))
266 {
267 pInfo->dwFlags |= SH_EXPLORER_CMDLINE_FLAG_S;
268 TRACE("CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
269 }
270 else if (!StrCmpIW(strField, L"/E"))
271 {
272 pInfo->dwFlags |= SH_EXPLORER_CMDLINE_FLAG_E;
273 TRACE("CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
274 }
275 else if (!StrCmpIW(strField, L"/SELECT"))
276 {
277 pInfo->dwFlags |= SH_EXPLORER_CMDLINE_FLAG_SELECT;
278 TRACE("CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
279 }
280 else if (!StrCmpIW(strField, L"/NOUI"))
281 {
282 pInfo->dwFlags |= SH_EXPLORER_CMDLINE_FLAG_NOUI;
283 TRACE("CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
284 }
285 else if (!StrCmpIW(strField, L"-embedding"))
286 {
287 pInfo->dwFlags |= SH_EXPLORER_CMDLINE_FLAG_EMBED;
288 TRACE("CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
289 }
290 else if (!StrCmpIW(strField, L"/SEPARATE"))
291 {
292 pInfo->dwFlags |= SH_EXPLORER_CMDLINE_FLAG_SEPARATE;
293 TRACE("CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
294 }
295 else if (!StrCmpIW(strField, L"/INPROC"))
296 {
297 // No idea what Inproc is supposed to do, but it gets a GUID, and parses it.
298
299 TRACE("CmdLine Parser: Found %S flag\n", strField);
300
301 if (!hasNext)
302 return FALSE;
303
304 hasNext = _ReadNextArg(&strNextArg, strField, _countof(strField));
305
306 if (!GUIDFromStringW(strField, &(pInfo->guidInproc)))
307 return FALSE;
308
309 pInfo->dwFlags |= SH_EXPLORER_CMDLINE_FLAG_INPROC;
310
311 TRACE("CmdLine Parser: Parsed /INPROC flag. dwFlags=%08lx, guidInproc=%S\n", pInfo->dwFlags, strField);
312 }
313 else if (!StrCmpIW(strField, L"/ROOT"))
314 {
315 LPITEMIDLIST pidlRoot = NULL;
316
317 // The window should be rooted
318
319 TRACE("CmdLine Parser: Found %S flag\n", strField);
320
321 if (!hasNext)
322 return FALSE;
323
324 hasNext = _ReadNextArg(&strNextArg, strField, _countof(strField));
325
326 // Root may be a pidl
327 if (!StrCmpIW(strField, L"/IDLIST"))
328 {
329 if (hasNext)
330 {
331 hasNext = _ReadNextArg(&strNextArg, strField, _countof(strField));
332 }
333 pidlRoot = _ILReadFromSharedMemory(strField);
334 }
335 else
336 {
337 // Or just a path string
338 _ParsePathToPidl(strField, &pidlRoot);
339 }
340
341 pInfo->pidlRoot = pidlRoot;
342
343 // The root defaults to the desktop
344 if (!pidlRoot)
345 {
346 if (FAILED(SHGetSpecialFolderLocation(0, CSIDL_DESKTOP, &(pInfo->pidlRoot))))
347 pInfo->pidlRoot = NULL;
348 }
349
350 // TODO: Create rooted PIDL from pInfo->pidlPath and pInfo->pidlRoot
351
352 TRACE("CmdLine Parser: Parsed /ROOT flag. dwFlags=%08lx, pidlRoot=%p\n", pInfo->dwFlags, pInfo->pidlRoot);
353 }
354 else
355 {
356 // Anything else is part of the target path to browse to
357 TRACE("CmdLine Parser: Found target path %S\n", strField);
358
359 // Which can be a shared-memory itemidlist
360 if (!StrCmpIW(strField, L"/IDLIST"))
361 {
362 LPITEMIDLIST pidlArg;
363
364 if (!hasNext)
365 return FALSE;
366
367 hasNext = _ReadNextArg(&strNextArg, strField, _countof(strField));
368 pidlArg = _ILReadFromSharedMemory(strField);
369 if (!pidlArg)
370 return FALSE;
371
372 if (pInfo->pidlPath)
373 ILFree(pInfo->pidlPath);
374 pInfo->pidlPath = pidlArg;
375
376 TRACE("CmdLine Parser: Parsed target path. dwFlags=%08lx, pidlPath=%p\n", pInfo->dwFlags, pInfo->pidlPath);
377 }
378 else
379 {
380 // Or just a plain old string.
381
382 if (PathIsDirectoryW(strField))
383 PathAddBackslash(strField);
384
387
389 StringCchCopyW(strField, _countof(strField), szPath);
390
391 LPITEMIDLIST pidlPath = ILCreateFromPathW(strField);
392
393 pInfo->pidlPath = pidlPath;
394
395 if (pidlPath)
396 {
397 pInfo->dwFlags |= SH_EXPLORER_CMDLINE_FLAG_IDLIST;
398 TRACE("CmdLine Parser: Parsed target path. dwFlags=%08lx, pidlPath=%p\n", pInfo->dwFlags, pInfo->pidlPath);
399 }
400 else
401 {
402 // The path could not be parsed into an ID List,
403 // so pass it on as a plain string.
404
405 PWSTR field;
406 SHStrDupW(strField, &field);
407 pInfo->strPath = field;
408 if (field)
409 {
410 pInfo->dwFlags |= SH_EXPLORER_CMDLINE_FLAG_STRING;
411 TRACE("CmdLine Parser: Parsed target path. dwFlags=%08lx, strPath=%S\n", pInfo->dwFlags, field);
412 }
413 }
414 }
415 }
416
417 if (!hasNext)
418 break;
419 hasNext = _ReadNextArg(&strNextArg, strField, _countof(strField));
420 }
421
422 return TRUE;
423}
#define SH_EXPLORER_CMDLINE_FLAG_EMBED
#define SH_EXPLORER_CMDLINE_FLAG_NEWWND
#define SH_EXPLORER_CMDLINE_FLAG_IDLIST
#define SH_EXPLORER_CMDLINE_FLAG_NOUI
#define SH_EXPLORER_CMDLINE_FLAG_INPROC
#define SH_EXPLORER_CMDLINE_FLAG_NOREUSE
#define SH_EXPLORER_CMDLINE_FLAG_E
#define SH_EXPLORER_CMDLINE_FLAG_SELECT
#define SH_EXPLORER_CMDLINE_FLAG_S
#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
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2352
LPWSTR WINAPI GetCommandLineW(VOID)
Definition: proc.c:2013
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
Definition: shellpath.c:3260
BOOL WINAPI PathStripToRootW(LPWSTR lpszPath)
Definition: path.c:733
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
Definition: path.c:1777
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
Definition: path.c:1723
LPWSTR WINAPI PathGetArgsW(LPCWSTR lpszPath)
Definition: path.c:506
HRESULT WINAPI SHStrDupW(LPCWSTR src, LPWSTR *dest)
Definition: string.c:2012
int WINAPI StrCmpIW(LPCWSTR lpszStr, LPCWSTR lpszComp)
Definition: string.c:353
unsigned int BOOL
Definition: ntddk_ex.h:94
#define FAILED(hr)
Definition: intsafe.h:51
LPCWSTR szPath
Definition: env.c:37
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
#define L(x)
Definition: ntvdm.h:50
static LPITEMIDLIST _ILReadFromSharedMemory(PCWSTR strField)
static HRESULT _ParsePathToPidl(PWSTR strPath, LPITEMIDLIST *pidl)
BOOL WINAPI GUIDFromStringW(_In_ PCWSTR psz, _Out_ LPGUID pguid)
static LPITEMIDLIST _GetDocumentsPidl()
static PCWSTR _FindFirstField(PCWSTR strFieldSource)
static BOOL _ReadNextArg(PCWSTR *pstrFieldSource, PWSTR strField, size_t cchField)
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:940
#define CSIDL_DESKTOP
Definition: shlobj.h:2172
#define PathAddBackslash
Definition: shlwapi.h:783
#define _countof(array)
Definition: sndvol32.h:70
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
Definition: parser.c:44
uint16_t * PWSTR
Definition: typedefs.h:56
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by _tmain(), and StartWithCommandLine().

◆ SHGetNavigateTarget()

HRESULT WINAPI SHGetNavigateTarget ( long  param8,
long  paramC,
long  param10,
long  param14 
)

Definition at line 126 of file browseuiord.cpp.

127{
128 return E_NOTIMPL;
129}

◆ SHIsExplorerBrowser()

BOOL WINAPI SHIsExplorerBrowser ( void  )

Definition at line 152 of file browseuiord.cpp.

153{
154 return TRUE;
155}

◆ SHOnCWMCommandLine()

BOOL WINAPI SHOnCWMCommandLine ( HANDLE  hSharedInfo)

Definition at line 537 of file desktopipc.cpp.

538{
539 TRACE("SHOnCWMCommandLine\n");
540
542
543 if (params)
545
547
548 return FALSE;
549}
PIE_THREAD_PARAM_BLOCK ParseSharedPacket(HANDLE hData)
Definition: desktopipc.cpp:236
GLenum const GLfloat * params
Definition: glext.h:5645

Referenced by CProxyDesktop::OnOpenNewWindow(), and CDesktopBrowser::OnOpenNewWindow().

◆ SHOpenFolderWindow()

long WINAPI SHOpenFolderWindow ( PIE_THREAD_PARAM_BLOCK  parameters)

Definition at line 555 of file desktopipc.cpp.

556{
557 HANDLE threadHandle;
558 DWORD threadID;
559
560 // Only try to convert the pidl when it is going to be printed
561 if (TRACE_ON(browseui))
562 {
563 WCHAR debugStr[MAX_PATH + 2] = { 0 };
564 if (!ILGetDisplayName(parameters->directoryPIDL, debugStr))
565 {
566 debugStr[0] = UNICODE_NULL;
567 }
568 TRACE("SHOpenFolderWindow %p(%S)\n", parameters->directoryPIDL, debugStr);
569 }
570
571 PIE_THREAD_PARAM_BLOCK paramsCopy = SHCloneIETHREADPARAM(parameters);
572
574 threadHandle = CreateThread(NULL, 0x10000, BrowserThreadProc, paramsCopy, 0, &threadID);
575 if (threadHandle != NULL)
576 {
577 CloseHandle(threadHandle);
578 return S_OK;
579 }
580 SHDestroyIETHREADPARAM(paramsCopy);
581 return E_FAIL;
582}
#define E_FAIL
Definition: ddrawi.h:102
static DWORD WINAPI BrowserThreadProc(LPVOID lpThreadParameter)
Definition: desktopipc.cpp:435
IEThreadParamBlock *WINAPI SHCloneIETHREADPARAM(IEThreadParamBlock *param)
Definition: desktopipc.cpp:481
#define CloseHandle
Definition: compat.h:739
#define TRACE_ON(x)
Definition: compat.h:75
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
#define UNICODE_NULL
BOOL WINAPI ILGetDisplayName(LPCITEMIDLIST pidl, LPVOID path)
Definition: pidl.c:183
HRESULT WINAPI SHGetInstanceExplorer(IUnknown **lpUnknown)
Definition: shellord.c:1698
IUnknown * pExplorerInstance

Referenced by SHCreateFromDesktop(), SHOnCWMCommandLine(), and SHOpenNewFrame().

◆ SHOpenNewFrame()

HRESULT WINAPI SHOpenNewFrame ( LPITEMIDLIST  pidl,
IUnknown paramC,
long  param10,
DWORD  dwFlags 
)

Definition at line 591 of file desktopipc.cpp.

592{
593 IEThreadParamBlock *parameters;
594
595 TRACE("SHOpenNewFrame\n");
596
597 parameters = SHCreateIETHREADPARAM(0, 1, paramC, NULL);
598 if (parameters == NULL)
599 {
600 ILFree(pidl);
601 return E_OUTOFMEMORY;
602 }
603 if (paramC != NULL)
604 parameters->offset10 = param10;
605 parameters->directoryPIDL = pidl;
606 parameters->dwFlags = dwFlags;
607
608 HRESULT hr = SHOpenFolderWindow(parameters);
609
610 SHDestroyIETHREADPARAM(parameters);
611
612 return hr;
613}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

Referenced by CDesktopBrowser::BrowseObject(), DDE_OnViewFolder(), DDW_OnExploreFolder(), and CShellBrowser::OpenNewBrowserWindow().

◆ SHParseIECommandLine()

long WINAPI SHParseIECommandLine ( long  param8,
long  paramC 
)

Definition at line 78 of file browseuiord.cpp.

79{
80 return -1;
81}

◆ SHPidlFromDataObject()

HRESULT WINAPI SHPidlFromDataObject ( IDataObject param8,
long paramC,
long  param10,
FILEDESCRIPTORW param14 
)

Definition at line 62 of file browseuiord.cpp.

63{
64 return E_NOTIMPL;
65}

◆ SHWriteClassesOfCategories()

HRESULT WINAPI SHWriteClassesOfCategories ( long  param8,
long  paramC,
long  param10,
long  param14,
long  param18,
long  param1C,
long  param20 
)

Definition at line 143 of file browseuiord.cpp.

145{
146 return E_NOTIMPL;
147}

◆ UEMRegisterNotify()

void WINAPI UEMRegisterNotify ( long  param8,
long  paramC 
)

Definition at line 47 of file browseuiord.cpp.

48{
49}