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
624 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. WCHAR driveName[7];
  11. HANDLE h;
  12. BOOL b;
  13. FT_LOGICAL_DISK_ID diskId;
  14. if (argc != 2) {
  15. printf("usage: %s <diskId>\n", argv[0]);
  16. return;
  17. }
  18. sscanf(argv[1], "%I64X", &diskId);
  19. printf("Breaking %I64X...\n", diskId);
  20. b = FtBreakLogicalDisk(diskId);
  21. if (b) {
  22. printf("Logical disk broken.\n");
  23. } else {
  24. printf("Break failed with %d\n", GetLastError());
  25. }
  26. }