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.

30 lines
577 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;
  12. if (argc < 2) {
  13. printf("usage: %s <diskId> [init-orphans]\n", argv[0]);
  14. return;
  15. }
  16. sscanf(argv[1], "%I64X", &diskId);
  17. printf("Initializing %I64X...\n", diskId);
  18. b = FtInitializeLogicalDisk(diskId, argc > 2 ? TRUE : FALSE);
  19. if (b) {
  20. printf("Initialize started.\n");
  21. } else {
  22. printf("Initialize failed with %d\n", GetLastError());
  23. }
  24. }