| 422 | } |
| 423 | |
| 424 | int cmdFindAll(_In_ LPCTSTR BaseName, _In_opt_ LPCTSTR Machine, _In_ DWORD Flags, _In_ int argc, _In_reads_(argc) PTSTR argv[]) |
| 425 | /*++ |
| 426 | |
| 427 | Routine Description: |
| 428 | |
| 429 | FINDALL <id> ... |
| 430 | use EnumerateDevices to do hardwareID matching |
| 431 | for each match, dump to stdout |
| 432 | like find, but also show not-present devices |
| 433 | |
| 434 | Arguments: |
| 435 | |
| 436 | BaseName - name of executable |
| 437 | Machine - if non-NULL, remote machine |
| 438 | argc/argv - remaining parameters - passed into EnumerateDevices |
| 439 | |
| 440 | Return Value: |
| 441 | |
| 442 | EXIT_xxxx |
| 443 | |
| 444 | --*/ |
| 445 | { |
| 446 | GenericContext context; |
| 447 | int failcode; |
| 448 | |
| 449 | UNREFERENCED_PARAMETER(Flags); |
| 450 | |
| 451 | if(!argc) { |
| 452 | return EXIT_USAGE; |
| 453 | } |
| 454 | |
| 455 | context.count = 0; |
| 456 | context.control = 0; |
| 457 | failcode = EnumerateDevices(BaseName,Machine,0,argc,argv,FindCallback,&context); |
| 458 | |
| 459 | if(failcode == EXIT_OK) { |
| 460 | |
| 461 | if(!context.count) { |
| 462 | FormatToStream(stdout,Machine?MSG_FIND_TAIL_NONE:MSG_FIND_TAIL_NONE_LOCAL,Machine); |
| 463 | } else { |
| 464 | FormatToStream(stdout,Machine?MSG_FIND_TAIL:MSG_FIND_TAIL_LOCAL,context.count,Machine); |
| 465 | } |
| 466 | } |
| 467 | return failcode; |
| 468 | } |
| 469 | |
| 470 | int cmdStatus(_In_ LPCTSTR BaseName, _In_opt_ LPCTSTR Machine, _In_ DWORD Flags, _In_ int argc, _In_reads_(argc) PTSTR argv[]) |
| 471 | /*++ |
nothing calls this directly
no test coverage detected