[+] Secret visible symbol: Aurora::Win32Open/AuWin32Open

This commit is contained in:
Reece Wilson 2023-09-13 15:14:22 +01:00
parent 599d77e341
commit db8db7b0cc
4 changed files with 44 additions and 2 deletions

View File

@ -0,0 +1,35 @@
/***
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

View File

@ -4,6 +4,12 @@
File: UNIX.hpp
Date: 2022-4-14
Author: Reece
Note: These file is excluded from the default include tree.
You must explicitly include this via:
#if defined(AURORA_IS_POSIX_DERIVED)
#include <Aurora/IO/UNIX/UNIX.hpp>
#endif
***/
#pragma once

View File

@ -530,6 +530,7 @@ namespace Aurora
void Win32Terminate();
AUKN_SYM /* I'm going to be kind */
HANDLE Win32Open(LPCWSTR lpFileName,
DWORD dwDesiredAccess = GENERIC_READ | GENERIC_WRITE,
DWORD dwShareMode = FILE_SHARE_READ,

View File

@ -67,12 +67,12 @@
#endif
#include "AuProcAddresses.hpp"
#define GIMME_IOWAITABLEITEM
#include <AuroraRuntime.hpp>
#include "AuProcAddresses.hpp"
inline Aurora::RuntimeStartInfo gRuntimeConfig;
inline int gRuntimeRunLevel {0};