Click here to Skip to main content
15,902,112 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWhy does a letter disappear when I'm writing the following (the problem is the underlined code.) Pin
hubblee28-Aug-20 10:38
hubblee28-Aug-20 10:38 
AnswerRe: Why does a letter disappear when I'm writing the following (the problem is the underlined code.) Pin
jeron128-Aug-20 13:11
jeron128-Aug-20 13:11 
GeneralRe: Why does a letter disappear when I'm writing the following (the problem is the underlined code.) Pin
Richard MacCutchan28-Aug-20 21:07
mveRichard MacCutchan28-Aug-20 21:07 
AnswerRe: Why does a letter disappear when I'm writing the following (the problem is the underlined code.) Pin
Mircea Neacsu28-Aug-20 15:50
Mircea Neacsu28-Aug-20 15:50 
GeneralRe: Why does a letter disappear when I'm writing the following (the problem is the underlined code.) Pin
Richard MacCutchan28-Aug-20 21:07
mveRichard MacCutchan28-Aug-20 21:07 
AnswerRe: Why does a letter disappear when I'm writing the following (the problem is the underlined code.) Pin
Richard MacCutchan28-Aug-20 21:06
mveRichard MacCutchan28-Aug-20 21:06 
QuestionProgramming.. Backtracking. Pin
vafoqome26-Aug-20 6:20
vafoqome26-Aug-20 6:20 
AnswerRe: Programming.. Backtracking. Pin
jeron126-Aug-20 6:22
jeron126-Aug-20 6:22 
QuestionRe: Programming.. Backtracking. Pin
Richard MacCutchan26-Aug-20 21:39
mveRichard MacCutchan26-Aug-20 21:39 
AnswerRe: Programming.. Backtracking. Pin
Stefan_Lang28-Aug-20 5:23
Stefan_Lang28-Aug-20 5:23 
AnswerRe: Programming.. Backtracking. Pin
Patrice T28-Aug-20 14:24
mvePatrice T28-Aug-20 14:24 
QuestionI want to use the mini filter driver IRP_MJ_CREATE only for opening existing files(exe files). Pin
Member 1487268117-Aug-20 23:12
Member 1487268117-Aug-20 23:12 
AnswerRe: I want to use the mini filter driver IRP_MJ_CREATE only for opening existing files(exe files). Pin
Randor 19-Aug-20 18:29
professional Randor 19-Aug-20 18:29 
GeneralRe: I want to use the mini filter driver IRP_MJ_CREATE only for opening existing files(exe files). Pin
Member 1487268119-Aug-20 18:55
Member 1487268119-Aug-20 18:55 
GeneralRe: I want to use the mini filter driver IRP_MJ_CREATE only for opening existing files(exe files). Pin
Randor 19-Aug-20 19:12
professional Randor 19-Aug-20 19:12 
GeneralRe: I want to use the mini filter driver IRP_MJ_CREATE only for opening existing files(exe files). Pin
Member 1487268119-Aug-20 20:07
Member 1487268119-Aug-20 20:07 
GeneralRe: I want to use the mini filter driver IRP_MJ_CREATE only for opening existing files(exe files). Pin
Randor 19-Aug-20 21:10
professional Randor 19-Aug-20 21:10 
GeneralRe: I want to use the mini filter driver IRP_MJ_CREATE only for opening existing files(exe files). Pin
Member 1487268119-Aug-20 21:20
Member 1487268119-Aug-20 21:20 
GeneralRe: I want to use the mini filter driver IRP_MJ_CREATE only for opening existing files(exe files). Pin
Stefan_Lang19-Aug-20 21:48
Stefan_Lang19-Aug-20 21:48 
QuestionHow to get allocated blocks for VHDx? queryChangesVirtualDisk gives ACCESS DENIED. Pin
cazorla1914-Aug-20 3:30
cazorla1914-Aug-20 3:30 
I am trying out VirtualDisk APIs, So far I am able to Open a VHDX file, get some of the properties by using GetVirtualDiskInformation. But I am not able to get RCT information and ChangedAreas.

1)Opendisk is done with VIRTUAL_DISK_ACCESS_GET_INFO flag.

2)GetVirtualDiskInformation
a. Works fine when version flag is set to GET_VIRTUAL_DISK_INFO_SIZE, able to fetch sector size and other information
b. Gives ERROR_INSUFFICIENT_BUFFER(122) when version flag is set to GET_VIRTUAL_DISK_INFO_CHANGE_TRACKING_STATE to access diskInfo->ChangeTrackingState.MostRecentId

PGET_VIRTUAL_DISK_INFO diskInfo;
ULONG diskInfoSize = sizeof(GET_VIRTUAL_DISK_INFO);
std::wcout << "size of diskinfo structure " << diskInfoSize << std::endl;
diskInfo = (PGET_VIRTUAL_DISK_INFO)malloc(diskInfoSize);

diskInfo->Version = GET_VIRTUAL_DISK_INFO_SIZE;

res = GetVirtualDiskInformation(vhdHandle, &diskInfoSize, diskInfo, NULL);
long physicalSize = diskInfo->Size.PhysicalSize;
long virtualSize = diskInfo->Size.VirtualSize;
long sectorSize = diskInfo->Size.SectorSize;
long blockSize = diskInfo->Size.BlockSize;
std::wcout << "physicalSize :" << physicalSize << std::endl;
std::wcout << "virtualSize :" << virtualSize << std::endl;
std::wcout << "sectorSize :" << sectorSize << std::endl;
std::wcout << "blockSize :" << blockSize << std::endl;

diskInfo->Version = GET_VIRTUAL_DISK_INFO_CHANGE_TRACKING_STATE;

res = GetVirtualDiskInformation(vhdHandle, &diskInfoSize, diskInfo, NULL);
std::wcout << "\nrct id:" << diskInfo->ChangeTrackingState.MostRecentId << std::endl;


3)queryChangesVirtualDisk gives ACCESS DENIED.
ULONG64   byteOffset = 0L;
ULONG64   byteLength = 19327352832;
QUERY_CHANGES_VIRTUAL_DISK_RANGE* changedAreas = NULL;
ULONG     rangeCount = 0L;
ULONG64   processedLength = 0L;
res = QueryChangesVirtualDisk(vhdHandle, "rctX:c2eb01d9:ccb1:405d:acb6:f0e76d055906:00000001",
    byteOffset, byteLength,
    QUERY_CHANGES_VIRTUAL_DISK_FLAG_NONE,
    changedAreas, &rangeCount, &processedLength);


Can someone please give some ideas on what I am doing wrong?
AnswerRe: How to get allocated blocks for VHDx? queryChangesVirtualDisk gives ACCESS DENIED. Pin
Gerry Schmitz14-Aug-20 5:04
mveGerry Schmitz14-Aug-20 5:04 
GeneralRe: How to get allocated blocks for VHDx? queryChangesVirtualDisk gives ACCESS DENIED. Pin
cazorla1918-Aug-20 0:57
cazorla1918-Aug-20 0:57 
GeneralRe: How to get allocated blocks for VHDx? queryChangesVirtualDisk gives ACCESS DENIED. Pin
Gerry Schmitz18-Aug-20 5:34
mveGerry Schmitz18-Aug-20 5:34 
AnswerRe: How to get allocated blocks for VHDx? queryChangesVirtualDisk gives ACCESS DENIED. Pin
Randor 14-Aug-20 8:54
professional Randor 14-Aug-20 8:54 
GeneralRe: How to get allocated blocks for VHDx? queryChangesVirtualDisk gives ACCESS DENIED. Pin
cazorla1918-Aug-20 0:55
cazorla1918-Aug-20 0:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.