233{
236
239
240 if (!*strFieldArray)
241 {
242 pInfo->dwFlags = 9;
244 if (!pInfo->pidlPath)
245 {
249 }
251 }
252
254
256
258 {
259
261 {
263 TRACE(
"CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
264 }
266 {
268 TRACE(
"CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
269 }
271 {
273 TRACE(
"CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
274 }
275 else if (!
StrCmpIW(strField,
L"/SELECT"))
276 {
278 TRACE(
"CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
279 }
281 {
283 TRACE(
"CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
284 }
285 else if (!
StrCmpIW(strField,
L"-embedding"))
286 {
288 TRACE(
"CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
289 }
290 else if (!
StrCmpIW(strField,
L"/SEPARATE"))
291 {
293 TRACE(
"CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
294 }
295 else if (!
StrCmpIW(strField,
L"/INPROC"))
296 {
297
298
299 TRACE(
"CmdLine Parser: Found %S flag\n", strField);
300
301 if (!hasNext)
303
305
308
310
311 TRACE(
"CmdLine Parser: Parsed /INPROC flag. dwFlags=%08lx, guidInproc=%S\n", pInfo->dwFlags, strField);
312 }
314 {
316
317
318
319 TRACE(
"CmdLine Parser: Found %S flag\n", strField);
320
321 if (!hasNext)
323
325
326
328 {
329 if (hasNext)
330 {
332 }
334 }
335 else
336 {
337
339 }
340
341 pInfo->pidlRoot = pidlRoot;
342
343
344 if (!pidlRoot)
345 {
347 pInfo->pidlRoot =
NULL;
348 }
349
350
351
352 TRACE(
"CmdLine Parser: Parsed /ROOT flag. dwFlags=%08lx, pidlRoot=%p\n", pInfo->dwFlags, pInfo->pidlRoot);
353 }
354 else
355 {
356
357 TRACE(
"CmdLine Parser: Found target path %S\n", strField);
358
359
361 {
363
364 if (!hasNext)
366
369 if (!pidlArg)
371
372 if (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
381
384
387
390
392
393 pInfo->pidlPath = pidlPath;
394
395 if (pidlPath)
396 {
398 TRACE(
"CmdLine Parser: Parsed target path. dwFlags=%08lx, pidlPath=%p\n", pInfo->dwFlags, pInfo->pidlPath);
399 }
400 else
401 {
402
403
404
407 pInfo->strPath =
field;
409 {
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;
420 }
421
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_STRING
#define SH_EXPLORER_CMDLINE_FLAG_NOREUSE
#define SH_EXPLORER_CMDLINE_FLAG_SEPARATE
#define SH_EXPLORER_CMDLINE_FLAG_E
#define SH_EXPLORER_CMDLINE_FLAG_SELECT
#define SH_EXPLORER_CMDLINE_FLAG_S
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
BOOL WINAPI PathStripToRootW(WCHAR *path)
WCHAR *WINAPI PathGetArgsW(const WCHAR *path)
BOOL WINAPI PathFileExistsW(const WCHAR *path)
LPWSTR WINAPI GetCommandLineW(void)
int WINAPI StrCmpIW(const WCHAR *str, const WCHAR *comp)
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
HRESULT WINAPI SHStrDupW(LPCWSTR src, LPWSTR *dest)
unsigned __int3264 UINT_PTR
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)
LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)