ReactOS 0.4.15-dev-7907-g95bf896
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 SH_EXPLORER_CMDLINE_FLAG_ONE   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_N   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

◆ INTERFACE

#define INTERFACE   IACLCustomMRU

Definition at line 173 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_E

#define SH_EXPLORER_CMDLINE_FLAG_E   0x00000008

Definition at line 119 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_EMBED

#define SH_EXPLORER_CMDLINE_FLAG_EMBED   0x00000080

Definition at line 123 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_IDLIST

#define SH_EXPLORER_CMDLINE_FLAG_IDLIST   0x00000200

Definition at line 125 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_INPROC

#define SH_EXPLORER_CMDLINE_FLAG_INPROC   0x00000400

Definition at line 126 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_N

#define SH_EXPLORER_CMDLINE_FLAG_N   0x00004000

Definition at line 130 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_NOUI

#define SH_EXPLORER_CMDLINE_FLAG_NOUI   0x00001000

Definition at line 128 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_ONE

#define SH_EXPLORER_CMDLINE_FLAG_ONE   0x00000001

Definition at line 116 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_S

#define SH_EXPLORER_CMDLINE_FLAG_S   0x00000002

Definition at line 117 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_SELECT

#define SH_EXPLORER_CMDLINE_FLAG_SELECT   0x00000040

Definition at line 122 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_SEPARATE

#define SH_EXPLORER_CMDLINE_FLAG_SEPARATE   0x00020000

Definition at line 133 of file browseui_undoc.h.

◆ SH_EXPLORER_CMDLINE_FLAG_STRING

#define SH_EXPLORER_CMDLINE_FLAG_STRING   0x02000000

Definition at line 141 of file browseui_undoc.h.

◆ WM_EXPLORER_1037

#define WM_EXPLORER_1037   (WM_USER+13)

Definition at line 144 of file browseui_undoc.h.

◆ WM_EXPLORER_OPEN_NEW_WINDOW

#define WM_EXPLORER_OPEN_NEW_WINDOW   (WM_USER+11)

Definition at line 143 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 174 of file browseui_undoc.h.

175{
176 // *** IUnknown methods ***
180
181 // *** IACLCustomMRU specific methods ***
182 STDMETHOD(Initialize) (THIS_ LPCWSTR pwszMRURegKey, DWORD dwMax) PURE;
184};
#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 606 of file desktopipc.cpp.

607{
608 TRACE("SHCreateFromDesktop\n");
609
610 IEThreadParamBlock * parameters = SHCreateIETHREADPARAM(0, 0, 0, 0);
611 if (!parameters)
612 return FALSE;
613
614 PCWSTR strPath = NULL;
615 if (parseResults->dwFlags & SH_EXPLORER_CMDLINE_FLAG_STRING)
616 {
617 if (parseResults->pidlPath)
618 {
619 WARN("strPath and pidlPath are both assigned. This shouldn't happen.\n");
620 }
621
622 strPath = parseResults->strPath;
623 }
624
625 parameters->dwFlags = parseResults->dwFlags;
626 parameters->offset8 = parseResults->nCmdShow;
627
628 LPITEMIDLIST pidl = parseResults->pidlPath ? ILClone(parseResults->pidlPath) : NULL;
629 if (!pidl && parseResults->dwFlags & SH_EXPLORER_CMDLINE_FLAG_STRING)
630 {
631 if (parseResults->strPath && parseResults->strPath[0])
632 {
633 pidl = ILCreateFromPathW(parseResults->strPath);
634 }
635 }
636
637 // HACK! This shouldn't happen! SHExplorerParseCmdLine needs fixing.
638 if (!pidl)
639 {
641 }
642
643 parameters->directoryPIDL = pidl;
644
645 // Try to find the owner of the idlist, if we aren't running /SEPARATE
646 HWND desktop = NULL;
647 if (!(parseResults->dwFlags & SH_EXPLORER_CMDLINE_FLAG_SEPARATE))
648 desktop = FindShellProxy(parameters->directoryPIDL);
649
650 // If found, ask it to open the new window
651 if (desktop)
652 {
653 TRACE("Found desktop hwnd=%p\n", desktop);
654
655 DWORD dwProcessId;
656
657 GetWindowThreadProcessId(desktop, &dwProcessId);
658 AllowSetForegroundWindow(dwProcessId);
659
660 HANDLE hShared = MakeSharedPacket(parameters, strPath, dwProcessId);
661 if (hShared)
662 {
663 TRACE("Sending open message...\n");
664
665 PostMessageW(desktop, WM_EXPLORER_OPEN_NEW_WINDOW, 0, (LPARAM) hShared);
666 }
667
668 SHDestroyIETHREADPARAM(parameters);
669 return TRUE;
670 }
671
672 TRACE("Desktop not found or separate flag requested.\n");
673
674 // Else, start our own message loop!
676 CProxyDesktop * proxy = new CProxyDesktop(parameters);
677 if (proxy)
678 {
679 g_hwndProxyDesktop = proxy->Create(0);
680
681 LONG refCount;
683 if (SHCreateThreadRef(&refCount, &thread) >= 0)
684 {
686 if (strPath)
687 parameters->directoryPIDL = ILCreateFromPath(strPath);
688 SHOpenFolderWindow(parameters);
689 parameters = NULL;
690 thread.Release();
691 }
692
693 MSG Msg;
694 while (GetMessageW(&Msg, 0, 0, 0) && refCount)
695 {
698 }
699
701
702 delete proxy;
703 }
704
705 if (SUCCEEDED(hr))
707
708 SHDestroyIETHREADPARAM(parameters);
709
710 return TRUE;
711}
static HANDLE thread
Definition: service.c:33
#define WARN(fmt,...)
Definition: debug.h:112
#define WM_EXPLORER_OPEN_NEW_WINDOW
#define SH_EXPLORER_CMDLINE_FLAG_STRING
#define SH_EXPLORER_CMDLINE_FLAG_SEPARATE
struct @1632 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:542
IEThreadParamBlock *WINAPI SHCreateIETHREADPARAM(long param8, long paramC, IUnknown *param10, IUnknown *param14)
Definition: desktopipc.cpp:444
void WINAPI SHDestroyIETHREADPARAM(IEThreadParamBlock *param)
Definition: desktopipc.cpp:496
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:3124
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:995
VOID WINAPI SHSetInstanceExplorer(LPUNKNOWN lpUnknown)
Definition: shellord.c:1496
HRESULT hr
Definition: shlfolder.c:183
#define ILCreateFromPath
Definition: shlobj.h:2491
#define CSIDL_PERSONAL
Definition: shlobj.h:2163
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 444 of file desktopipc.cpp.

