42 *
Flags = TESTENTRY_NO_EXCLUSIVE_DEVICE |
43 TESTENTRY_BUFFERED_IO_DEVICE |
44 TESTENTRY_NO_READONLY_DEVICE;
75 DPRINT(
"IRP %x/%x\n", IoStack->MajorFunction, IoStack->MinorFunction);
80 Irp->IoStatus.Information = 0;
87 if (IoStack->FileObject->FileName.Length >= 2 *
sizeof(
WCHAR))
92 if (IoStack->FileObject->FileName.Length >= 2 *
sizeof(
WCHAR) &&
93 IoStack->FileObject->FileName.Buffer[1] ==
'M')
114 else if (IoStack->FileObject->FileName.Length >= 2 *
sizeof(
WCHAR) &&
115 IoStack->FileObject->FileName.Buffer[1] ==
'S')
153 FsRtlSetupAdvancedHeader(&
Fcb->
Header, &
Fcb->HeaderMutex);
156 Fcb->
Header.ValidDataLength.QuadPart = 0;
157 IoStack->FileObject->FsContext =
Fcb;
171 IoStack->FileObject->FsContext =
NULL;
#define IOCTL_DISABLE_SYMLINK
#define IOCTL_CALL_CREATE
static PDEVICE_OBJECT TestDeviceObject
static PFILE_OBJECT TestFileObject
static volatile long gNoLinks
struct _TEST_FCB TEST_FCB
struct _TEST_FCB * PTEST_FCB
VOID TestUnload(_In_ PDRIVER_OBJECT DriverObject)
static KMT_MESSAGE_HANDLER TestMessageHandler
static UNICODE_STRING FileObjectFileName
NTSTATUS TestEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PCUNICODE_STRING RegistryPath, _Out_ PCWSTR *DeviceName, _Inout_ INT *Flags)
static NTSTATUS TestIoCreateFile(IN PUNICODE_STRING Path)
static KMT_IRP_HANDLER TestIrpHandler
static UNICODE_STRING DocumentsAndSettings
PRTL_UNICODE_STRING_BUFFER Path
#define ok_eq_hex(value, expected)
#define InterlockedExchange
#define FILE_DIRECTORY_FILE
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
#define FILE_ATTRIBUTE_NORMAL
ULONG RtlCompareUnicodeString(PUNICODE_STRING s1, PUNICODE_STRING s2, BOOLEAN UpCase)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeInitializeEvent(pEvt, foo, foo2)
#define FILE_OPEN_REPARSE_POINT
#define FILE_SYNCHRONOUS_IO_ALERT
BOOLEAN NTAPI CcUninitializeCacheMap(IN PFILE_OBJECT FileObject, IN OPTIONAL PLARGE_INTEGER TruncateSize, IN OPTIONAL PCACHE_UNINITIALIZE_EVENT UninitializeEvent)
#define OBJ_KERNEL_HANDLE
#define OBJ_CASE_INSENSITIVE
POBJECT_TYPE IoFileObjectType
NTSTATUS KmtRegisterMessageHandler(IN ULONG ControlCode OPTIONAL, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN PKMT_MESSAGE_HANDLER MessageHandler)
NTSTATUS KmtRegisterIrpHandler(IN UCHAR MajorFunction, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN PKMT_IRP_HANDLER IrpHandler)
#define ExFreePoolWithTag(_P, _T)
FORCEINLINE PVOID ExAllocatePoolZero(ULONG PoolType, SIZE_T NumberOfBytes, ULONG Tag)
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define InitializeObjectAttributes(p, n, a, r, s)
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define UNREFERENCED_PARAMETER(P)
NTSTATUS NTAPI IoCreateFile(OUT PHANDLE FileHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK IoStatusBlock, IN PLARGE_INTEGER AllocationSize OPTIONAL, IN ULONG FileAttributes, IN ULONG ShareAccess, IN ULONG Disposition, IN ULONG CreateOptions, IN PVOID EaBuffer OPTIONAL, IN ULONG EaLength, IN CREATE_FILE_TYPE CreateFileType, IN PVOID ExtraCreateParameters OPTIONAL, IN ULONG Options)
#define IoCompleteRequest
#define STATUS_NOT_SUPPORTED
#define STATUS_STOPPED_ON_SYMLINK
NTSTATUS NTAPI ObCloseHandle(IN HANDLE Handle, IN KPROCESSOR_MODE AccessMode)
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
struct _REPARSE_DATA_BUFFER * PREPARSE_DATA_BUFFER
PULONG MinorVersion OPTIONAL
SECTION_OBJECT_POINTERS SectionObjectPointers
FSRTL_ADVANCED_FCB_HEADER Header
struct _REPARSE_DATA_BUFFER::@312::@314 SymbolicLinkReparseBuffer
struct _REPARSE_DATA_BUFFER::@312::@315 MountPointReparseBuffer
SECTION_OBJECT_POINTERS SectionObjectPointers
FSRTL_ADVANCED_FCB_HEADER Header
#define RTL_CONSTANT_STRING(s)
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
_IRQL_requires_same_ typedef _In_ ULONG ControlCode
_Must_inspect_result_ _In_ ULONG Flags
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
#define IO_NO_PARAMETER_CHECKING
#define MAXIMUM_REPARSE_DATA_BUFFER_SIZE
#define SL_STOP_ON_SYMLINK
#define IO_STOP_ON_SYMLINK
#define IO_REPARSE_TAG_SYMLINK
#define IO_REPARSE_TAG_MOUNT_POINT
#define ObDereferenceObject