/* Query the device map so we can get the drive letters */
Status = NtQueryInformationProcess(NtCurrentProcess(),
ProcessDeviceMap,
- &ProcessInformation,
- sizeof(ProcessInformation),
+ &ProcessInformation.Query,
+ sizeof(ProcessInformation.Query),
NULL);
if (!NT_SUCCESS(Status))
{
/* Get the Device Map for this Process */
Status = NtQueryInformationProcess(NtCurrentProcess(),
ProcessDeviceMap,
- &ProcessDeviceMapInfo,
- sizeof(ProcessDeviceMapInfo),
+ &ProcessDeviceMapInfo.Query,
+ sizeof(ProcessDeviceMapInfo.Query),
NULL);
/* Return the Drive Map */
PROCESS_DEVICEMAP_INFORMATION DeviceMap;
/* Query the device map */
- Status = NtQueryInformationProcess(NtCurrentProcess(), ProcessDeviceMap,
- &DeviceMap,
- sizeof(PROCESS_DEVICEMAP_INFORMATION),
+ Status = NtQueryInformationProcess(NtCurrentProcess(),
+ ProcessDeviceMap,
+ &DeviceMap.Query,
+ sizeof(DeviceMap.Query),
NULL);
/* Zero output if we failed */
if (!NT_SUCCESS(Status))
/* DOS Device Map */
case ProcessDeviceMap:
- if (ProcessInformationLength != sizeof(PROCESS_DEVICEMAP_INFORMATION))
+ if (ProcessInformationLength != RTL_FIELD_SIZE(PROCESS_DEVICEMAP_INFORMATION, Query))
{
if (ProcessInformationLength == sizeof(PROCESS_DEVICEMAP_INFORMATION_EX))
{