Leaked source code of windows server 2003
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.

33 lines
710 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. FT_LOGICAL_DISK_ID diskId;
  11. int memberNumber;
  12. BOOL b;
  13. if (argc != 3) {
  14. printf("usage: %s <diskId> <memberNumber>\n", argv[0]);
  15. return;
  16. }
  17. sscanf(argv[1], "%I64X", &diskId);
  18. sscanf(argv[2], "%d", &memberNumber);
  19. printf("Orphaning member %d on %I64X...\n", memberNumber, diskId);
  20. b = FtOrphanLogicalDiskMember(diskId, (WORD) memberNumber);
  21. if (b) {
  22. printf("Member orphaned.\n");
  23. } else {
  24. printf("Orphaning failed with %d\n", GetLastError());
  25. }
  26. }