AuroraRuntime/Include/Aurora/IO/NT/Win32Open.hpp
Jamie Reece Wilson b5c4271807 [*] Some WTF
[*] Use waitpid instead of wait3 (BSD, now deprecated by POSIX)
[*] Win32 / x86_32: I guess the file map maximum size should be the same as 64bit since it lets us? we need this span constraint to be the entire file or less.
[*] Improved AuProcess UNIX signal safety
[*] Comments
[+] Secret API: RuntimeCollectMemory
2024-10-12 16:30:12 +01:00

44 lines
1.9 KiB
C++

/***
Copyright (C) 2023 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: Win32Open.hpp
Date: 2023-9-13
Author: Reece
Note: These file is excluded from the default include tree.
You must explicitly include this via:
#if defined(AURORA_IS_MODERNNT_DERIVED)
#include <Aurora/IO/NT/Win32Open.hpp>
#endif
***/
#pragma once
#if !defined(AUKN_SYM)
// So long as it [DLL + Static] doesn't conflict with an impl, MSVC [link and cl] doesn't care.
#define AUKN_SYM
#endif
namespace Aurora
{
// Now you should hopefully need not worry about the 3 Bill-ion Shaftsoft CreateFile[2][FromApp][W/A] variants...
// ...and the varying degress of dwFlags/dwAttrs support.
AUKN_SYM HANDLE Win32Open(LPCWSTR lpFileName,
DWORD dwDesiredAccess = GENERIC_READ | GENERIC_WRITE,
DWORD dwShareMode = FILE_SHARE_READ,
bool bInherit = false,
DWORD dwCreationDisposition = 0,
DWORD dwFlags = 0,
DWORD dwAttributes = 0 // (0 = FILE_ATTRIBUTE_NORMAL)
);
AUKN_SYM HANDLE Win32Open2(LPCWSTR lpFileName,
DWORD dwDesiredAccess = GENERIC_READ | GENERIC_WRITE,
DWORD dwShareMode = FILE_SHARE_READ,
LPSECURITY_ATTRIBUTES lpSecurityAttributes = NULL,
DWORD dwCreationDisposition = 0,
DWORD dwFlags = 0,
DWORD dwAttributes = 0 // (0 = FILE_ATTRIBUTE_NORMAL)
);
}
#define AuWin32Open Aurora::Win32Open