FSCTL_GET_RETRIEVAL_POINTERS doesn't work

Hello All!

The following code doesn’t work and I really don’t understand why:

STARTING_VCN_INPUT_BUFFER StartingVcn;
RETRIEVAL_POINTERS_BUFFER RetrievalPtr;

RtlInitUnicodeString( &FileName, L"\??\F:\test.dat" );

InitializeObjectAttributes( &ObjectAttributes, &FileName, OBJ_KERNEL_HANDLE,
NULL, NULL );

Status = IoCreateFile( &hFile, FILE_ALL_ACCESS, &ObjectAttributes,
&IoStatusBlock, NULL, 0, 0, FILE_OPEN, 0, NULL, 0, CreateFileTypeNone, NULL,
IO_NO_PARAMETER_CHECKING );

StartingVcn.StartingVcn.QuadPart = 0;
Status = ZwFsControlFile( hFile, NULL, NULL, NULL, &IoStatusBlock,
FSCTL_GET_RETRIEVAL_POINTERS, &StartingVcn,
sizeof(STARTING_VCN_INPUT_BUFFER), &RetrievalPtr,
sizeof(RETRIEVAL_POINTERS_BUFFER) );

DbgPrint(“Status = 0x%08X, Extents number: %d, StartingVcn: %d\n”,
RetrievalPtr.ExtentCount, RetrievalPtr.StartingVcn.LowPart );

Status = 0x00000001, Extents number: 0, StartingVcn: 0

The file really does exist on F: volume and it has no attributes. So I do
not understand why ZwFsControlFile returns STATUS_WAIT_1

Thanks, regards,
Mike

Sorry for troubling you all guys!
The issue is closed!

Thanks for your patience!
Mike

-----Original Message-----
From: Mike Alekseev [mailto:xxxxx@pigeonpoint.com]
Sent: Saturday, May 09, 2009 11:02 PM
To: ‘Windows System Software Devs Interest List’
Subject: FSCTL_GET_RETRIEVAL_POINTERS doesn’t work

Hello All!

The following code doesn’t work and I really don’t understand why:

STARTING_VCN_INPUT_BUFFER StartingVcn;
RETRIEVAL_POINTERS_BUFFER RetrievalPtr;

RtlInitUnicodeString( &FileName, L"\??\F:\test.dat" );

InitializeObjectAttributes( &ObjectAttributes, &FileName, OBJ_KERNEL_HANDLE,
NULL, NULL );

Status = IoCreateFile( &hFile, FILE_ALL_ACCESS, &ObjectAttributes,
&IoStatusBlock, NULL, 0, 0, FILE_OPEN, 0, NULL, 0, CreateFileTypeNone, NULL,
IO_NO_PARAMETER_CHECKING );

StartingVcn.StartingVcn.QuadPart = 0;
Status = ZwFsControlFile( hFile, NULL, NULL, NULL, &IoStatusBlock,
FSCTL_GET_RETRIEVAL_POINTERS, &StartingVcn,
sizeof(STARTING_VCN_INPUT_BUFFER), &RetrievalPtr,
sizeof(RETRIEVAL_POINTERS_BUFFER) );

DbgPrint(“Status = 0x%08X, Extents number: %d, StartingVcn: %d\n”,
RetrievalPtr.ExtentCount, RetrievalPtr.StartingVcn.LowPart );

Status = 0x00000001, Extents number: 0, StartingVcn: 0

The file really does exist on F: volume and it has no attributes. So I do
not understand why ZwFsControlFile returns STATUS_WAIT_1

Thanks, regards,
Mike