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
33 lines
624 B
#include <windows.h>
|
|
#include <stdio.h>
|
|
#include <ftapi.h>
|
|
|
|
void __cdecl
|
|
main(
|
|
int argc,
|
|
char** argv
|
|
)
|
|
|
|
{
|
|
WCHAR driveName[7];
|
|
HANDLE h;
|
|
BOOL b;
|
|
FT_LOGICAL_DISK_ID diskId;
|
|
|
|
if (argc != 2) {
|
|
printf("usage: %s <diskId>\n", argv[0]);
|
|
return;
|
|
}
|
|
|
|
sscanf(argv[1], "%I64X", &diskId);
|
|
|
|
printf("Breaking %I64X...\n", diskId);
|
|
|
|
b = FtBreakLogicalDisk(diskId);
|
|
|
|
if (b) {
|
|
printf("Logical disk broken.\n");
|
|
} else {
|
|
printf("Break failed with %d\n", GetLastError());
|
|
}
|
|
}
|