reactos/drivers/filesystems/mup/dfs.h
Timo Kreuzer 71fefa32db
[NDK][NTOS] Add global definition of INIT_FUNCTION/INIT_SECTION (#779)
* Add an NDK header to define INIT_FUNCTION/INIT_SECTION globally
* Use _declspec(allocate(x)) and _declspec(code_seg(x)) on MSVC versions that support it
* Use INIT_FUNCTION on functions only and INIT_SECTION on data only (required by MSVC)
* Place INIT_FUNCTION before the return type (required by MSVC)
* Make sure declarations and implementations share the same modifiers (required by MSVC)
* Add a global linker option to suppress warnings about defined but unused INIT section
* Merge INIT section into .text in freeldr
2018-12-30 12:19:11 +01:00

68 lines
1.1 KiB
C

#ifndef _DFS_PCH_
#define _DFS_PCH_
#ifndef INIT_SECTION
#ifdef __GNUC__
#define INIT_SECTION __attribute__((section ("INIT")))
#else
#define INIT_SECTION /* Done via alloc_text for MSC */
#endif
#define INIT_FUNCTION INIT_SECTION
#endif
#define DFS_OPEN_CONTEXT 0xFF444653
#define DFS_DOWNLEVEL_OPEN_CONTEXT 0x11444653
#define DFS_CSCAGENT_NAME_CONTEXT 0xAAAAAAAA
#define DFS_USER_NAME_CONTEXT 0xBBBBBBBB
typedef struct _DFS_NAME_CONTEXT_
{
UNICODE_STRING UNCFileName;
LONG NameContextType;
ULONG Flags;
} DFS_NAME_CONTEXT, *PDFS_NAME_CONTEXT;
NTSTATUS
NTAPI
DfsVolumePassThrough(
PDEVICE_OBJECT DeviceObject,
PIRP Irp
);
NTSTATUS
DfsFsdFileSystemControl(
PDEVICE_OBJECT DeviceObject,
PIRP Irp
);
NTSTATUS
DfsFsdCreate(
PDEVICE_OBJECT DeviceObject,
PIRP Irp
);
NTSTATUS
DfsFsdCleanup(
PDEVICE_OBJECT DeviceObject,
PIRP Irp
);
NTSTATUS
DfsFsdClose(
PDEVICE_OBJECT DeviceObject,
PIRP Irp
);
VOID
DfsUnload(
PDRIVER_OBJECT DriverObject
);
INIT_FUNCTION
NTSTATUS
DfsDriverEntry(
PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath
);
#endif