windows-nt/Source/XPSP1/NT/drivers/ftapi/ftorphan/ftorphan.c

34 lines
677 B
C
Raw Normal View History

2020-09-26 03:20:57 -05:00
#include <windows.h>
#include <stdio.h>
#include <ftapi.h>
void __cdecl
main(
int argc,
char** argv
)
{
FT_LOGICAL_DISK_ID diskId;
int memberNumber;
BOOL b;
if (argc != 3) {
printf("usage: %s <diskId> <memberNumber>\n", argv[0]);
return;
}
sscanf(argv[1], "%I64X", &diskId);
sscanf(argv[2], "%d", &memberNumber);
printf("Orphaning member %d on %I64X...\n", memberNumber, diskId);
b = FtOrphanLogicalDiskMember(diskId, (WORD) memberNumber);
if (b) {
printf("Member orphaned.\n");
} else {
printf("Orphaning failed with %d\n", GetLastError());
}
}