446{
448
449 TRACE("SHCreateIETHREADPARAM\n");
450
452 if (result == NULL)
453 return NULL;
454 result->offset0 = param8;
455 result->offset8 = paramC;
456 result->offsetC = param10;
457 if (param10 != NULL)
458 param10->AddRef();
459 result->offset14 = param14;
460 if (param14 != NULL)
461 param14->AddRef();
462 return result;
463}
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 = StrDupW(strField);
406 pInfo->strPath = field;
407 if (field)
408 {
409 pInfo->dwFlags |= SH_EXPLORER_CMDLINE_FLAG_STRING;
410 TRACE("CmdLine Parser: Parsed target path. dwFlags=%08lx, strPath=%S\n", pInfo->dwFlags, field);
411 }
412 }
413 }
414 }
415
416 if (!hasNext)
417 break;
418 hasNext = _ReadNextArg(&strNextArg, strField, _countof(strField));
419 }
420
421 return TRUE;
422}
#define SH_EXPLORER_CMDLINE_FLAG_EMBED
#define SH_EXPLORER_CMDLINE_FLAG_IDLIST
#define SH_EXPLORER_CMDLINE_FLAG_NOUI
#define SH_EXPLORER_CMDLINE_FLAG_N
#define SH_EXPLORER_CMDLINE_FLAG_INPROC
#define SH_EXPLORER_CMDLINE_FLAG_ONE
#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:3225
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
int WINAPI StrCmpIW(LPCWSTR lpszStr, LPCWSTR lpszComp)
Definition: string.c:353
LPWSTR WINAPI StrDupW(LPCWSTR lpszStr)
Definition: string.c:1093
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:938
#define CSIDL_DESKTOP
Definition: shlobj.h:2158
#define PathAddBackslash
Definition: shlwapi.h:783
#define _countof(array)
Definition: sndvol32.h:68
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 524 of file desktopipc.cpp.

525{
526 TRACE("SHOnCWMCommandLine\n");
527
529
530 if (params)
532
534
535 return FALSE;
536}
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 542 of file desktopipc.cpp.

543{
544 HANDLE threadHandle;
545 DWORD threadID;
546
547 // Only try to convert the pidl when it is going to be printed
548 if (TRACE_ON(browseui))
549 {
550 WCHAR debugStr[MAX_PATH + 2] = { 0 };
551 if (!ILGetDisplayName(parameters->directoryPIDL, debugStr))
552 {
553 debugStr[0] = UNICODE_NULL;
554 }
555 TRACE("SHOpenFolderWindow %p(%S)\n", parameters->directoryPIDL, debugStr);
556 }
557
558 PIE_THREAD_PARAM_BLOCK paramsCopy = SHCloneIETHREADPARAM(parameters);
559
561 threadHandle = CreateThread(NULL, 0x10000, BrowserThreadProc, paramsCopy, 0, &threadID);
562 if (threadHandle != NULL)
563 {
564 CloseHandle(threadHandle);
565 return S_OK;
566 }
567 SHDestroyIETHREADPARAM(paramsCopy);
568 return E_FAIL;
569}
#define E_FAIL
Definition: ddrawi.h:102
static DWORD WINAPI BrowserThreadProc(LPVOID lpThreadParameter)
Definition: desktopipc.cpp:422
IEThreadParamBlock *WINAPI SHCloneIETHREADPARAM(IEThreadParamBlock *param)
Definition: desktopipc.cpp:468
#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:1506
IUnknown * pExplorerInstance

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

◆ SHOpenNewFrame()

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

Definition at line 578 of file desktopipc.cpp.

579{
580 IEThreadParamBlock *parameters;
581
582 TRACE("SHOpenNewFrame\n");
583
584 parameters = SHCreateIETHREADPARAM(0, 1, paramC, NULL);
585 if (parameters == NULL)
586 {
587 ILFree(pidl);
588 return E_OUTOFMEMORY;
589 }
590 if (paramC != NULL)
591 parameters->offset10 = param10;
592 parameters->directoryPIDL = pidl;
593 parameters->dwFlags = dwFlags;
594
595 HRESULT hr = SHOpenFolderWindow(parameters);
596
597 SHDestroyIETHREADPARAM(parameters);
598
599 return hr;
600}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

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

◆ 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}