Different Reparse FSCTL codes in ntifs.h and winioctl.h

Below are the FSCTL codes for reparse points from both ntifs.h and
winioctl.h. (Notice one uses FILE_SPECIAL_ACCESS and the other uses
FILE_WRITE_DATA.) Sending a DeviceIoControl with FSCTL_SET_REPARSE_POINT
from user mode was failing and not hitting my filter driver in kernel mode.
After some ugly debugging, I came to find out that Microsoft didn’t define
the ctl codes the same in their headers. Thanks MS!

From ntifs.h
#define FSCTL_SET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM,
41, METHOD_BUFFERED, FILE_SPECIAL_ACCESS) // REPARSE_DATA_BUFFER,
#define FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM,
42, METHOD_BUFFERED, FILE_ANY_ACCESS) // REPARSE_DATA_BUFFER
#define FSCTL_DELETE_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM,
43, METHOD_BUFFERED, FILE_SPECIAL_ACCESS) // REPARSE_DATA_BUFFER,

From winioctl.h
#define FSCTL_SET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM,
41, METHOD_BUFFERED, FILE_WRITE_DATA) // REPARSE_DATA_BUFFER,
#define FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM,
42, METHOD_BUFFERED, FILE_ANY_ACCESS) // , REPARSE_DATA_BUFFER
#define FSCTL_DELETE_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM,
43, METHOD_BUFFERED, FILE_WRITE_DATA) // REPARSE_DATA_BUFFER,


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Where did you get the winioctl.h from? I am looking at Win2K RTM sources
and it’s defined right
(FILE_SPECIAL_ACCESS)

Ravi

-----Original Message-----
From: Kevin Goodwin [mailto:kevin_goodwin@hp.com]
Sent: Thursday, February 14, 2002 9:22 AM
To: File Systems Developers
Subject: [ntfsd] Different Reparse FSCTL codes in ntifs.h and winioctl.h

Below are the FSCTL codes for reparse points from both ntifs.h and
winioctl.h. (Notice one uses FILE_SPECIAL_ACCESS and the other uses
FILE_WRITE_DATA.) Sending a DeviceIoControl with
FSCTL_SET_REPARSE_POINT
from user mode was failing and not hitting my filter driver in kernel
mode.
After some ugly debugging, I came to find out that Microsoft didn’t
define
the ctl codes the same in their headers. Thanks MS!

From ntifs.h
#define FSCTL_SET_REPARSE_POINT
CTL_CODE(FILE_DEVICE_FILE_SYSTEM,
41, METHOD_BUFFERED, FILE_SPECIAL_ACCESS) // REPARSE_DATA_BUFFER,
#define FSCTL_GET_REPARSE_POINT
CTL_CODE(FILE_DEVICE_FILE_SYSTEM,
42, METHOD_BUFFERED, FILE_ANY_ACCESS) // REPARSE_DATA_BUFFER
#define FSCTL_DELETE_REPARSE_POINT
CTL_CODE(FILE_DEVICE_FILE_SYSTEM,
43, METHOD_BUFFERED, FILE_SPECIAL_ACCESS) // REPARSE_DATA_BUFFER,

From winioctl.h
#define FSCTL_SET_REPARSE_POINT
CTL_CODE(FILE_DEVICE_FILE_SYSTEM,
41, METHOD_BUFFERED, FILE_WRITE_DATA) // REPARSE_DATA_BUFFER,
#define FSCTL_GET_REPARSE_POINT
CTL_CODE(FILE_DEVICE_FILE_SYSTEM,
42, METHOD_BUFFERED, FILE_ANY_ACCESS) // , REPARSE_DATA_BUFFER
#define FSCTL_DELETE_REPARSE_POINT
CTL_CODE(FILE_DEVICE_FILE_SYSTEM,
43, METHOD_BUFFERED, FILE_WRITE_DATA) // REPARSE_DATA_BUFFER,


You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Also, please tell me you are not using the really really ancient VC6
headers from pre-Win2K release timeline…
Ravi

-----Original Message-----
From: Ravisankar Pudipeddi
Sent: Thursday, February 14, 2002 2:26 PM
To: File Systems Developers
Subject: [ntfsd] RE: Different Reparse FSCTL codes in ntifs.h and
winioctl.h

Where did you get the winioctl.h from? I am looking at Win2K RTM sources
and it’s defined right
(FILE_SPECIAL_ACCESS)

Ravi

-----Original Message-----
From: Kevin Goodwin [mailto:kevin_goodwin@hp.com]
Sent: Thursday, February 14, 2002 9:22 AM
To: File Systems Developers
Subject: [ntfsd] Different Reparse FSCTL codes in ntifs.h and winioctl.h

Below are the FSCTL codes for reparse points from both ntifs.h and
winioctl.h. (Notice one uses FILE_SPECIAL_ACCESS and the other uses
FILE_WRITE_DATA.) Sending a DeviceIoControl with
FSCTL_SET_REPARSE_POINT
from user mode was failing and not hitting my filter driver in kernel
mode.
After some ugly debugging, I came to find out that Microsoft didn’t
define
the ctl codes the same in their headers. Thanks MS!

From ntifs.h
#define FSCTL_SET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM,
41, METHOD_BUFFERED, FILE_SPECIAL_ACCESS) // REPARSE_DATA_BUFFER,
#define FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM,
42, METHOD_BUFFERED, FILE_ANY_ACCESS) // REPARSE_DATA_BUFFER #define
FSCTL_DELETE_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM,
43, METHOD_BUFFERED, FILE_SPECIAL_ACCESS) // REPARSE_DATA_BUFFER,

From winioctl.h
#define FSCTL_SET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM,
41, METHOD_BUFFERED, FILE_WRITE_DATA) // REPARSE_DATA_BUFFER, #define
FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM,
42, METHOD_BUFFERED, FILE_ANY_ACCESS) // , REPARSE_DATA_BUFFER #define
FSCTL_DELETE_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM,
43, METHOD_BUFFERED, FILE_WRITE_DATA) // REPARSE_DATA_BUFFER,


You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com