Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
667 B

  1. // Private nt headers.
  2. //
  3. #include <nt.h>
  4. #include <ntrtl.h>
  5. #include <nturtl.h>
  6. #include <netcfgp.h>
  7. #include <stdio.h> // printf
  8. VOID
  9. __cdecl
  10. wmain (
  11. int argc,
  12. PCWSTR argv[])
  13. {
  14. HRESULT hr;
  15. PCWSTR pszService;
  16. PCWSTR pszNewGroup;
  17. // Argument check
  18. //
  19. if (3 != argc)
  20. {
  21. printf ("%S <service> <svchost group>\n", argv[0]);
  22. return;
  23. }
  24. pszService = argv[1];
  25. pszNewGroup = argv[2];
  26. hr = SvchostChangeSvchostGroup (
  27. pszService,
  28. pszNewGroup);
  29. if (FAILED(hr))
  30. {
  31. printf ("error: SvchostChangeSvchostGroup failed. (0x%08x)\n\n",
  32. hr);
  33. }
  34. }