ReactOS 0.4.15-dev-8390-g075894b
env_spec.h
Go to the documentation of this file.
1
2// Copyright (C) Alexander Telyatnikov, Ivan Keliukh, Yegor Anchishkin, SKIF Software, 1999-2013. Kiev, Ukraine
3// All rights reserved
4// This file was released under the GPLv2 on June 2015.
6/*************************************************************************
7*
8* File: sys_spec.h
9*
10* Module: UDF File System Driver (Kernel mode execution only)
11*
12* Description:
13* The main include file for the UDF file system driver.
14*
15* Author: Alter
16*
17*************************************************************************/
18
19#ifndef _UDF_ENV_SPEC_H_
20#define _UDF_ENV_SPEC_H_
21
28 ULONG Flags);
29
31 PDEVICE_OBJECT DeviceObject, // the physical device object
35 PSIZE_T WrittenBytes,
36 ULONG Flags);
37/*
38extern NTSTATUS UDFPhWriteVerifySynchronous(
39 PDEVICE_OBJECT DeviceObject, // the physical device object
40 PVOID Buffer,
41 SIZE_T Length,
42 LONGLONG Offset,
43 PSIZE_T WrittenBytes,
44 ULONG Flags);
45*/
46#define UDFPhWriteVerifySynchronous UDFPhWriteSynchronous
47
48extern NTSTATUS NTAPI
51 IN PVCB Vcb,
56 IN BOOLEAN OverrideVerify,
58 );
59
67 IN BOOLEAN OverrideVerify,
69/*
70// This routine performs low-level write (asynchronously if possible)
71extern NTSTATUS UDFTWriteAsync(
72 IN PVOID _Vcb,
73 IN PVOID Buffer, // Target buffer
74 IN ULONG Length,
75 IN ULONG LBA,
76 OUT PULONG WrittenBytes,
77 IN BOOLEAN FreeBuffer);
78
79extern VOID UDFBGWrite(
80 IN PVOID Context);
81*/
82
83/*#define UDFNotifyFullReportChange(V,FI,E,A) \
84 FsRtlNotifyFullReportChange( (V)->NotifyIRPMutex, &((V)->NextNotifyIRP), \
85 ((FI)->ParentFile) ? (PSTRING)&((FI)->Fcb->FCBName->ObjectName) : (PSTRING)&(UDFGlobalData.UnicodeStrRoot), \
86 ((FI)->ParentFile) ? ((FI)->ParentFile->Fcb->FCBName->ObjectName.Length + sizeof(WCHAR)) : 0, \
87 NULL,NULL, \
88 E, A, \
89 NULL);*/
90
91#ifdef UDF_DBG
94 ULONG E,
95 ULONG A);
98#else // UDF_DBG
100 PVCB V,
102 ULONG E,
103 ULONG A
104 )
105{
106 FsRtlNotifyFullReportChange( (V)->NotifyIRPMutex, &((V)->NextNotifyIRP),
107 (PSTRING)&((FI)->Fcb->FCBName->ObjectName),
108 ((FI)->ParentFile) ? ((FI)->ParentFile->Fcb->FCBName->ObjectName.Length + sizeof(WCHAR)) : 0,
109 NULL,NULL,
110 E, A,
111 NULL);
112}
113
114#define UDFNotifyVolumeEvent(FileObject, EventCode) \
115 {/*if(FsRtlNotifyVolumeEvent) FsRtlNotifyVolumeEvent(FileObject, EventCode)*/;}
116
117#endif // UDF_DBG
118
119
120#define CollectStatistics(VCB, Field) { \
121 ((VCB)->Statistics[KeGetCurrentProcessorNumber()].Common.##Field) ++; \
122}
123
124#define CollectStatisticsEx(VCB, Field, a) { \
125 ((VCB)->Statistics[KeGetCurrentProcessorNumber()].Common.##Field) += (ULONG)a; \
126}
127
128#define CollectStatistics2(VCB, Field) { \
129 ((VCB)->Statistics[KeGetCurrentProcessorNumber()].Fat.##Field) ++; \
130}
131
132#define CollectStatistics2Ex(VCB, Field, a) { \
133 ((VCB)->Statistics[KeGetCurrentProcessorNumber()].Fat.##Field) += a; \
134}
135
137 IN PIRP Irp,
138 IN PVOID Contxt);
139
141 IN PIRP Irp,
142 IN PVOID Contxt);
143
145 IN PIRP Irp,
146 IN PVOID Contxt);
147
148#define UDFGetDevType(DevObj) (DevObj->DeviceType)
149
150#define OSGetCurrentThread() PsGetCurrentThread()
151
152#define GetCurrentPID() HandleToUlong(PsGetCurrentProcessId())
153
154
155#endif // _UDF_ENV_SPEC_H_
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
_In_ PFCB Fcb
Definition: cdprocs.h:159
Definition: ehthrow.cxx:93
Definition: bufpool.h:45
_In_ PIRP Irp
Definition: csq.h:116
#define NULL
Definition: types.h:112
static const WCHAR E[]
Definition: oid.c:1253
return Iosb
Definition: create.c:4402
static NTSTATUS ReadBytes(IN PDEVICE_OBJECT LowerDevice, OUT PUCHAR Buffer, IN ULONG BufferSize, OUT PULONG_PTR FilledBytes)
Definition: detect.c:67
#define UDFNotifyVolumeEvent(FileObject, EventCode)
Definition: env_spec.h:114
NTSTATUS NTAPI UDFSyncCompletionRoutine(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Contxt)
Definition: env_spec.cpp:82
__inline VOID UDFNotifyFullReportChange(PVCB V, PUDF_FILE_INFO FI, ULONG E, ULONG A)
Definition: env_spec.h:99
NTSTATUS NTAPI UDFAsyncCompletionRoutine(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Contxt)
Definition: env_spec.cpp:40
NTSTATUS NTAPI UDFSyncCompletionRoutine2(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Contxt)
NTSTATUS NTAPI UDFPhSendIOCTL(IN ULONG IoControlCode, IN PDEVICE_OBJECT DeviceObject, IN PVOID InputBuffer, IN ULONG InputBufferLength, OUT PVOID OutputBuffer, IN ULONG OutputBufferLength, IN BOOLEAN OverrideVerify, OUT PIO_STATUS_BLOCK Iosb OPTIONAL)
Definition: env_spec.cpp:511
NTSTATUS NTAPI UDFTSendIOCTL(IN ULONG IoControlCode, IN PVCB Vcb, IN PVOID InputBuffer, IN ULONG InputBufferLength, OUT PVOID OutputBuffer, IN ULONG OutputBufferLength, IN BOOLEAN OverrideVerify, OUT PIO_STATUS_BLOCK Iosb OPTIONAL)
Definition: env_spec.cpp:462
NTSTATUS NTAPI UDFPhWriteSynchronous(PDEVICE_OBJECT DeviceObject, PVOID Buffer, SIZE_T Length, LONGLONG Offset, PSIZE_T WrittenBytes, ULONG Flags)
Definition: env_spec.cpp:276
NTSTATUS NTAPI UDFPhReadSynchronous(PDEVICE_OBJECT DeviceObject, PVOID Buffer, SIZE_T Length, LONGLONG Offset, PSIZE_T ReadBytes, ULONG Flags)
Definition: env_spec.cpp:130
_In_ NDIS_STATUS EventCode
Definition: ndis.h:4751
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
VOID NTAPI FsRtlNotifyFullReportChange(IN PNOTIFY_SYNC NotifySync, IN PLIST_ENTRY NotifyList, IN PSTRING FullTargetName, IN USHORT TargetNameOffset, IN PSTRING StreamName OPTIONAL, IN PSTRING NormalizedParentName OPTIONAL, IN ULONG FilterMatch, IN ULONG Action, IN PVOID TargetContext)
Definition: notify.c:1552
#define Vcb
Definition: cdprocs.h:1415
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
WCHAR * ObjectName
Definition: ntfs.h:524
Definition: cdstruc.h:498
ULONG_PTR * PSIZE_T
Definition: typedefs.h:80
int64_t LONGLONG
Definition: typedefs.h:68
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:550
_In_ WDFREQUEST _In_ size_t _In_ size_t _In_ ULONG IoControlCode
Definition: wdfio.h:325
_In_ WDFREQUEST _In_ size_t OutputBufferLength
Definition: wdfio.h:320
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
Definition: wdfio.h:322
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
Definition: wdfiotarget.h:863
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
Definition: wdfiotarget.h:953
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
* PFILE_OBJECT
Definition: iotypes.h:1998
__wchar_t WCHAR
Definition: xmlstorage.h:180