2021-12-10 04:13:14 +01:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* win32ntdll.h
|
|
|
|
* Dynamically loaded Windows NT functions.
|
|
|
|
*
|
2022-01-08 01:04:57 +01:00
|
|
|
* Portions Copyright (c) 2021-2022, PostgreSQL Global Development Group
|
2021-12-10 04:13:14 +01:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
|
|
|
* src/include/port/win32ntdll.h
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
2022-01-11 22:11:50 +01:00
|
|
|
#ifndef WIN32NTDLL_H
|
|
|
|
#define WIN32NTDLL_H
|
|
|
|
|
2021-12-10 04:13:14 +01:00
|
|
|
/*
|
|
|
|
* Because this includes NT headers that normally conflict with Win32 headers,
|
|
|
|
* any translation unit that includes it should #define UMDF_USING_NTSTATUS
|
|
|
|
* before including <windows.h>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <ntstatus.h>
|
|
|
|
#include <winternl.h>
|
|
|
|
|
2022-07-20 03:50:57 +02:00
|
|
|
#ifndef FLUSH_FLAGS_FILE_DATA_SYNC_ONLY
|
|
|
|
#define FLUSH_FLAGS_FILE_DATA_SYNC_ONLY 0x4
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef NTSTATUS (__stdcall *RtlGetLastNtStatus_t) (void);
|
|
|
|
typedef ULONG (__stdcall *RtlNtStatusToDosError_t) (NTSTATUS);
|
|
|
|
typedef NTSTATUS (__stdcall *NtFlushBuffersFileEx_t) (HANDLE, ULONG, PVOID, ULONG, PIO_STATUS_BLOCK);
|
2021-12-10 04:13:14 +01:00
|
|
|
|
2022-04-08 14:16:38 +02:00
|
|
|
extern PGDLLIMPORT RtlGetLastNtStatus_t pg_RtlGetLastNtStatus;
|
2022-07-20 03:50:57 +02:00
|
|
|
extern PGDLLIMPORT RtlNtStatusToDosError_t pg_RtlNtStatusToDosError;
|
|
|
|
extern PGDLLIMPORT NtFlushBuffersFileEx_t pg_NtFlushBuffersFileEx;
|
2021-12-10 04:13:14 +01:00
|
|
|
|
|
|
|
extern int initialize_ntdll(void);
|
2022-01-11 22:11:50 +01:00
|
|
|
|
|
|
|
#endif /* WIN32NTDLL_H */
|