| 562 | |
| 563 | |
| 564 | int cmdDriverFiles(_In_ LPCTSTR BaseName, _In_opt_ LPCTSTR Machine, _In_ DWORD Flags, _In_ int argc, _In_reads_(argc) PTSTR argv[]) |
| 565 | /*++ |
| 566 | |
| 567 | Routine Description: |
| 568 | |
| 569 | STATUS <id> ... |
| 570 | use EnumerateDevices to do hardwareID matching |
| 571 | for each match, dump driver files to stdout |
| 572 | note that we only enumerate present devices |
| 573 | |
| 574 | Arguments: |
| 575 | |
| 576 | BaseName - name of executable |
| 577 | Machine - if non-NULL, remote machine |
| 578 | argc/argv - remaining parameters - passed into EnumerateDevices |
| 579 | |
| 580 | Return Value: |
| 581 | |
| 582 | EXIT_xxxx |
| 583 | |
| 584 | --*/ |
| 585 | { |
| 586 | GenericContext context; |
| 587 | int failcode; |
| 588 | |
| 589 | UNREFERENCED_PARAMETER(Flags); |
| 590 | |
| 591 | if(!argc) { |
| 592 | return EXIT_USAGE; |
| 593 | } |
| 594 | if(Machine) { |
| 595 | // |
| 596 | // must be local machine as we need to involve class/co installers (FIND_DRIVERFILES) |
| 597 | // |
| 598 | return EXIT_USAGE; |
| 599 | } |
| 600 | |
| 601 | context.count = 0; |
| 602 | context.control = FIND_DEVICE | FIND_DRIVERFILES; |
| 603 | failcode = EnumerateDevices(BaseName,Machine,DIGCF_PRESENT,argc,argv,FindCallback,&context); |
| 604 | |
| 605 | if(failcode == EXIT_OK) { |
| 606 | |
| 607 | if(!context.count) { |
| 608 | FormatToStream(stdout,Machine?MSG_FIND_TAIL_NONE:MSG_FIND_TAIL_NONE_LOCAL,Machine); |
| 609 | } else { |
| 610 | FormatToStream(stdout,Machine?MSG_FIND_TAIL:MSG_FIND_TAIL_LOCAL,context.count,Machine); |
| 611 | } |
| 612 | } |
| 613 | return failcode; |
| 614 | } |
| 615 | |
| 616 | int cmdDriverNodes(_In_ LPCTSTR BaseName, _In_opt_ LPCTSTR Machine, _In_ DWORD Flags, _In_ int argc, _In_reads_(argc) PTSTR argv[]) |
| 617 | /*++ |
nothing calls this directly
no test coverage detected