// QueryChangesVirtualDisk
PCWSTR changeTrackingId = virtualDiskInfo->ChangeTrackingState.MostRecentId;
ULONG64 byteOffset = 0L;
ULONG64 byteLength = virtualDiskInfoSize;
PQUERY_CHANGES_VIRTUAL_DISK_RANGE pQueryChangeRange = NULL;
ULONG rangeCount = 0L;
ULONG64 processedLength = 0L;
openStatus = QueryChangesVirtualDisk(
vhdHandle, // A handle to the open VHD
changeTrackingId, // A pointer to a string that specifies the change tracking identifier
byteOffset, // Specifies the distance from the start of the VHD to the beginning of the area of the VHD
byteLength, // Specifies the length of the area of the VHD that you want to check for changes
QUERY_CHANGES_VIRTUAL_DISK_FLAG_NONE, // Reserved
pQueryChangeRange, // Indicates the areas of the virtual disk that have changed
&rangeCount, // The number of QUERY_CHANGES_VIRTUAL_DISK_RANGE structures that the array that the Ranges parameter points to can hold
&processedLength // Indicates the total number of bytes that the method processed
);
if (openStatus != ERROR_SUCCESS)
{
wprintf(L"Failed to call method(QueryChangesVirtualDisk), Erorr code: %ld\n", openStatus);
wprintf(L"Virtual disk path: %s\n", virtualDiskPath);
wprintf(L"%s\n", changeTrackingId);
wprintf(L"Start offset: %llu\n", byteOffset);
wprintf(L"End offset: %lu\n", virtualDiskInfoSize);
getchar();
return 1;
}
cout << "Succeeded to call method(QueryChangesVirtualDisk)." << endl;
if (vhdHandle != NULL)
{
CloseHandle(vhdHandle);
}
Недавно мы начали использовать новые API отслеживания устойчивых изменений (RCT 2016).Мы столкнулись с проблемой API QueryChangesVirtualDisk.Мы следуем за шагами как упомянуто в MSDN.У кого-нибудь есть предложения, если он работает на них?