| 712 | } |
| 713 | |
| 714 | int cmdStack(_In_ LPCTSTR BaseName, _In_opt_ LPCTSTR Machine, _In_ DWORD Flags, _In_ int argc, _In_reads_(argc) PTSTR argv[]) |
| 715 | /*++ |
| 716 | |
| 717 | Routine Description: |
| 718 | |
| 719 | STACK <id> ... |
| 720 | use EnumerateDevices to do hardwareID matching |
| 721 | for each match, dump device class and stack to stdout |
| 722 | note that we only enumerate present devices |
| 723 | |
| 724 | Arguments: |
| 725 | |
| 726 | BaseName - name of executable |
| 727 | Machine - if non-NULL, remote machine |
| 728 | argc/argv - remaining parameters - passed into EnumerateDevices |
| 729 | |
| 730 | Return Value: |
| 731 | |
| 732 | EXIT_xxxx |
| 733 | |
| 734 | --*/ |
| 735 | { |
| 736 | GenericContext context; |
| 737 | int failcode; |
| 738 | |
| 739 | UNREFERENCED_PARAMETER(Flags); |
| 740 | |
| 741 | if(!argc) { |
| 742 | return EXIT_USAGE; |
| 743 | } |
| 744 | |
| 745 | context.count = 0; |
| 746 | context.control = FIND_DEVICE | FIND_CLASS | FIND_STACK; |
| 747 | failcode = EnumerateDevices(BaseName,Machine,DIGCF_PRESENT,argc,argv,FindCallback,&context); |
| 748 | |
| 749 | if(failcode == EXIT_OK) { |
| 750 | |
| 751 | if(!context.count) { |
| 752 | FormatToStream(stdout,Machine?MSG_FIND_TAIL_NONE:MSG_FIND_TAIL_NONE_LOCAL,Machine); |
| 753 | } else { |
| 754 | FormatToStream(stdout,Machine?MSG_FIND_TAIL:MSG_FIND_TAIL_LOCAL,context.count,Machine); |
| 755 | } |
| 756 | } |
| 757 | return failcode; |
| 758 | } |
| 759 | |
| 760 | |
| 761 |
nothing calls this directly
no test coverage detected