233{
236
239
240 if (!*strFieldArray)
241 {
242 pInfo->dwFlags = 9;
244 if (!pInfo->pidlPath)
245 {
249 }
251 }
252
254
256
259 {
260
262 {
264 TRACE(
"CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
265 }
267 {
269 TRACE(
"CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
270 }
272 {
274 TRACE(
"CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
275 }
276 else if (!
StrCmpIW(strField,
L"/SELECT"))
277 {
279 TRACE(
"CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
280 }
282 {
284 TRACE(
"CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
285 }
286 else if (!
StrCmpIW(strField,
L"-embedding"))
287 {
289 TRACE(
"CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
290 }
291 else if (!
StrCmpIW(strField,
L"/SEPARATE"))
292 {
294 TRACE(
"CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags);
295 }
296 else if (!
StrCmpIW(strField,
L"/INPROC"))
297 {
298
299
300 TRACE(
"CmdLine Parser: Found %S flag\n", strField);
301
302 if (!hasNext)
304
306
309
311
312 TRACE(
"CmdLine Parser: Parsed /INPROC flag. dwFlags=%08lx, guidInproc=%S\n", pInfo->dwFlags, strField);
313 }
315 {
317
318
319
320 TRACE(
"CmdLine Parser: Found %S flag\n", strField);
321
322 if (!pInfo->pidlPath)
324
325 if (!hasNext)
327
329
330
332 {
333 if (hasNext)
334 {
336 }
338 }
339 else
340 {
341
343 }
344
345 pInfo->pidlRoot = pidlRoot;
346
347
348 if (!pidlRoot)
349 {
351 pInfo->pidlRoot =
NULL;
352 }
353
354
355
356 TRACE(
"CmdLine Parser: Parsed /ROOT flag. dwFlags=%08lx, pidlRoot=%p\n", pInfo->dwFlags, pInfo->pidlRoot);
357 }
358 else
359 {
360
361 TRACE(
"CmdLine Parser: Found target path %S\n", strField);
362
363
365 {
367
368 if (!hasNext)
370
373 if (!pidlArg)
375
376 if (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
385
388
391
394
396
397 pInfo->pidlPath = pidlPath;
398
399 if (pidlPath)
400 {
402 TRACE(
"CmdLine Parser: Parsed target path. dwFlags=%08lx, pidlPath=%p\n", pInfo->dwFlags, pInfo->pidlPath);
403 }
404 else
405 {
406
407
408
410 pInfo->strPath =
field;
412 {
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;
424 }
425
427}
#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_STRING
#define SH_EXPLORER_CMDLINE_FLAG_ONE
#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)
LPWSTR WINAPI GetCommandLineW(VOID)
BOOL WINAPI PathStripToRootW(LPWSTR lpszPath)
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
LPWSTR WINAPI PathGetArgsW(LPCWSTR lpszPath)
int WINAPI StrCmpIW(LPCWSTR lpszStr, LPCWSTR lpszComp)
LPWSTR WINAPI StrDupW(LPCWSTR lpszStr)
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)