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.

36 lines
902 B

  1. #include <windows.h>
  2. #include <stdio.h>
  3. #include <ftapi.h>
  4. void __cdecl
  5. main(
  6. int argc,
  7. char** argv
  8. )
  9. {
  10. BOOL b;
  11. FT_LOGICAL_DISK_ID diskId, newMemberDiskId, newDiskId;
  12. int memberNumber;
  13. if (argc != 4) {
  14. printf("usage: %s <diskId> <memberNumber> <newMemberId>\n", argv[0]);
  15. return;
  16. }
  17. sscanf(argv[1], "%I64X", &diskId);
  18. sscanf(argv[2], "%d", &memberNumber);
  19. sscanf(argv[3], "%I64X", &newMemberDiskId);
  20. printf("Regenerating member %d of %I64X with %I64X...\n",
  21. memberNumber, diskId, newMemberDiskId);
  22. b = FtReplaceLogicalDiskMember(diskId, (WORD) memberNumber,
  23. newMemberDiskId, &newDiskId);
  24. if (b) {
  25. printf("Regenerate started on disk %I64X\n", newDiskId);
  26. } else {
  27. printf("Regenerate failed with %d\n", GetLastError());
  28. }
  29. }