| 1 |
/*------------------------------------------------------------------------- |
| 2 |
* |
| 3 |
* win32ntdll.h |
| 4 |
* Dynamically loaded Windows NT functions. |
| 5 |
* |
| 6 |
* Portions Copyright (c) 2021-2025, PostgreSQL Global Development Group |
| 7 |
* Portions Copyright (c) 1994, Regents of the University of California |
| 8 |
* |
| 9 |
* src/include/port/win32ntdll.h |
| 10 |
* |
| 11 |
*------------------------------------------------------------------------- |
| 12 |
*/ |
| 13 |
|
| 14 |
#ifndef WIN32NTDLL_H |
| 15 |
#define WIN32NTDLL_H |
| 16 |
|
| 17 |
#include <ntstatus.h> |
| 18 |
#include <winternl.h> |
| 19 |
|
| 20 |
#ifndef FLUSH_FLAGS_FILE_DATA_SYNC_ONLY |
| 21 |
#define FLUSH_FLAGS_FILE_DATA_SYNC_ONLY 0x4 |
| 22 |
#endif |
| 23 |
|
| 24 |
typedef NTSTATUS (__stdcall * RtlGetLastNtStatus_t) (void); |
| 25 |
typedef ULONG (__stdcall * RtlNtStatusToDosError_t) (NTSTATUS); |
| 26 |
typedef NTSTATUS (__stdcall * NtFlushBuffersFileEx_t) (HANDLE, ULONG, PVOID, ULONG, PIO_STATUS_BLOCK); |
| 27 |
|
| 28 |
extern PGDLLIMPORT RtlGetLastNtStatus_t pg_RtlGetLastNtStatus; |
| 29 |
extern PGDLLIMPORT RtlNtStatusToDosError_t pg_RtlNtStatusToDosError; |
| 30 |
extern PGDLLIMPORT NtFlushBuffersFileEx_t pg_NtFlushBuffersFileEx; |
| 31 |
|
| 32 |
extern int initialize_ntdll(void); |
| 33 |
|
| 34 |
#endif /* WIN32NTDLL_H */ |