MCPcopy Create free account
hub / github.com/NullArray/WinKernel-Resources / cmdResources

Function cmdResources

Drivers/Driver-SRC/setup/devcon/cmds.cpp:517–561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

515
516
517int cmdResources(_In_ LPCTSTR BaseName, _In_opt_ LPCTSTR Machine, _In_ DWORD Flags, _In_ int argc, _In_reads_(argc) PTSTR argv[])
518/*++
519
520Routine Description:
521
522 RESOURCES <id> ...
523 use EnumerateDevices to do hardwareID matching
524 for each match, dump resources to stdout
525 note that we only enumerate present devices
526
527Arguments:
528
529 BaseName - name of executable
530 Machine - if non-NULL, remote machine
531 argc/argv - remaining parameters - passed into EnumerateDevices
532
533Return Value:
534
535 EXIT_xxxx
536
537--*/
538{
539 GenericContext context;
540 int failcode;
541
542 UNREFERENCED_PARAMETER(Flags);
543
544 if(!argc) {
545 return EXIT_USAGE;
546 }
547
548 context.count = 0;
549 context.control = FIND_DEVICE | FIND_RESOURCES;
550 failcode = EnumerateDevices(BaseName,Machine,DIGCF_PRESENT,argc,argv,FindCallback,&context);
551
552 if(failcode == EXIT_OK) {
553
554 if(!context.count) {
555 FormatToStream(stdout,Machine?MSG_FIND_TAIL_NONE:MSG_FIND_TAIL_NONE_LOCAL,Machine);
556 } else {
557 FormatToStream(stdout,Machine?MSG_FIND_TAIL:MSG_FIND_TAIL_LOCAL,context.count,Machine);
558 }
559 }
560 return failcode;
561}
562
563
564int cmdDriverFiles(_In_ LPCTSTR BaseName, _In_opt_ LPCTSTR Machine, _In_ DWORD Flags, _In_ int argc, _In_reads_(argc) PTSTR argv[])

Callers

nothing calls this directly

Calls 2

EnumerateDevicesFunction · 0.85
FormatToStreamFunction · 0.85

Tested by

no test coverage detected