AuroraRuntime/Include/Aurora/IO/NT/Win32Open.hpp

35 lines
1.2 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
);
}
#define AuWin32Open Aurora::Win32Open