ReactOS  0.4.15-dev-4614-ga5a6101
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 }
#define NULL
Definition: types.h:112

◆ Channels_SetBandInfoSFB()

HRESULT WINAPI Channels_SetBandInfoSFB ( IUnknown param8)

Definition at line 102 of file browseuiord.cpp.

103 {
104  return E_NOTIMPL;
105 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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;
183  STDMETHOD(AddMRUString) (THIS_ LPCWSTR pwszEntry) PURE;
184 };
#define REFIID
Definition: guiddef.h:118
#define THIS_
Definition: basetyps.h:65
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define THIS
Definition: basetyps.h:66
REFIID riid
Definition: precomp.h:44
static HRESULT QueryInterface(REFIID, void **)
Definition: events.c:2587
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define STDMETHOD(m)
Definition: basetyps.h:62
#define AddMRUString
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_ BOOLEAN Release
Definition: cdrom.h:920
BOOL Initialize(HINSTANCE hInstance)
Definition: msconfig.c:341
#define PURE
Definition: basetyps.h:64
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
unsigned int ULONG
Definition: retypes.h:1
#define STDMETHOD_(t, m)
Definition: basetyps.h:63

◆ 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 }
#define E_NOTIMPL
Definition: ddrawi.h:99

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 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SHCreateFromDesktop()

BOOL WINAPI SHCreateFromDesktop ( _In_ PEXPLORER_CMDLINE_PARSE_RESULTS  parseResults)

Definition at line 612 of file desktopipc.cpp.

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

Referenced by _tmain(), and StartWithCommandLine().

◆ SHCreateIETHREADPARAM()

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

Definition at line 450 of file desktopipc.cpp.

452 {
454 
455  TRACE("SHCreateIETHREADPARAM\n");
456 
458  if (result == NULL)
459  return NULL;
460  result->offset0 = param8;
461  result->offset8 = paramC;
462  result->offsetC = param10;
463  if (param10 != NULL)
464  param10->AddRef();
465  result->offset14 = param14;
466  if (param14 != NULL)
467  param14->AddRef();
468  return result;
469 }
GLuint64EXT * result
Definition: glext.h:11304
#define TRACE(s)
Definition: solgame.cpp:4
#define LMEM_ZEROINIT
Definition: winbase.h:372
ULONG AddRef()
#define NULL
Definition: types.h:112
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1373

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 336 of file CSHEnumClassesOfCategories.cpp.

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

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

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 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SHIsExplorerBrowser()

BOOL WINAPI SHIsExplorerBrowser ( void  )

Definition at line 152 of file browseuiord.cpp.

153 {
154  return TRUE;
155 }
#define TRUE
Definition: types.h:120

◆ SHOnCWMCommandLine()

BOOL WINAPI SHOnCWMCommandLine ( HANDLE  hSharedInfo)

Definition at line 530 of file desktopipc.cpp.

531 {
532  TRACE("SHOnCWMCommandLine\n");
533 
535 
536  if (params)
537  return SHOpenFolderWindow(params);
538 
540 
541  return FALSE;
542 }
HRESULT WINAPI SHOpenFolderWindow(PIE_THREAD_PARAM_BLOCK parameters)
Definition: desktopipc.cpp:548
PIE_THREAD_PARAM_BLOCK ParseSharedPacket(HANDLE hData)
Definition: desktopipc.cpp:236
#define FALSE
Definition: types.h:117
GLenum const GLfloat * params
Definition: glext.h:5645
#define TRACE(s)
Definition: solgame.cpp:4
void WINAPI SHDestroyIETHREADPARAM(IEThreadParamBlock *param)
Definition: desktopipc.cpp:502

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

◆ SHOpenFolderWindow()

long WINAPI SHOpenFolderWindow ( PIE_THREAD_PARAM_BLOCK  parameters)

Definition at line 548 of file desktopipc.cpp.

549 {
550  HANDLE threadHandle;
551  DWORD threadID;
552 
553  // Only try to convert the pidl when it is going to be printed
554  if (TRACE_ON(browseui))
555  {
556  WCHAR debugStr[MAX_PATH + 2] = { 0 };
557  if (!ILGetDisplayName(parameters->directoryPIDL, debugStr))
558  {
559  debugStr[0] = UNICODE_NULL;
560  }
561  TRACE("SHOpenFolderWindow %p(%S)\n", parameters->directoryPIDL, debugStr);
562  }
563 
564  PIE_THREAD_PARAM_BLOCK paramsCopy = SHCloneIETHREADPARAM(parameters);
565 
566  SHGetInstanceExplorer(&(paramsCopy->offsetF8));
567  threadHandle = CreateThread(NULL, 0x10000, BrowserThreadProc, paramsCopy, 0, &threadID);
568  if (threadHandle != NULL)
569  {
570  CloseHandle(threadHandle);
571  return S_OK;
572  }
573  SHDestroyIETHREADPARAM(paramsCopy);
574  return E_FAIL;
575 }
IEThreadParamBlock *WINAPI SHCloneIETHREADPARAM(IEThreadParamBlock *param)
Definition: desktopipc.cpp:474
#define CloseHandle
Definition: compat.h:598
HRESULT WINAPI SHGetInstanceExplorer(IUnknown **lpUnknown)
Definition: shellord.c:1517
#define E_FAIL
Definition: ddrawi.h:102
#define UNICODE_NULL
BOOL WINAPI ILGetDisplayName(LPCITEMIDLIST pidl, LPVOID path)
Definition: pidl.c:174
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 TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:34
unsigned long DWORD
Definition: ntddk_ex.h:95
void WINAPI SHDestroyIETHREADPARAM(IEThreadParamBlock *param)
Definition: desktopipc.cpp:502
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
static DWORD WINAPI BrowserThreadProc(LPVOID lpThreadParameter)
Definition: desktopipc.cpp:428
#define TRACE_ON(x)
Definition: compat.h:75
LPITEMIDLIST directoryPIDL

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

◆ SHOpenNewFrame()

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

Definition at line 584 of file desktopipc.cpp.

585 {
586  IEThreadParamBlock *parameters;
587 
588  TRACE("SHOpenNewFrame\n");
589 
590  parameters = SHCreateIETHREADPARAM(0, 1, paramC, NULL);
591  if (parameters == NULL)
592  {
593  ILFree(pidl);
594  return E_OUTOFMEMORY;
595  }
596  if (paramC != NULL)
597  parameters->offset10 = param10;
598  parameters->directoryPIDL = pidl;
599  parameters->dwFlags = dwFlags;
600 
601  HRESULT hr = SHOpenFolderWindow(parameters);
602 
603  SHDestroyIETHREADPARAM(parameters);
604 
605  return hr;
606 }
HRESULT WINAPI SHOpenFolderWindow(PIE_THREAD_PARAM_BLOCK parameters)
Definition: desktopipc.cpp:548
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:925
HRESULT hr
Definition: shlfolder.c:183
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
IEThreadParamBlock *WINAPI SHCreateIETHREADPARAM(long param8, long paramC, IUnknown *param10, IUnknown *param14)
Definition: desktopipc.cpp:450
void WINAPI SHDestroyIETHREADPARAM(IEThreadParamBlock *param)
Definition: desktopipc.cpp:502
#define NULL
Definition: types.h:112
LPITEMIDLIST directoryPIDL

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 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ UEMRegisterNotify()

void WINAPI UEMRegisterNotify ( long  param8,
long  paramC 
)

Definition at line 47 of file browseuiord.cpp.

48 {
49 }